meraki_static_route - Remove unnecessary API call (#55528)
* Make module not get all nets every time it's executed with net_id * Add changelog fragment * Update changelogs/fragments/meraki_static_route_api_calls.yml Co-Authored-By: kbreit <kevin.breit@kevinbreit.net>
This commit is contained in:
parent
6e9379fe11
commit
7b7d6a1fef
2 changed files with 4 additions and 1 deletions
3
changelogs/fragments/meraki_static_route_api_calls.yml
Normal file
3
changelogs/fragments/meraki_static_route_api_calls.yml
Normal file
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
bugfixes:
|
||||
- "meraki_static_route - Module would make unnecessary API calls to Meraki when ``net_id`` is specified in task."
|
|
@ -328,9 +328,9 @@ def main():
|
|||
org_id = meraki.params['org_id']
|
||||
if not org_id:
|
||||
org_id = meraki.get_org_id(meraki.params['org_name'])
|
||||
nets = meraki.get_nets(org_id=org_id)
|
||||
net_id = meraki.params['net_id']
|
||||
if net_id is None:
|
||||
nets = meraki.get_nets(org_id=org_id)
|
||||
net_id = meraki.get_net_id(net_name=meraki.params['net_name'], data=nets)
|
||||
|
||||
if meraki.params['state'] == 'query':
|
||||
|
|
Loading…
Reference in a new issue