Use rax_to_dict and make sure to return the volume details after deletion
This commit is contained in:
parent
fbb9dcc69a
commit
d8032ecc81
1 changed files with 2 additions and 4 deletions
|
@ -145,10 +145,7 @@ def cloud_block_storage(module, state, name, description, meta, size,
|
|||
attempts=attempts)
|
||||
|
||||
volume.get()
|
||||
for key, value in vars(volume).iteritems():
|
||||
if (isinstance(value, NON_CALLABLES) and
|
||||
not key.startswith('_')):
|
||||
instance[key] = value
|
||||
instance = rax_to_dict(volume)
|
||||
|
||||
result = dict(changed=changed, volume=instance)
|
||||
|
||||
|
@ -164,6 +161,7 @@ def cloud_block_storage(module, state, name, description, meta, size,
|
|||
|
||||
elif state == 'absent':
|
||||
if volume:
|
||||
instance = rax_to_dict(volume)
|
||||
try:
|
||||
volume.delete()
|
||||
changed = True
|
||||
|
|
Loading…
Reference in a new issue