diff options
author | James Arendt <james.arendt@hp.com> | 2016-01-30 21:08:58 -0800 |
---|---|---|
committer | James Arendt <james.arendt@hp.com> | 2016-01-30 21:08:58 -0800 |
commit | 809af6c080a87f668a0d1855f0edb3d528e33a30 (patch) | |
tree | fce90da5d71a82035b785f3e48c87b6caf36702d /neutronclient/neutron | |
parent | 9f792d0b9c6ed86cea0f7efaf65817ff32e5d72d (diff) | |
download | python-neutronclient-809af6c080a87f668a0d1855f0edb3d528e33a30.tar.gz |
Make metavar usage consistent
Neutron CLI generally uses all caps for positional arguments
via metavars. There are a few exceptions in the current code that
do not match the other interfaces.
Change-Id: I905baebb3428e994cb724031cbb92120a0953d71
Closes-Bug: #1541625
Diffstat (limited to 'neutronclient/neutron')
-rwxr-xr-x | neutronclient/neutron/v2_0/address_scope.py | 1 | ||||
-rw-r--r-- | neutronclient/neutron/v2_0/agentscheduler.py | 16 | ||||
-rw-r--r-- | neutronclient/neutron/v2_0/port.py | 2 | ||||
-rw-r--r-- | neutronclient/neutron/v2_0/subnetpool.py | 1 |
4 files changed, 19 insertions, 1 deletions
diff --git a/neutronclient/neutron/v2_0/address_scope.py b/neutronclient/neutron/v2_0/address_scope.py index 8a89282..662209b 100755 --- a/neutronclient/neutron/v2_0/address_scope.py +++ b/neutronclient/neutron/v2_0/address_scope.py @@ -45,6 +45,7 @@ class CreateAddressScope(neutronV20.CreateCommand): help=_('Set the address scope as shared.')) parser.add_argument( 'name', + metavar='NAME', help=_('Specify the name of the address scope.')) parser.add_argument( 'ip_version', diff --git a/neutronclient/neutron/v2_0/agentscheduler.py b/neutronclient/neutron/v2_0/agentscheduler.py index 3348e64..24287b7 100644 --- a/neutronclient/neutron/v2_0/agentscheduler.py +++ b/neutronclient/neutron/v2_0/agentscheduler.py @@ -32,9 +32,11 @@ class AddNetworkToDhcpAgent(neutronV20.NeutronCommand): parser = super(AddNetworkToDhcpAgent, self).get_parser(prog_name) parser.add_argument( 'dhcp_agent', + metavar='DHCP_AGENT', help=_('ID of the DHCP agent.')) parser.add_argument( 'network', + metavar='NETWORK', help=_('Network to add.')) return parser @@ -56,9 +58,11 @@ class RemoveNetworkFromDhcpAgent(neutronV20.NeutronCommand): parser = super(RemoveNetworkFromDhcpAgent, self).get_parser(prog_name) parser.add_argument( 'dhcp_agent', + metavar='DHCP_AGENT', help=_('ID of the DHCP agent.')) parser.add_argument( 'network', + metavar='NETWORK', help=_('Network to remove.')) return parser @@ -83,6 +87,7 @@ class ListNetworksOnDhcpAgent(network.ListNetwork): self).get_parser(prog_name) parser.add_argument( 'dhcp_agent', + metavar='DHCP_AGENT', help=_('ID of the DHCP agent.')) return parser @@ -105,6 +110,7 @@ class ListDhcpAgentsHostingNetwork(neutronV20.ListCommand): self).get_parser(prog_name) parser.add_argument( 'network', + metavar='NETWORK', help=_('Network to query.')) return parser @@ -128,9 +134,11 @@ class AddRouterToL3Agent(neutronV20.NeutronCommand): parser = super(AddRouterToL3Agent, self).get_parser(prog_name) parser.add_argument( 'l3_agent', + metavar='L3_AGENT', help=_('ID of the L3 agent.')) parser.add_argument( 'router', + metavar='ROUTER', help=_('Router to add.')) return parser @@ -152,9 +160,11 @@ class RemoveRouterFromL3Agent(neutronV20.NeutronCommand): parser = super(RemoveRouterFromL3Agent, self).get_parser(prog_name) parser.add_argument( 'l3_agent', + metavar='L3_AGENT', help=_('ID of the L3 agent.')) parser.add_argument( 'router', + metavar='ROUTER', help=_('Router to remove.')) return parser @@ -183,6 +193,7 @@ class ListRoutersOnL3Agent(neutronV20.ListCommand): self).get_parser(prog_name) parser.add_argument( 'l3_agent', + metavar='L3_AGENT', help=_('ID of the L3 agent to query.')) return parser @@ -204,6 +215,7 @@ class ListL3AgentsHostingRouter(neutronV20.ListCommand): parser = super(ListL3AgentsHostingRouter, self).get_parser(prog_name) parser.add_argument('router', + metavar='ROUTER', help=_('Router to query.')) return parser @@ -236,6 +248,7 @@ class ListPoolsOnLbaasAgent(neutronV20.ListCommand): parser = super(ListPoolsOnLbaasAgent, self).get_parser(prog_name) parser.add_argument( 'lbaas_agent', + metavar='LBAAS_AGENT', help=_('ID of the loadbalancer agent to query.')) return parser @@ -260,6 +273,7 @@ class GetLbaasAgentHostingPool(neutronV20.ListCommand): parser = super(GetLbaasAgentHostingPool, self).get_parser(prog_name) parser.add_argument('pool', + metavar='POOL', help=_('Pool to query.')) return parser @@ -289,6 +303,7 @@ class ListLoadBalancersOnLbaasAgent(neutronV20.ListCommand): prog_name) parser.add_argument( 'lbaas_agent', + metavar='LBAAS_AGENT', help=_('ID of the loadbalancer agent to query.')) return parser @@ -313,6 +328,7 @@ class GetLbaasAgentHostingLoadBalancer(neutronV20.ListCommand): parser = super(GetLbaasAgentHostingLoadBalancer, self).get_parser(prog_name) parser.add_argument('loadbalancer', + metavar='LOADBALANCER', help=_('LoadBalancer to query.')) return parser diff --git a/neutronclient/neutron/v2_0/port.py b/neutronclient/neutron/v2_0/port.py index 6c997f4..0e27cd2 100644 --- a/neutronclient/neutron/v2_0/port.py +++ b/neutronclient/neutron/v2_0/port.py @@ -107,7 +107,7 @@ class ListRouterPort(neutronV20.ListCommand): def get_parser(self, prog_name): parser = super(ListRouterPort, self).get_parser(prog_name) parser.add_argument( - 'id', metavar='router', + 'id', metavar='ROUTER', help=_('ID or name of router to look up.')) return parser diff --git a/neutronclient/neutron/v2_0/subnetpool.py b/neutronclient/neutron/v2_0/subnetpool.py index 3b36bfe..a4a2247 100644 --- a/neutronclient/neutron/v2_0/subnetpool.py +++ b/neutronclient/neutron/v2_0/subnetpool.py @@ -82,6 +82,7 @@ class CreateSubnetPool(neutronV20.CreateCommand): help=_('Set the subnetpool as shared.')) parser.add_argument( 'name', + metavar='NAME', help=_('Name of subnetpool to create.')) parser.add_argument( '--address-scope', |