Fix a description of floatingip-id in (dis)associate commands

Fixes bug 1151328

Also makes positional parameters of Show/Update/Delete commands upper.

Change-Id: Ifc6b76954ad987379f765f346167bb73556034f1
This commit is contained in:
Akihiro MOTOKI
2013-03-07 14:24:52 +09:00
parent 3709182a46
commit f96219d67a
2 changed files with 9 additions and 9 deletions

View File

@@ -358,7 +358,7 @@ class UpdateCommand(QuantumCommand):
def get_parser(self, prog_name):
parser = super(UpdateCommand, self).get_parser(prog_name)
parser.add_argument(
'id', metavar=self.resource,
'id', metavar=self.resource.upper(),
help='ID or name of %s to update' % self.resource)
self.add_known_arguments(parser)
return parser
@@ -407,7 +407,7 @@ class DeleteCommand(QuantumCommand):
else:
help_str = 'ID of %s to delete'
parser.add_argument(
'id', metavar=self.resource,
'id', metavar=self.resource.upper(),
help=help_str % self.resource)
return parser
@@ -550,7 +550,7 @@ class ShowCommand(QuantumCommand, show.ShowOne):
else:
help_str = 'ID of %s to look up'
parser.add_argument(
'id', metavar=self.resource,
'id', metavar=self.resource.upper(),
help=help_str % self.resource)
return parser

View File

@@ -102,11 +102,11 @@ class AssociateFloatingIP(QuantumCommand):
def get_parser(self, prog_name):
parser = super(AssociateFloatingIP, self).get_parser(prog_name)
parser.add_argument(
'floatingip_id', metavar='floatingip-id',
help='IP address of the floating IP to associate')
'floatingip_id', metavar='FLOATINGIP_ID',
help='ID of the floating IP to associate')
parser.add_argument(
'port_id',
help='ID of the port to be associated with the floatingip')
'port_id', metavar='PORT',
help='ID or name of the port to be associated with the floatingip')
parser.add_argument(
'--fixed-ip-address',
help=('IP address on the port (only required if port has multiple'
@@ -142,8 +142,8 @@ class DisassociateFloatingIP(QuantumCommand):
def get_parser(self, prog_name):
parser = super(DisassociateFloatingIP, self).get_parser(prog_name)
parser.add_argument(
'floatingip_id', metavar='floatingip-id',
help='IP address of the floating IP to associate')
'floatingip_id', metavar='FLOATINGIP_ID',
help='ID of the floating IP to associate')
return parser
def run(self, parsed_args):