summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJose Lausuch <jose.lausuch@ericsson.com>2017-02-15 08:22:55 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-02-15 08:22:55 +0000
commitc684d75df1e6c9ebd768caf8daf1fee4d17f81a2 (patch)
tree0e3ee3e36432b34003d3524153f4b939bf8abd3d
parentfe6ff83e3827174acc8833490e0285ff59f83feb (diff)
parent1cda7d1cc9de91a68566f3b2a4a2d5b3efa4a406 (diff)
Merge "[deployment_handler] Re-write node default string printout"
-rw-r--r--modules/opnfv/deployment/manager.py17
1 files changed, 15 insertions, 2 deletions
diff --git a/modules/opnfv/deployment/manager.py b/modules/opnfv/deployment/manager.py
index 8597a3f1c..43a79488b 100644
--- a/modules/opnfv/deployment/manager.py
+++ b/modules/opnfv/deployment/manager.py
@@ -89,7 +89,7 @@ class Deployment(object):
sdn_controller=self.deployment_info['sdn_controller'])
for node in self.deployment_info['nodes']:
- s += '\t\t{node_object}\n'.format(node_object=node)
+ s += '{node_object}\n'.format(node_object=node)
return s
@@ -217,7 +217,20 @@ class Node(object):
return self.run_cmd(cmd)
def __str__(self):
- return str(self.get_dict())
+ return '''
+ name: {name}
+ id: {id}
+ ip: {ip}
+ status: {status}
+ roles: {roles}
+ ovs: {ovs}
+ info: {info}'''.format(name=self.name,
+ id=self.id,
+ ip=self.ip,
+ status=self.status,
+ roles=self.roles,
+ ovs=self.get_ovs_info(),
+ info=self.info)
class DeploymentHandler(object):