Skip to content

Commit

Permalink
feat(network.BgpPolicyRule): Add action_community_modifier param (#535)
Browse files Browse the repository at this point in the history
* Fix action_community_argument vartype

* Split BGP community actions into two params

* Add documentation

* Actually fix documentation

* Actually fix documentation...again

* Fix formatting

fixes #534
  • Loading branch information
adambaumeister committed Feb 6, 2024
1 parent 17c2cf0 commit 58ce888
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions panos/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -3515,11 +3515,12 @@ class BgpPolicyRule(BgpPolicyFilter):
* overwrite
action_community_argument (str): Argument to the action community value if needed
* None
* regex
action_community_modifier (str): Argument to the action community value when type is 'append' or 'overwrite'
* local-as
* no-advertise
* no-export
* nopeer
* regex
* 32-bit value
* AS:VAL
action_extended_community_type (str): Extended community update options
Expand Down Expand Up @@ -3625,9 +3626,21 @@ def _setup(self):
default=None,
condition={
"action": "allow",
"action_community_type": ["remove-regex", "append", "overwrite"],
"action_community_type": ["remove-regex"],
},
path="action/{action}/update/community/{action_community_type}",
)
)
params.append(
VersionedParamPath(
"action_community_modifier",
default=None,
condition={
"action": "allow",
"action_community_type": ["append", "overwrite"],
},
path="action/{action}/update/community/{action_community_type}",
vartype="member",
)
)
params.append(
Expand Down Expand Up @@ -3705,11 +3718,12 @@ class BgpPolicyImportRule(BgpPolicyRule):
* overwrite
action_community_argument (str): Argument to the action community value if needed
* None
* regex
action_community_modifier (str): Argument to the action community value when type is 'append' or 'overwrite'
* local-as
* no-advertise
* no-export
* nopeer
* regex
* 32-bit value
* AS:VAL
action_extended_community_type (str): Extended community update options
Expand Down Expand Up @@ -3800,11 +3814,12 @@ class BgpPolicyExportRule(BgpPolicyRule):
* overwrite
action_community_argument (str): Argument to the action community value if needed
* None
* regex
action_community_modifier (str): Argument to the action community value when type is 'append' or 'overwrite'
* local-as
* no-advertise
* no-export
* nopeer
* regex
* 32-bit value
* AS:VAL
action_extended_community_type (str): Extended community update options
Expand Down

0 comments on commit 58ce888

Please sign in to comment.