mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Refine sizes for EC2
This commit is contained in:
parent
f755924627
commit
4e651d5cf0
@ -79,10 +79,11 @@ def avail_images():
|
||||
images = conn.list_images()
|
||||
ret = {}
|
||||
for img in images:
|
||||
ret[img.name] = {}
|
||||
for attr in dir(img):
|
||||
if attr.startswith('_'):
|
||||
continue
|
||||
ret[attr] = getattr(img, attr)
|
||||
ret[img.name][attr] = getattr(img, attr)
|
||||
return ret
|
||||
|
||||
|
||||
@ -95,10 +96,11 @@ def avail_sizes():
|
||||
sizes = conn.list_sizes()
|
||||
ret = {}
|
||||
for size in sizes:
|
||||
ret[size.name] = {}
|
||||
for attr in dir(size):
|
||||
if attr.startswith('_'):
|
||||
continue
|
||||
ret[attr] = getattr(size, attr)
|
||||
ret[size.name][attr] = getattr(size, attr)
|
||||
return ret
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user