Add 'shared' option to neutron address-scope-update
With reference to [1], neutron address-scope-update has 'shared'
option missing. The following patch fixes this issue.
[1]:9b830dde9b/neutron/extensions/address_scope.py
TrivialFix
Change-Id: I520ea471f5ab2681d0890370349433440734ab69
This commit is contained in:
parent
c87c325cf2
commit
f9ceed4f43
@ -15,6 +15,7 @@
|
||||
#
|
||||
|
||||
from neutronclient._i18n import _
|
||||
from neutronclient.common import utils
|
||||
from neutronclient.neutron import v2_0 as neutronV20
|
||||
|
||||
|
||||
@ -77,8 +78,12 @@ class UpdateAddressScope(neutronV20.UpdateCommand):
|
||||
def add_known_arguments(self, parser):
|
||||
parser.add_argument('--name',
|
||||
help=_('Updated name of the address scope.'))
|
||||
utils.add_boolean_argument(
|
||||
parser, '--shared',
|
||||
help=_('Set sharing of address scope. '
|
||||
'(True means shared)'))
|
||||
|
||||
def args2body(self, parsed_args):
|
||||
body = {}
|
||||
neutronV20.update_dict(parsed_args, body, ['name'])
|
||||
neutronV20.update_dict(parsed_args, body, ['name', 'shared'])
|
||||
return {self.resource: body}
|
||||
|
@ -114,6 +114,11 @@ class CLITestV20AddressScopeJSON(test_cli20.CLITestV20Base):
|
||||
['myid', '--name', 'newname-address-scope'],
|
||||
{'name': 'newname-address-scope'}
|
||||
)
|
||||
# Update address_scope: myid --shared
|
||||
self._test_update_resource(resource, cmd, 'myid',
|
||||
['myid', '--shared', 'True'],
|
||||
{'shared': "True"}
|
||||
)
|
||||
|
||||
def test_list_address_scope(self):
|
||||
# address_scope-list.
|
||||
|
Loading…
Reference in New Issue
Block a user