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/01/14 06:29:37 UTC

[GitHub] [libcloud] Kami commented on a change in pull request #1409: [WIP] Fix pagination in the "list_nodes()" method in the GCE driver

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


With regards,
Apache Git Services