Closed ad1rie1 closed 5 years ago
Reverse connection is present on the properties of the interface. I see it in the above output. If you want to set reverse connection, you need to first grab the interface that is set for primary management, and set reverse_connection=True on the sub interfaces.
This will affect this setting:
For example:
firewall = Layer3Firewall('myfw')
primary_mgt_interface = firewall.interface_options.primary_mgt # <- get the primary mgt intf id
interface = firewall.interface.get(primary_mgt_interface) # <- retrieve the interface
for node in interface.interfaces: # <- iterate the nodes of that interface and set value/s
node.update(reverse_connection=True)
interface.update() # <- call update on the interface directly
Results in:
my hero ! 💃, thank you i have try to Browse all sub interface and alle sub interface VLAN but your code is mush more clean :)
Hello, i have test ans i have some issue :
smc.api.exceptions.UpdateElementFailed: Invalid JSON format: At line 1 and column 524, reverse_connection is not recognized as JSON attribute.
With the code : engine.interface_options.set_primary_mgt('4') engine.interface_options.set_backup_mgt('0.9') primary_mgt_interface = engine.interface_options.primary_mgt # <- get the primary mgt intf id interface = engine.interface.get(primary_mgt_interface) # <- retrieve the interface for node in interface.interfaces: # <- iterate the nodes of that interface and set value/s node.update(reverse_connection=True) interface.update()
I have addes something like this for make an exection on non node interfaces: for node in interface.interfaces: # <- iterate the nodes of that interface and set value/s if node.typeof != 'cluster_virtual_interface': node.update(reverse_connection=True)
But after that, Initiate connection is not ticked in the SMC :/
if i reload the engine in script, i see reverse_connection=True on node interface
i miss something ?
Hello,
I want to set node to initiate connection ,
i have find : reverse_connection="false" on node connection interface but nothing in DATA of node for an engine.
Do you know where this flag is ?
<firewall_node
activate_test="true" db_key="5661" disabled="false" guid="{e57780dd-c256-48bd-978d-88443247525c}" name="PDV-1184 node 2" nodeid="2">