diff --git a/.gitignore b/.gitignore index 10c97db..9be82d3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,164 @@ *.log uploadable_packs -Packs/AllCustomContent \ No newline at end of file +Packs/AllCustomContent + +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ +cover/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +.pybuilder/ +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +# For a library or package, you might want to ignore these files since the code is +# intended to run in multiple environments; otherwise, check them in: +# .python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# poetry +# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. +# This is especially recommended for binary packages to ensure reproducibility, and is more +# commonly ignored for libraries. +# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control +#poetry.lock + +# pdm +# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. +#pdm.lock +# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it +# in version control. +# https://pdm.fming.dev/#use-with-ide +.pdm.toml + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +# pytype static type analyzer +.pytype/ + +# Cython debug symbols +cython_debug/ + +# PyCharm +# JetBrains specific template is maintained in a separate JetBrains.gitignore that can +# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore +# and can be added to the global gitignore or merged into this file. For a more nuclear +# option (not recommended) you can uncomment the following to ignore the entire idea folder. +#.idea/ \ No newline at end of file diff --git a/Packs/PAN_OS_Upgrade_Services/Integrations/PAN_OS_Upgrade_Assurance/PAN_OS_Upgrade_Assurance.py b/Packs/PAN_OS_Upgrade_Services/Integrations/PAN_OS_Upgrade_Assurance/PAN_OS_Upgrade_Assurance.py index d12f999..2fadd7a 100644 --- a/Packs/PAN_OS_Upgrade_Services/Integrations/PAN_OS_Upgrade_Assurance/PAN_OS_Upgrade_Assurance.py +++ b/Packs/PAN_OS_Upgrade_Services/Integrations/PAN_OS_Upgrade_Assurance/PAN_OS_Upgrade_Assurance.py @@ -82,6 +82,7 @@ def run_readiness_checks( dp_mp_clock_diff: Optional[int] = None, ipsec_tunnel_status: Optional[str] = None, check_session_exists: Optional[str] = None, + arp_entry_exists: Optional[str] = None ): """ Run all the readiness checks and return an xsoar-compatible result. @@ -95,6 +96,8 @@ def run_readiness_checks( :arg check_session_exists: Check for the presence of a specific connection. Session check format is /destination/destination-port example: 10.10.10.10/8.8.8.8/443 + :arg arp_entry_exists: Check for the prescence of a specific ARP entry. + example: 10.0.0.6 """ if not check_list: @@ -144,6 +147,13 @@ def run_readiness_checks( "session_exist": check_value }) + if arp_entry_exists: + custom_checks.append({ + 'arp_entry_exist': { + 'ip': arp_entry_exists + } + }) + check_config = check_list + custom_checks checks = CheckFirewall(firewall, **SETTINGS) diff --git a/Packs/PAN_OS_Upgrade_Services/Integrations/PAN_OS_Upgrade_Assurance/PAN_OS_Upgrade_Assurance.yml b/Packs/PAN_OS_Upgrade_Services/Integrations/PAN_OS_Upgrade_Assurance/PAN_OS_Upgrade_Assurance.yml index 783bf24..c616835 100644 --- a/Packs/PAN_OS_Upgrade_Services/Integrations/PAN_OS_Upgrade_Assurance/PAN_OS_Upgrade_Assurance.yml +++ b/Packs/PAN_OS_Upgrade_Services/Integrations/PAN_OS_Upgrade_Assurance/PAN_OS_Upgrade_Assurance.yml @@ -73,6 +73,12 @@ script: required: false secret: false default: false + - name: arp_entry_exists + isArray: false + description: Check for the existence of a specific IP in the ARP Table. + required: false + secret: false + default: false - name: check_session_exists isArray: false description: | diff --git a/Packs/PAN_OS_Upgrade_Services/Layouts/layoutscontainer-PAN-OS_Network_Operations_-_Upgrade_Assurance_Layout.json b/Packs/PAN_OS_Upgrade_Services/Layouts/layoutscontainer-PAN-OS_Network_Operations_-_Upgrade_Assurance_Layout.json index ee98940..c0f79b7 100644 --- a/Packs/PAN_OS_Upgrade_Services/Layouts/layoutscontainer-PAN-OS_Network_Operations_-_Upgrade_Assurance_Layout.json +++ b/Packs/PAN_OS_Upgrade_Services/Layouts/layoutscontainer-PAN-OS_Network_Operations_-_Upgrade_Assurance_Layout.json @@ -53,7 +53,6 @@ "startCol": 0 } ], - "maxH": null, "maxW": 3, "minH": 1, "moved": false, @@ -67,7 +66,6 @@ "displayType": "ROW", "h": 2, "i": "caseinfoid-6aabad20-98b1-11e9-97d7-ed26ef9e46c8", - "maxH": null, "maxW": 3, "minH": 1, "moved": false, @@ -111,7 +109,6 @@ "startCol": 0 } ], - "maxH": null, "maxW": 3, "minH": 1, "moved": false, @@ -164,7 +161,6 @@ "startCol": 0 } ], - "maxH": null, "maxW": 3, "minH": 1, "moved": false, @@ -191,7 +187,6 @@ "startCol": 0 } ], - "maxH": null, "maxW": 3, "minH": 1, "moved": false, @@ -225,7 +220,6 @@ "startCol": 0 } ], - "maxH": null, "maxW": 3, "minH": 1, "moved": false, diff --git a/release.md b/release.md index bdd37c6..7a5f319 100644 --- a/release.md +++ b/release.md @@ -1,2 +1,5 @@ -Fixes: - * Fixed Race Condition in run comparison task when File.EntryID not updated in time. \ No newline at end of file +Features: + * Added ARP Table Session Exist check. This allows the user to specify a specific item exists in the + arp table when running the checks. + * Updated the Assurance playbook to run the readiness checks before AND after the upgrade process to ensure + changes in those checks are visualized in the incidents. \ No newline at end of file