You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by GitBox <gi...@apache.org> on 2020/12/06 15:34:42 UTC

[GitHub] [libcloud] Kami commented on a change in pull request #1499: Adding external features to Outscale Provider

Kami commented on a change in pull request #1499:
URL: https://github.com/apache/libcloud/pull/1499#discussion_r537062848



##########
File path: libcloud/compute/drivers/outscale.py
##########
@@ -73,6 +76,23 @@ def __init__(self,
         }
 
     def list_locations(self, ex_dry_run: bool = False):
+        """
+        Lists available locations details.
+
+        :param      ex_dry_run: If true, checks whether you have the required
+        permissions to perform the action.
+        :type       ex_dry_run: ``bool``
+        :return: locations details
+        :rtype: ``dict``
+        """
+        action = "ReadLocations"
+        data = json.dumps({"DryRun": ex_dry_run})
+        response = self._call_api(action, data)
+        if response.status_code == 200:

Review comment:
       Eventually we should move some of this error handling code to the Response class - this way we can avoid all this duplicated lines, but that's fine for now.




----------------------------------------------------------------
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:
users@infra.apache.org