Explorar el Código

Include group field in the security group rule representation

Enis Afgan hace 10 años
padre
commit
b1a50181fa
Se han modificado 1 ficheros con 3 adiciones y 2 borrados
  1. 3 2
      cloudbridge/cloud/base/resources.py

+ 3 - 2
cloudbridge/cloud/base/resources.py

@@ -530,8 +530,9 @@ class BaseSecurityGroupRule(SecurityGroupRule, BaseCloudResource):
         self.parent = parent
 
     def __repr__(self):
-        return "<CBSecurityGroupRule: IP: {0}; from: {1}; to: {2}>".format(
-            self.ip_protocol, self.from_port, self.to_port)
+        return ("<CBSecurityGroupRule: IP: {0}; from: {1}; to: {2}; grp: {3}>"
+                .format(self.ip_protocol, self.from_port, self.to_port,
+                        self.group))
 
     def __eq__(self, other):
         return self.ip_protocol == other.ip_protocol and \