Closed rlc9090gmail closed 4 years ago
While composing this answer I notice there isn't a "unit-test" for NetworkGroups. I'll work on getting one built.
(Note: The following is pseudo-code. I just typed it here and didn't actually run it as a program.) Try something like this to get the current object:
net_group = fmcapi.NetworkGroups(fmc=fmc1, name="Existing Name")
net_group.get()
Then make whatever additions/subtractions/modifications needed:
net_group.named_networks(action="add", name="blah")
net_group.unnamed_networks(action="remove", value="1.1.1.0/24")
Then push back into FMC:
net_group.post()
Did this work for you?
I have not had a chance to try it yet. I will update when I have. Thanks for the pauedo code.
status?
Have not had the opportunity yet. We are experiencing other non api related issues with 6.5.
This can closed.
Is your feature request related to a problem? Please describe. I can't fine any documentation about using fmcapi to modify existing objects. I am trying to modify a network group object to add more ip addresses to it. I would also like to modify existing rules to add destination ports or destination addresses
Describe the solution you'd like I would like update documentation with some examples of modifying objects.