Просмотр исходного кода

Include group field in the security group rule representation

Enis Afgan 10 лет назад
Родитель
Сommit
b1a50181fa
1 измененных файлов с 3 добавлено и 2 удалено
  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
         self.parent = parent
 
 
     def __repr__(self):
     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):
     def __eq__(self, other):
         return self.ip_protocol == other.ip_protocol and \
         return self.ip_protocol == other.ip_protocol and \