summaryrefslogtreecommitdiff
path: root/saharaclient
diff options
context:
space:
mode:
Diffstat (limited to 'saharaclient')
-rw-r--r--saharaclient/api/base.py5
-rw-r--r--saharaclient/api/clusters.py2
2 files changed, 5 insertions, 2 deletions
diff --git a/saharaclient/api/base.py b/saharaclient/api/base.py
index 9dccf13..d743b60 100644
--- a/saharaclient/api/base.py
+++ b/saharaclient/api/base.py
@@ -213,9 +213,12 @@ class ResourceManager(object):
else:
resp = self.api.delete(url)
- if resp.status_code != 204:
+ if resp.status_code not in [200, 204]:
self._raise_api_exception(resp)
+ if resp.status_code == 200:
+ return get_json(resp)
+
def _plurify_resource_name(self):
return self.resource_class.resource_name + 's'
diff --git a/saharaclient/api/clusters.py b/saharaclient/api/clusters.py
index fefad51..6030bfe 100644
--- a/saharaclient/api/clusters.py
+++ b/saharaclient/api/clusters.py
@@ -211,7 +211,7 @@ class ClusterManagerV2(ClusterManagerV1):
def force_delete(self, cluster_id):
"""Force Delete a Cluster."""
data = {'force': True}
- self._delete('/clusters/%s' % cluster_id, data)
+ return self._delete('/clusters/%s' % cluster_id, data)
# NOTE(jfreud): keep this around for backwards compatibility