DavidChayla / FortigateApi

Access Fortigate REST API in python
GNU General Public License v3.0
83 stars 34 forks source link

Update Address Group #9

Closed swamy77 closed 3 years ago

swamy77 commented 3 years ago

fg.GetFwAddressGroup("Block")

fetches me properly the details as

"name":"Block", "q_origin_key":"Block", "uuid":"asdfasdf", "member":[ { "name":"TEST1", "q_origin_key":"TEST1" } ],

However when I try to update using the code snippet below

ips_to_add_list = [] ips_to_add_list.append("1.1.1.1") ips_to_add_list.append("2.2.2.2") response = fg.SetFwAddressGroup("Block",ips_to_add_list) print(response)

I get error "500". Not sure where my mistake is. Any help would be appreciated.