fix: Fixes refresh()
for attrib style params
#395
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes "attrib" style params, which are (currently) only present in
the various rule objects in policies.py.
Doing
rule.apply()
when the uuid is set and the name is unchangeddoes not cause PAN-OS to complain, so this fix does not cause any
regressions / change in standard behavior.
Doing `rule.apply() when the uuid is set and the name IS changed
causes PAN-OS to silently create another rule with a new uuid. This
of course means that the uuid of the object that was applied differs
between the user's object hierarchy and what's on live.
In light of this, we might want to investigate how to handle changing the
unique identifier from the name to the uuid of the rule, but some research
is needed on if this is actually possible from an XPATH perspective as well
as how to gracefully handle backwards compatibility (before the uuid field existed).
Fixes #392