mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Filter on 'name', not 'id', when listing images
And fix doc example of what --list-images looks like
This commit is contained in:
parent
688f24e9e4
commit
9b34542cb0
2 changed files with 10 additions and 8 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,7 +135,7 @@ 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]
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue