Merge "Fixed a bunch of spacing"
This commit is contained in:
@@ -42,7 +42,6 @@ class ClientExtensionShow(NeutronClientExtension, neutronV20.ShowCommand):
|
|||||||
|
|
||||||
|
|
||||||
class ClientExtensionList(NeutronClientExtension, neutronV20.ListCommand):
|
class ClientExtensionList(NeutronClientExtension, neutronV20.ListCommand):
|
||||||
|
|
||||||
def take_action(self, parsed_args):
|
def take_action(self, parsed_args):
|
||||||
# NOTE(mdietz): Calls 'execute' to provide a consistent pattern
|
# NOTE(mdietz): Calls 'execute' to provide a consistent pattern
|
||||||
# for any implementers adding extensions with
|
# for any implementers adding extensions with
|
||||||
|
@@ -132,9 +132,9 @@ def _process_previous_argument(current_arg, _value_number, current_type_str,
|
|||||||
values_specs):
|
values_specs):
|
||||||
if current_arg is not None:
|
if current_arg is not None:
|
||||||
if _value_number == 0 and (current_type_str or _list_flag):
|
if _value_number == 0 and (current_type_str or _list_flag):
|
||||||
# This kind of argument should have value
|
# This kind of argument should have value
|
||||||
raise exceptions.CommandError(
|
raise exceptions.CommandError(
|
||||||
_("Invalid values_specs %s") % ' '.join(values_specs))
|
_("Invalid values_specs %s") % ' '.join(values_specs))
|
||||||
if _value_number > 1 or _list_flag or current_type_str == 'list':
|
if _value_number > 1 or _list_flag or current_type_str == 'list':
|
||||||
current_arg.update({'nargs': '+'})
|
current_arg.update({'nargs': '+'})
|
||||||
elif _value_number == 0:
|
elif _value_number == 0:
|
||||||
|
@@ -88,7 +88,7 @@ class ListQuota(neutronV20.NeutronCommand, lister.Lister):
|
|||||||
info = data[collection]
|
info = data[collection]
|
||||||
_columns = len(info) > 0 and sorted(info[0].keys()) or []
|
_columns = len(info) > 0 and sorted(info[0].keys()) or []
|
||||||
return (_columns, (utils.get_item_properties(s, _columns)
|
return (_columns, (utils.get_item_properties(s, _columns)
|
||||||
for s in info))
|
for s in info))
|
||||||
|
|
||||||
|
|
||||||
class ShowQuotaBase(neutronV20.NeutronCommand, show.ShowOne):
|
class ShowQuotaBase(neutronV20.NeutronCommand, show.ShowOne):
|
||||||
|
@@ -182,7 +182,7 @@ class RouterInterfaceCommand(neutronV20.NeutronCommand):
|
|||||||
resource, value = parsed_args.interface.split('=', 1)
|
resource, value = parsed_args.interface.split('=', 1)
|
||||||
if resource not in ['subnet', 'port']:
|
if resource not in ['subnet', 'port']:
|
||||||
exceptions.CommandError(_('You must specify either subnet or '
|
exceptions.CommandError(_('You must specify either subnet or '
|
||||||
'port for INTERFACE parameter.'))
|
'port for INTERFACE parameter.'))
|
||||||
else:
|
else:
|
||||||
resource = 'subnet'
|
resource = 'subnet'
|
||||||
value = parsed_args.interface
|
value = parsed_args.interface
|
||||||
|
@@ -240,7 +240,7 @@ class CLITestV20RouterJSON(test_cli20.CLITestV20Base):
|
|||||||
'--route',
|
'--route',
|
||||||
'destination=10.0.3.0/24,nexthop=10.0.0.10']
|
'destination=10.0.3.0/24,nexthop=10.0.0.10']
|
||||||
routes = [{'destination': '10.0.3.0/24',
|
routes = [{'destination': '10.0.3.0/24',
|
||||||
'nexthop': '10.0.0.10'}]
|
'nexthop': '10.0.0.10'}]
|
||||||
updatefields = {'routes': routes}
|
updatefields = {'routes': routes}
|
||||||
self._test_update_resource(resource, cmd, myid, args, updatefields)
|
self._test_update_resource(resource, cmd, myid, args, updatefields)
|
||||||
|
|
||||||
@@ -258,9 +258,9 @@ class CLITestV20RouterJSON(test_cli20.CLITestV20Base):
|
|||||||
'destination=fd7a:1d63:2063::/64,'
|
'destination=fd7a:1d63:2063::/64,'
|
||||||
'nexthop=fd7a:1d63:2063:0:f816:3eff:fe0e:a697']
|
'nexthop=fd7a:1d63:2063:0:f816:3eff:fe0e:a697']
|
||||||
routes = [{'destination': '10.0.3.0/24',
|
routes = [{'destination': '10.0.3.0/24',
|
||||||
'nexthop': '10.0.0.10'},
|
'nexthop': '10.0.0.10'},
|
||||||
{'destination': 'fd7a:1d63:2063::/64',
|
{'destination': 'fd7a:1d63:2063::/64',
|
||||||
'nexthop': 'fd7a:1d63:2063:0:f816:3eff:fe0e:a697'}]
|
'nexthop': 'fd7a:1d63:2063:0:f816:3eff:fe0e:a697'}]
|
||||||
updatefields = {'routes': routes}
|
updatefields = {'routes': routes}
|
||||||
self._test_update_resource(resource, cmd, myid, args, updatefields)
|
self._test_update_resource(resource, cmd, myid, args, updatefields)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user