mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Reduce digital_ocean_v2 API call frequency
This commit is contained in:
parent
9313804e27
commit
da6ab82837
1 changed files with 3 additions and 3 deletions
|
@ -112,7 +112,7 @@ def avail_images(call=None):
|
|||
ret = {}
|
||||
|
||||
while fetch:
|
||||
items = query(method='images', command='?page=' + str(page))
|
||||
items = query(method='images', command='?page=' + str(page) + '&per_page=200')
|
||||
|
||||
for image in items['images']:
|
||||
ret[image['id']] = {}
|
||||
|
@ -162,7 +162,7 @@ def list_nodes(call=None):
|
|||
ret = {}
|
||||
|
||||
while fetch:
|
||||
items = query(method='droplets', command='?page=' + str(page))
|
||||
items = query(method='droplets', command='?page=' + str(page) + '&per_page=200')
|
||||
for node in items['droplets']:
|
||||
ret[node['name']] = {
|
||||
'id': node['id'],
|
||||
|
@ -194,7 +194,7 @@ def list_nodes_full(call=None, forOutput=True):
|
|||
ret = {}
|
||||
|
||||
while fetch:
|
||||
items = query(method='droplets', command='?page=' + str(page))
|
||||
items = query(method='droplets', command='?page=' + str(page) + '&per_page=200')
|
||||
for node in items['droplets']:
|
||||
ret[node['name']] = {}
|
||||
for item in node.keys():
|
||||
|
|
Loading…
Add table
Reference in a new issue