|
|
@ -219,13 +219,6 @@ def get_org_devices(meraki, org_id):
|
|
|
|
return response
|
|
|
|
return response
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def temp_get_nets(meraki, org_name, net_name):
|
|
|
|
|
|
|
|
org_id = meraki.get_org_id(org_name)
|
|
|
|
|
|
|
|
path = meraki.construct_path('get_all', function='network', org_id=org_id)
|
|
|
|
|
|
|
|
r = meraki.request(path, method='GET')
|
|
|
|
|
|
|
|
return r
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def main():
|
|
|
|
def main():
|
|
|
|
|
|
|
|
|
|
|
|
# define the available arguments/parameters that a user can pass to
|
|
|
|
# define the available arguments/parameters that a user can pass to
|
|
|
@ -300,14 +293,14 @@ def main():
|
|
|
|
|
|
|
|
|
|
|
|
# manipulate or modify the state as needed (this is going to be the
|
|
|
|
# manipulate or modify the state as needed (this is going to be the
|
|
|
|
# part where your module will do what it needs to do)
|
|
|
|
# part where your module will do what it needs to do)
|
|
|
|
|
|
|
|
|
|
|
|
org_id = meraki.params['org_id']
|
|
|
|
org_id = meraki.params['org_id']
|
|
|
|
if org_id is None:
|
|
|
|
if org_id is None:
|
|
|
|
org_id = meraki.get_org_id(meraki.params['org_name'])
|
|
|
|
org_id = meraki.get_org_id(meraki.params['org_name'])
|
|
|
|
|
|
|
|
nets = meraki.get_nets(org_id=org_id)
|
|
|
|
|
|
|
|
net_id = None
|
|
|
|
|
|
|
|
if meraki.params['net_id'] or meraki.params['net_name']:
|
|
|
|
net_id = meraki.params['net_id']
|
|
|
|
net_id = meraki.params['net_id']
|
|
|
|
if net_id is None:
|
|
|
|
if net_id is None:
|
|
|
|
if meraki.params['net_name']:
|
|
|
|
|
|
|
|
nets = temp_get_nets(meraki, meraki.params['org_name'], meraki.params['net_name'])
|
|
|
|
|
|
|
|
net_id = meraki.get_net_id(net_name=meraki.params['net_name'], data=nets)
|
|
|
|
net_id = meraki.get_net_id(net_name=meraki.params['net_name'], data=nets)
|
|
|
|
|
|
|
|
|
|
|
|
if meraki.params['state'] == 'query':
|
|
|
|
if meraki.params['state'] == 'query':
|
|
|
|