Cluster creation command returns complete cluster uuid
Cluster creation command shows complete uuid of the created cluster. Change-Id: I69ddbd706a5c6a06c5368db77c8e8d7445c46a11 Closes-bug: #1619543
This commit is contained in:
@@ -119,9 +119,8 @@ def do_bay_create(cs, args):
|
||||
if args.magnum_api_version and args.magnum_api_version == '1.1':
|
||||
_show_bay(bay)
|
||||
else:
|
||||
fields = str(bay).split("u'")
|
||||
uuid = fields[2]
|
||||
print("Request to create bay %s has been accepted." % uuid[:-3])
|
||||
uuid = str(bay._info['uuid'])
|
||||
print("Request to create bay %s has been accepted." % uuid)
|
||||
except Exception as e:
|
||||
print("Create for bay %s failed: %s" %
|
||||
(opts['name'], e))
|
||||
|
||||
@@ -114,9 +114,8 @@ def do_cluster_create(cs, args):
|
||||
if args.magnum_api_version and args.magnum_api_version == '1.1':
|
||||
_show_cluster(cluster)
|
||||
else:
|
||||
fields = str(cluster).split("u'")
|
||||
uuid = fields[2]
|
||||
print("Request to create cluster %s has been accepted." % uuid[:3])
|
||||
uuid = str(cluster._info['uuid'])
|
||||
print("Request to create cluster %s has been accepted." % uuid)
|
||||
except Exception as e:
|
||||
print("Create for cluster %s failed: %s" %
|
||||
(opts['name'], e))
|
||||
|
||||
Reference in New Issue
Block a user