Kami commented on a change in pull request #1478:
URL: https://github.com/apache/libcloud/pull/1478#discussion_r470844831
##########
File path: libcloud/container/drivers/lxd.py
##########
@@ -1225,12 +1444,102 @@ def ex_delete_storage_pool_volume(self, pool_id, type,
name):
:return:
"""
- response = self.connection.request("/%s/storage-pools/%s/volumes/%s/%s"
- % (self.version, pool_id,
- type, name),
- method="DELETE")
+ try:
+
+ req = "/%s/storage-pools/%s/volumes/%s/%s" % (self.version,
+ pool_id,
+ type,
+ name)
+ response = self.connection.request(req, method="DELETE")
+
+ response_dict = response.parse_body()
+ assert_response(response_dict=response_dict, status_code=200)
+ except BaseHTTPError as err:
Review comment:
We could probably reduce some of the duplication in those driver methods
by moving some of that error handling logic to the response class.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]