Kami commented on a change in pull request #1409: [WIP] Fix pagination in the 
"list_nodes()" method in the GCE driver
URL: https://github.com/apache/libcloud/pull/1409#discussion_r366169690
 
 

 ##########
 File path: libcloud/compute/drivers/gce.py
 ##########
 @@ -159,6 +166,16 @@ def request_aggregated_items(self, api_name):
             self.gce_params = params
             response = self.request(request_path, method='GET').object
             if 'items' in response:
+                if zone:
+                    # Special case when we are handling pagination for a
+                    # specific zone
+                    items = response['items']
+                    response['items'] = {}
+                    response['items'] = {
+                        'zones/%s' % (zone): {
 
 Review comment:
   In aggregated request response, this key will contain the zone name (e.g. 
``zones/europe-west1-b``), but the actual key is not used anywhere so the name 
is irrelevant and could really contain any value (it's just the structure of 
the actual value that matters).

----------------------------------------------------------------
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]


With regards,
Apache Git Services

Reply via email to