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 2021/12/01 17:22:53 UTC

[GitHub] [libcloud] Kami commented on a change in pull request #1630: Add Server Groups functions in OpenStack driver

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



##########
File path: libcloud/compute/drivers/openstack.py
##########
@@ -4813,3 +4910,47 @@ def __repr__(self):
             ' snapshots="%s", backups="%s">'
             % (self.volumes, self.gigabytes, self.snapshots, self.backups)
         )
+
+
+class OpenStack_2_ServerGroup(object):
+    """
+    Server Group info.
+
+    See:
+    https://docs.openstack.org/api-ref/compute/?expanded=create-server-detail,list-server-groups-detail#server-groups-os-server-groups
+    """
+
+    def __init__(
+        self,
+        id,
+        name,
+        policy,
+        members=[],

Review comment:
       Should avoid mutable defaults here for ``members`` and ``rules``argument and default to ``None`` and set the value to empty list if it's not set inside the constructor (self.members = members or []``.




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

To unsubscribe, e-mail: notifications-unsubscribe@libcloud.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org