summaryrefslogtreecommitdiff
path: root/openstackclient/compute/v2/aggregate.py
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-05-24 11:54:13 +0000
committerGerrit Code Review <review@openstack.org>2016-05-24 11:54:14 +0000
commit086c3ab8fabe79834964fb97a902ba67ecaaae85 (patch)
treeef9a841a031258208dc43671ee65ae3441880a47 /openstackclient/compute/v2/aggregate.py
parent5ae8f1b7d52ca9c94a01aeef13754b1d5a15a91f (diff)
parent5398c96e2a816148cbcde7ce43c46de6721051f6 (diff)
downloadpython-openstackclient-086c3ab8fabe79834964fb97a902ba67ecaaae85.tar.gz
Merge "Fix i18n support for help and error messages in compute"
Diffstat (limited to 'openstackclient/compute/v2/aggregate.py')
-rw-r--r--openstackclient/compute/v2/aggregate.py40
1 files changed, 21 insertions, 19 deletions
diff --git a/openstackclient/compute/v2/aggregate.py b/openstackclient/compute/v2/aggregate.py
index 1a02a388..752e0fdf 100644
--- a/openstackclient/compute/v2/aggregate.py
+++ b/openstackclient/compute/v2/aggregate.py
@@ -21,6 +21,7 @@ import six
from openstackclient.common import command
from openstackclient.common import parseractions
from openstackclient.common import utils
+from openstackclient.i18n import _
class AddAggregateHost(command.ShowOne):
@@ -31,12 +32,12 @@ class AddAggregateHost(command.ShowOne):
parser.add_argument(
'aggregate',
metavar='<aggregate>',
- help='Aggregate (name or ID)',
+ help=_("Aggregate (name or ID)")
)
parser.add_argument(
'host',
metavar='<host>',
- help='Host to add to <aggregate>',
+ help=_("Host to add to <aggregate>")
)
return parser
@@ -62,19 +63,19 @@ class CreateAggregate(command.ShowOne):
parser.add_argument(
"name",
metavar="<name>",
- help="New aggregate name",
+ help=_("New aggregate name")
)
parser.add_argument(
"--zone",
metavar="<availability-zone>",
- help="Availability zone name",
+ help=_("Availability zone name")
)
parser.add_argument(
"--property",
metavar="<key=value>",
action=parseractions.KeyValueAction,
- help='Property to add to this aggregate '
- '(repeat option to set multiple properties)',
+ help=_("Property to add to this aggregate "
+ "(repeat option to set multiple properties)")
)
return parser
@@ -105,7 +106,7 @@ class DeleteAggregate(command.Command):
parser.add_argument(
'aggregate',
metavar='<aggregate>',
- help='Aggregate to delete (name or ID)',
+ help=_("Aggregate to delete (name or ID)")
)
return parser
@@ -128,7 +129,8 @@ class ListAggregate(command.Lister):
'--long',
action='store_true',
default=False,
- help='List additional fields in output')
+ help=_("List additional fields in output")
+ )
return parser
def take_action(self, parsed_args):
@@ -175,12 +177,12 @@ class RemoveAggregateHost(command.ShowOne):
parser.add_argument(
'aggregate',
metavar='<aggregate>',
- help='Aggregate (name or ID)',
+ help=_("Aggregate (name or ID)")
)
parser.add_argument(
'host',
metavar='<host>',
- help='Host to remove from <aggregate>',
+ help=_("Host to remove from <aggregate>")
)
return parser
@@ -209,24 +211,24 @@ class SetAggregate(command.Command):
parser.add_argument(
'aggregate',
metavar='<aggregate>',
- help='Aggregate to modify (name or ID)',
+ help=_("Aggregate to modify (name or ID)")
)
parser.add_argument(
'--name',
metavar='<name>',
- help='Set aggregate name',
+ help=_("Set aggregate name")
)
parser.add_argument(
"--zone",
metavar="<availability-zone>",
- help="Set availability zone name",
+ help=_("Set availability zone name")
)
parser.add_argument(
"--property",
metavar="<key=value>",
action=parseractions.KeyValueAction,
- help='Property to set on <aggregate> '
- '(repeat option to set multiple properties)',
+ help=_("Property to set on <aggregate> "
+ "(repeat option to set multiple properties)")
)
return parser
@@ -264,7 +266,7 @@ class ShowAggregate(command.ShowOne):
parser.add_argument(
'aggregate',
metavar='<aggregate>',
- help='Aggregate to display (name or ID)',
+ help=_("Aggregate to display (name or ID)")
)
return parser
@@ -300,15 +302,15 @@ class UnsetAggregate(command.Command):
parser.add_argument(
"aggregate",
metavar="<aggregate>",
- help="Aggregate to modify (name or ID)",
+ help=_("Aggregate to modify (name or ID)")
)
parser.add_argument(
"--property",
metavar="<key>",
action='append',
- help='Property to remove from aggregate '
- '(repeat option to remove multiple properties)',
required=True,
+ help=_("Property to remove from aggregate "
+ "(repeat option to remove multiple properties)")
)
return parser