Friday, March 6, 2020

Netmiko ASA Object Group

I am currently writing various scripts with netmiko and mostly all fine as they are show commands.

1 issue I have with an ASA is creating an Network Object Group with multiple hosts, it stops after the first one is added, as if Netmiko doesnt know what to do.

ssh_connect = ConnectHandler(**cisco) commands('object-group network testgroup', 'network-object object abc123', 'network-object object abc234', 'network-object object abc456', 'network-object object abc789') sendtoasa = ssh_connect.send_config_set(commands) output.write(sendtoasa) 

The last line just writes to a file, connection works no problem, and I can see it creates the object group, but nothing else,, am I missing something?

Thanks



No comments:

Post a Comment