aboutsummaryrefslogtreecommitdiffstats
path: root/opnfv/deployment
diff options
context:
space:
mode:
authorjose.lausuch <jose.lausuch@ericsson.com>2017-02-13 23:14:49 +0100
committerjose.lausuch <jose.lausuch@ericsson.com>2017-02-14 21:11:12 +0100
commit89484b7ba381f6ac34f363259b38393a538b8a60 (patch)
tree63a0c9ab656575678d8f761149b61a30e935ebee /opnfv/deployment
parent5d3a56199bd878a4eaad8019109d038d626346bf (diff)
[deployment_handler] Re-write node default string printout
example output: http://pastebin.com/raw/dm3SEA43 Change-Id: I06b4e08897e8303dd938749636e00ae193e91dca Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
Diffstat (limited to 'opnfv/deployment')
-rw-r--r--opnfv/deployment/manager.py17
1 files changed, 15 insertions, 2 deletions
diff --git a/opnfv/deployment/manager.py b/opnfv/deployment/manager.py
index 8597a3f..43a7948 100644
--- a/opnfv/deployment/manager.py
+++ b/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):