summaryrefslogtreecommitdiff
path: root/openstackclient/compute/v2/agent.py
diff options
context:
space:
mode:
authorTang Chen <chen.tang@easystack.cn>2016-05-14 15:12:57 +0800
committerTang Chen <chen.tang@easystack.cn>2016-05-24 11:03:49 +0800
commit5398c96e2a816148cbcde7ce43c46de6721051f6 (patch)
treea0d791665b99f28293f1fdc3f2830a3259461745 /openstackclient/compute/v2/agent.py
parente3f169280c665c62b6e3708c1ae3b763ab91a174 (diff)
downloadpython-openstackclient-5398c96e2a816148cbcde7ce43c46de6721051f6.tar.gz
Fix i18n support for help and error messages in compute
Change-Id: Id6eebcb48d1b7b49b6636524506294edbc44a83f Partial-bug: #1574965
Diffstat (limited to 'openstackclient/compute/v2/agent.py')
-rw-r--r--openstackclient/compute/v2/agent.py39
1 files changed, 26 insertions, 13 deletions
diff --git a/openstackclient/compute/v2/agent.py b/openstackclient/compute/v2/agent.py
index d5e86033..e358399d 100644
--- a/openstackclient/compute/v2/agent.py
+++ b/openstackclient/compute/v2/agent.py
@@ -19,6 +19,7 @@ import six
from openstackclient.common import command
from openstackclient.common import utils
+from openstackclient.i18n import _
class CreateAgent(command.ShowOne):
@@ -29,28 +30,34 @@ class CreateAgent(command.ShowOne):
parser.add_argument(
"os",
metavar="<os>",
- help="Type of OS")
+ help=_("Type of OS")
+ )
parser.add_argument(
"architecture",
metavar="<architecture>",
- help="Type of architecture")
+ help=_("Type of architecture")
+ )
parser.add_argument(
"version",
metavar="<version>",
- help="Version")
+ help=_("Version")
+ )
parser.add_argument(
"url",
metavar="<url>",
- help="URL")
+ help=_("URL")
+ )
parser.add_argument(
"md5hash",
metavar="<md5hash>",
- help="MD5 hash")
+ help=_("MD5 hash")
+ )
parser.add_argument(
"hypervisor",
metavar="<hypervisor>",
- help="Type of hypervisor",
- default="xen")
+ default="xen",
+ help=_("Type of hypervisor")
+ )
return parser
def take_action(self, parsed_args):
@@ -75,7 +82,8 @@ class DeleteAgent(command.Command):
parser.add_argument(
"id",
metavar="<id>",
- help="ID of agent to delete")
+ help=_("ID of agent to delete")
+ )
return parser
def take_action(self, parsed_args):
@@ -91,7 +99,8 @@ class ListAgent(command.Lister):
parser.add_argument(
"--hypervisor",
metavar="<hypervisor>",
- help="Type of hypervisor")
+ help=_("Type of hypervisor")
+ )
return parser
def take_action(self, parsed_args):
@@ -120,19 +129,23 @@ class SetAgent(command.Command):
parser.add_argument(
"id",
metavar="<id>",
- help="ID of the agent")
+ help=_("ID of the agent")
+ )
parser.add_argument(
"version",
metavar="<version>",
- help="Version of the agent")
+ help=_("Version of the agent")
+ )
parser.add_argument(
"url",
metavar="<url>",
- help="URL")
+ help=_("URL")
+ )
parser.add_argument(
"md5hash",
metavar="<md5hash>",
- help="MD5 hash")
+ help=_("MD5 hash")
+ )
return parser
def take_action(self, parsed_args):