libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [libcloud] Kami commented on a change in pull request #1496: Enable to get Quota Set detail in OpenStack conn
Date Sun, 27 Sep 2020 11:29:24 GMT

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



##########
File path: libcloud/compute/drivers/openstack.py
##########
@@ -3885,6 +3885,47 @@ def ex_del_router_subnet(self, router, subnet):
         """
         return self._manage_router_interface(router, 'remove', subnet=subnet)
 
+    def _to_quota_set(self, obj):
+        res = OpenStack_2_QuotaSet(
+            id=obj['id'],
+            cores=obj['cores'],
+            instances=obj['instances'],
+            key_pairs=obj['key_pairs'],
+            metadata_items=obj['metadata_items'],
+            ram=obj['ram'],
+            server_groups=obj['server_groups'],
+            server_group_members=obj['server_group_members'],
+            fixed_ips=obj.get('fixed_ips', None),
+            floating_ips=obj.get('floating_ips', None),
+            networks=obj.get('networks', None),
+            security_group_rules=obj.get('security_group_rules', None),
+            security_groups=obj.get('security_groups', None),
+            injected_file_content_bytes=obj.get('injected_file_content_bytes',
+                                                None),
+            injected_file_path_bytes=obj.get('injected_file_path_bytes', None),
+            injected_files=obj.get('injected_files', None),
+            driver=self.connection.driver)
+
+        return res
+
+    def get_quota_set(self, tenant_id, user_id=None):

Review comment:
       Since the method is not part of the standard API, it should be prefixed with ``ex_``.




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



Mime
View raw message