On a different topic, here are a couple of functions that I often use, so that you can just stores the names instead of IDs. def getOrgId(dashboard,orgName):
# Search for the org
for org in dashboard.organizations.getOrganizations():
if org['name'] == orgName:
return(org['id'])
raise SystemExit("Invalid organization name supplied: "+orgName) # This function retrieves the netId
def getNetId(dashboard,orgId,netName):
# Search for the network
for net in dashboard.organizations.getOrganizationNetworks(orgId):
if net['name'] == netName:
return(net['id'])
# Search for a template
for net in dashboard.organizations.getOrganizationConfigTemplates(orgId):
if net['name'] == netName:
return(net['id'])
# Nothing found matching at all
raise SystemExit("Invalid network name supplied: "+netName)
... View more