diff --git a/magnumclient/v1/bays_shell.py b/magnumclient/v1/bays_shell.py index 416d4e2..94ae574 100644 --- a/magnumclient/v1/bays_shell.py +++ b/magnumclient/v1/bays_shell.py @@ -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)) diff --git a/magnumclient/v1/clusters_shell.py b/magnumclient/v1/clusters_shell.py index 66634e4..7eae13d 100644 --- a/magnumclient/v1/clusters_shell.py +++ b/magnumclient/v1/clusters_shell.py @@ -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))