Skip to content

Commit 1dacfac

Browse files
authored
feat(panos_state_snapshot): allow dict config element for snapshots (#632)
also removed unused `noqa` in eda/logs.py for tox/ruff error in CI
1 parent 801b1de commit 1dacfac

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

extensions/eda/plugins/event_source/logs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
3434
"""
3535

36-
# ruff: noqa: UP001, UP010, FA102
36+
# ruff: noqa: UP001, UP010
3737
from __future__ import absolute_import, division, print_function
3838

3939
# pylint: disable-next=invalid-name

plugins/modules/panos_state_snapshot.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,13 @@
4747
description:
4848
- A list of Firewall state areas that we should take a snapshot of. For the details on currently supported list please refer to
4949
L(package documentation, https://pan.dev/panos/docs/panos-upgrade-assurance/configuration-details/#state-snapshots).
50+
- In most of the cases it is enough to specify a snapshot name to run it with default settings.
51+
In this case the list element is of type B(str). If additional configuration is required the element is a single element B(dict),
52+
where key is the state snapshot name and value contains the snapshot's configuration. For information which snapshot requires additional
53+
configuration please refer to L(package documentation, https://pan.dev/panos/docs/panos-upgrade-assurance/configuration-details/#state-snapshots).
5054
- To capture the actual snapshot data use a register.
5155
type: list
52-
elements: str
56+
elements: raw
5357
default: ["all"]
5458
"""
5559

@@ -133,7 +137,7 @@ def main():
133137
with_classic_provider_spec=True,
134138
min_panos_upgrade_assurance_version=MIN_PUA_VER,
135139
argument_spec=dict(
136-
state_areas=dict(type="list", default=["all"], elements="str")
140+
state_areas=dict(type="list", default=["all"], elements="raw")
137141
),
138142
panorama_error="This is a firewall only module",
139143
)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ pan-os-python = ">=1.8,<2.0"
2020
xmltodict = ">=0.12.0,<0.15.0"
2121
aiohttp = ">=3.8.4,<4.0"
2222
dpath = ">=2.1.5,<3.0"
23-
panos-upgrade-assurance = ">=1.0,<2.0"
23+
panos-upgrade-assurance = ">=1.4,<2.0"
2424

2525
[tool.poetry.dev-dependencies]
2626
black = ">=22.3.0"

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
aiohttp>=3.8.4,<4.0 ; python_version >= "3.10" and python_version < "4.0"
22
dpath>=2.1.5,<3.0 ; python_version >= "3.10" and python_version < "4.0"
33
pan-os-python>=1.8,<2.0 ; python_version >= "3.10" and python_version < "4.0"
4-
panos-upgrade-assurance>=1.0,<2.0 ; python_version >= "3.10" and python_version < "4.0"
4+
panos-upgrade-assurance>=1.4,<2.0 ; python_version >= "3.10" and python_version < "4.0"
55
xmltodict>=0.12.0,<0.15.0 ; python_version >= "3.10" and python_version < "4.0"

0 commit comments

Comments
 (0)