meraki_network_list = mdashboard.networks.getOrganizationNetworks(meraki_config['org_id'])
for network in meraki_network_list:
# creating placeholder variable
placeholder_network_created = False
# now scanning for networks named Tag Placeholder, if one does not exist it will be created
if network['name'] == 'Tag-Placeholder':
placeholder_network_created = True
print(placeholder_network_created)
elif network['name'] != 'Tag-Placeholder': # need to exclude normal branches
pass
if placeholder_network_created == False: # placed this outside for loop
print(placeholder_network_created)
create_network = mdashboard.networks.createOrganizationNetwork\
(meraki_config['org_id'], name = "Tag-Placeholder", type = "appliance")
Currently users have to create a Tag-Placeholder network. This function above automates that so users no longer have to create a placeholder network for primary and secondary tags.
function to detect if placeholder network exists
def placeholder_check():
obtaining complete list of networks within org
Currently users have to create a Tag-Placeholder network. This function above automates that so users no longer have to create a placeholder network for primary and secondary tags.