Closed MSD101 closed 4 years ago
Thanks for the reply. I am still learning the python so sorry for the question would be work?
nwgrp_name = input ('Enter NetworkGrp:- ')
nwgrp = fmcapi.NetworkGroups(fmc=fmc1,name=nwgrp_name)
nwgrp_output= nwgrp.get()
for object1 in nwgrp_output:
for obj in object1:
name1 = obj['value']
print(name1)
nwgrp is an "object". just print(f"{nwgrp.name}")
and print(f"{nwgrp.objects}")
and/or print(f"{nwgrp.literals}")
Thanks for your help.
Hi
I am using the put and post function to update the network group which works fine but was wondering if it would be possible to use the get function and just print all object name and value information?
I am using below commands:
But getting message
Traceback (most recent call last): File "C:/Personal/GitHub/fmcapi/scripts/remove-from-nwgrp.py", line 100, in
main()
File "C:/Personal/GitHub/fmcapi/scripts/remove-from-nwgrp.py", line 73, in main
name1 = object1['value']
TypeError: string indices must be integers
Appreciate any help
Thanks