diff --git a/panos/base.py b/panos/base.py index d8505e91..03aae887 100644 --- a/panos/base.py +++ b/panos/base.py @@ -3479,6 +3479,7 @@ def set_vsys( "vlan": "vlans", "virtual-wire": "virtual_wires", "virtual-router": "virtual_routers", + "logical-router": "logical_routers", "interface": "interface", } for key, param_name in import_to_vsys_param.items(): @@ -4900,7 +4901,7 @@ def _commit( except AttributeError: if exception: raise err.PanCommitNotNeeded("Commit not needed", pan_device=self) - else: + elif commit_response.find("./msg/line") is not None: # By getting here, there was no "./result/job" in the commit response, # and there was no exception raised either, so capture the response message commit_response_msg = commit_response.find("./msg/line").text @@ -4921,6 +4922,7 @@ def _commit( "messages": [commit_response_msg], } return log_collector_group_push_result + else: return if not sync: # Don't synchronize, just return diff --git a/panos/device.py b/panos/device.py index 704c9aa6..2a288a90 100644 --- a/panos/device.py +++ b/panos/device.py @@ -99,6 +99,7 @@ class Vsys(VersionedPanObject): vlans (list): A list of strings of VLANs virtual_wires (list): A list of strings of virtual wires virtual_routers (list): A list of strings of virtual routers + logical_routers (list): (10.2+) A list of strings of logical routers visible_vsys (list): A list of strings of the vsys visible dns_proxy (str): DNS Proxy server decrypt_forwarding (bool): Allow forwarding of decrypted content @@ -188,6 +189,10 @@ def _setup(self): path="import/network/virtual-router", ) ) + params.append(VersionedParamPath("logical_routers", exclude=True)) + params[-1].add_profile( + "10.2.0", path="import/network/logical-router", vartype="member" + ) params.append( VersionedParamPath( "visible_vsys", vartype="member", path="import/visible-vsys" diff --git a/panos/network.py b/panos/network.py index 1a9e1ad3..d68a4152 100644 --- a/panos/network.py +++ b/panos/network.py @@ -3017,10 +3017,9 @@ class BgpPeerGroup(VersionedPanObject): aggregated_confed_as_path (bool): the peers understand aggregated confederation AS path soft_reset_with_stored_info (bool): soft reset with stored info type (str): peer group type I('ebgp')/I('ibgp')/I('ebgp-confed')/I('ibgp-confed') - export_nexthop (str): export locally resolved nexthop I('resolve')/I('use-self') - import_nexthop (str): override nexthop with peer address I('original')/I('use-peer'), only with 'ebgp' remove_private_as (bool): remove private AS when exporting route, only with 'ebgp' - + import_nexthop (str): override nexthop with peer address I('original')/I('use-peer'), only with 'ebgp' + export_nexthop (str): export locally resolved nexthop I('resolve')/I('use-self') """ SUFFIX = ENTRY @@ -3046,9 +3045,10 @@ def _setup(self): ) params.append( VersionedParamPath( - "export_nexthop", - path="type/{type}/export-nexthop", - values=("resolve", "use-self"), + "remove_private_as", + condition={"type": "ebgp"}, + path="type/{type}/remove-private-as", + vartype="yesno", ) ) params.append( @@ -3061,10 +3061,9 @@ def _setup(self): ) params.append( VersionedParamPath( - "remove_private_as", - condition={"type": "ebgp"}, - path="type/{type}/remove-private-as", - vartype="yesno", + "export_nexthop", + path="type/{type}/export-nexthop", + values=("resolve", "use-self"), ) )