Skip to content

Commit

Permalink
Adding target resources to JuniperMSMPC/JuniperSRX. Doesn't need to p…
Browse files Browse the repository at this point in the history
…rocess the GCP resource metadata, but not error out when provided.

PiperOrigin-RevId: 667646319
  • Loading branch information
abhindes authored and Capirca Team committed Aug 26, 2024
1 parent 6587714 commit 984b49b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion capirca/lib/junipermsmpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,8 @@ def _BuildTokens(self):

supported_tokens |= {
'destination_prefix', 'destination_prefix_except', 'icmp_code',
'logging', 'owner', 'source_prefix', 'source_prefix_except'
'logging', 'owner', 'source_prefix', 'source_prefix_except',
'target_resources',
}
supported_sub_tokens.update({
'option': {
Expand Down
1 change: 1 addition & 0 deletions capirca/lib/junipersrx.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,7 @@ def _BuildTokens(self):
'option',
'owner',
'source_zone',
'target_resources',
'timeout',
'verbatim',
'vpn'}
Expand Down
2 changes: 1 addition & 1 deletion tests/lib/junipermsmpc_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@
'expiration', 'icmp_code', 'icmp_type', 'stateless_reply', 'logging',
'name', 'option', 'owner', 'platform', 'platform_exclude', 'protocol',
'source_address', 'source_address_exclude', 'source_port', 'source_prefix',
'source_prefix_except', 'translated', 'verbatim'
'source_prefix_except', 'target_resources', 'translated', 'verbatim',
])

SUPPORTED_SUB_TOKENS = {
Expand Down
1 change: 1 addition & 0 deletions tests/lib/junipersrx_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,7 @@
'source_address',
'source_address_exclude',
'source_port',
'target_resources',
'timeout',
'translated',
'verbatim',
Expand Down

0 comments on commit 984b49b

Please sign in to comment.