mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
volume_action doesn't always need names
for example, volume_list
This commit is contained in:
parent
31f9d49ea9
commit
18da08cbd6
@ -322,6 +322,7 @@ class CloudClient(object):
|
||||
return False
|
||||
if isinstance(names, str):
|
||||
names = names.split(',')
|
||||
|
||||
ret = {}
|
||||
for name in names:
|
||||
volume_ = kwargs.copy()
|
||||
|
@ -831,3 +831,11 @@ def volume_attach(name, server_name, device='/dev/xvdb', **kwargs):
|
||||
device,
|
||||
timeout=300
|
||||
)
|
||||
|
||||
|
||||
def volume_list(**kwargs):
|
||||
'''
|
||||
Attach block volume
|
||||
'''
|
||||
conn = get_conn()
|
||||
return conn.volume_list()
|
||||
|
@ -213,7 +213,7 @@ def volume_list(provider):
|
||||
|
||||
'''
|
||||
client = _get_client()
|
||||
info = client.volume_action(provider, action='list')
|
||||
info = client.volume_action(provider, 'name', action='list')
|
||||
return info
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user