summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhuangtianhua <huangtianhua@huawei.com>2014-02-12 16:00:30 +0800
committerhuangtianhua <huangtianhua@huawei.com>2014-02-13 09:56:08 +0800
commitadcdf116611e8cebd5713ff06b34ae0192c0f5fe (patch)
tree51b025c7ec8994f69914970b5709489464b18b9e
parent7c3c1bb0dd56beba04717c8dd64ee53edd52e177 (diff)
downloadpython-novaclient-adcdf116611e8cebd5713ff06b34ae0192c0f5fe.tar.gz
Fix copy/paste errors in print messages
"Aggregate %s has been successfully updated." as the print message of do_aggregate_set_metadata/do_aggregate_add_host/do_aggregate_remove_host is incorrect. Change-Id: I18c1c3a4403a8ebe3062ef7a695b0e643619dc74
-rw-r--r--novaclient/v1_1/shell.py9
-rw-r--r--novaclient/v3/shell.py9
2 files changed, 12 insertions, 6 deletions
diff --git a/novaclient/v1_1/shell.py b/novaclient/v1_1/shell.py
index 9fee3ebb..ee667957 100644
--- a/novaclient/v1_1/shell.py
+++ b/novaclient/v1_1/shell.py
@@ -2698,7 +2698,8 @@ def do_aggregate_set_metadata(cs, args):
aggregate = _find_aggregate(cs, args.aggregate)
metadata = _extract_metadata(args)
aggregate = cs.aggregates.set_metadata(aggregate.id, metadata)
- print("Aggregate %s has been successfully updated." % aggregate.id)
+ print("Metadata has been successfully updated for aggregate %s." %
+ aggregate.id)
_print_aggregate_details(aggregate)
@@ -2708,7 +2709,8 @@ def do_aggregate_add_host(cs, args):
"""Add the host to the specified aggregate."""
aggregate = _find_aggregate(cs, args.aggregate)
aggregate = cs.aggregates.add_host(aggregate.id, args.host)
- print("Aggregate %s has been successfully updated." % aggregate.id)
+ print("Host %s has been successfully added for aggregate %s " %
+ (args.host, aggregate.id))
_print_aggregate_details(aggregate)
@@ -2719,7 +2721,8 @@ def do_aggregate_remove_host(cs, args):
"""Remove the specified host from the specified aggregate."""
aggregate = _find_aggregate(cs, args.aggregate)
aggregate = cs.aggregates.remove_host(aggregate.id, args.host)
- print("Aggregate %s has been successfully updated." % aggregate.id)
+ print("Host %s has been successfully removed from aggregate %s " %
+ (args.host, aggregate.id))
_print_aggregate_details(aggregate)
diff --git a/novaclient/v3/shell.py b/novaclient/v3/shell.py
index 7b0dcfee..f81264ed 100644
--- a/novaclient/v3/shell.py
+++ b/novaclient/v3/shell.py
@@ -2244,7 +2244,8 @@ def do_aggregate_set_metadata(cs, args):
aggregate = _find_aggregate(cs, args.aggregate)
metadata = _extract_metadata(args)
aggregate = cs.aggregates.set_metadata(aggregate.id, metadata)
- print("Aggregate %s has been successfully updated." % aggregate.id)
+ print("Metadata has been successfully updated for aggregate %s." %
+ aggregate.id)
_print_aggregate_details(aggregate)
@@ -2254,7 +2255,8 @@ def do_aggregate_add_host(cs, args):
"""Add the host to the specified aggregate."""
aggregate = _find_aggregate(cs, args.aggregate)
aggregate = cs.aggregates.add_host(aggregate.id, args.host)
- print("Aggregate %s has been successfully updated." % aggregate.id)
+ print("Host %s has been successfully added for aggregate %s " %
+ (args.host, aggregate.id))
_print_aggregate_details(aggregate)
@@ -2265,7 +2267,8 @@ def do_aggregate_remove_host(cs, args):
"""Remove the specified host from the specified aggregate."""
aggregate = _find_aggregate(cs, args.aggregate)
aggregate = cs.aggregates.remove_host(aggregate.id, args.host)
- print("Aggregate %s has been successfully updated." % aggregate.id)
+ print("Host %s has been successfully removed from aggregate %s " %
+ (args.host, aggregate.id))
_print_aggregate_details(aggregate)