Digital Ocean Block Storage Bug (#41431)

Fix added for Digital Ocean Volumes API change causing Ansible to recieve an unexpected value in the response.

Signed-off-by: ABond <ajbond2005@gmail.com>
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

(cherry picked from commit 4efe53edd5)
pull/43694/head
ABond 8 years ago committed by Matt Clay
parent d3a9f77361
commit cda4b6dad1

@ -0,0 +1,3 @@
---
bugfixes:
- Fix added for Digital Ocean Volumes API change causing Ansible to recieve an unexpected value in the response. (https://github.com/ansible/ansible/pull/41431)

@ -199,7 +199,7 @@ class DOBlockStorage(object):
json = response.json
if status == 201:
self.module.exit_json(changed=True, id=json['volume']['id'])
elif status == 409 and json['id'] == 'already_exists':
elif status == 409 and json['id'] == 'conflict':
self.module.exit_json(changed=False)
else:
raise DOBlockStorageException(json['message'])

Loading…
Cancel
Save