make __repr__ more useful with default behavior, rather than juse displaying id
This commit is contained in:
parent
7357d3326d
commit
38da8b4e85
novaclient/v1_1
@ -21,10 +21,6 @@ from novaclient import base
|
|||||||
|
|
||||||
|
|
||||||
class SecurityGroupRule(base.Resource):
|
class SecurityGroupRule(base.Resource):
|
||||||
|
|
||||||
def __repr__(self):
|
|
||||||
return "<Security_group_rule: %s>" % self.id
|
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return str(self.id)
|
return str(self.id)
|
||||||
|
|
||||||
|
@ -21,10 +21,6 @@ from novaclient import base
|
|||||||
|
|
||||||
|
|
||||||
class SecurityGroup(base.Resource):
|
class SecurityGroup(base.Resource):
|
||||||
|
|
||||||
def __repr__(self):
|
|
||||||
return "<Security_group: %s>" % self.id
|
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return str(self.id)
|
return str(self.id)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user