mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #27288 from rallytime/do-cleanup
Filter on 'name', not 'id', when listing images
This commit is contained in:
commit
d96462af48
2 changed files with 11 additions and 9 deletions
|
@ -46,7 +46,7 @@ Set up an initial profile at ``/etc/salt/cloud.profiles`` or in the
|
|||
|
||||
digitalocean-ubuntu:
|
||||
provider: my-digitalocean-config
|
||||
image: Ubuntu 14.04 x32
|
||||
image: 14.04 x64
|
||||
size: 512MB
|
||||
location: New York 1
|
||||
private_networking: True
|
||||
|
@ -117,18 +117,20 @@ command:
|
|||
----------
|
||||
digital_ocean:
|
||||
----------
|
||||
Arch Linux 2013.05 x64:
|
||||
10.1:
|
||||
----------
|
||||
created_at:
|
||||
2015-01-20T20:04:34Z
|
||||
distribution:
|
||||
Arch Linux
|
||||
FreeBSD
|
||||
id:
|
||||
350424
|
||||
10144573
|
||||
min_disk_size:
|
||||
20
|
||||
name:
|
||||
Arch Linux 2013.05 x64
|
||||
10.1
|
||||
public:
|
||||
True
|
||||
slug:
|
||||
None
|
||||
...SNIP...
|
||||
|
||||
.. note::
|
||||
|
|
|
@ -135,9 +135,9 @@ def avail_images(call=None):
|
|||
items = query(method='images', command='?page=' + str(page) + '&per_page=200')
|
||||
|
||||
for image in items['images']:
|
||||
ret[image['id']] = {}
|
||||
ret[image['name']] = {}
|
||||
for item in six.iterkeys(image):
|
||||
ret[image['id']][item] = image[item]
|
||||
ret[image['name']][item] = image[item]
|
||||
|
||||
page += 1
|
||||
try:
|
||||
|
|
Loading…
Add table
Reference in a new issue