Fix inconsistent parameter name in azp
The availability zone data parameter was uncorrectly defined as "--availabilityzone-data" in SetAvailabilityzoneProfile while it is called "--availability-zone-data" when creating a resource. Fixing this typo also fixed the set CLI call, the availability zone data parameter was dropped in the PUT request. Now an admin is able to update the JSON data. Story 2009195 Task 43250 Story 2009196 Task 43251 Change-Id: Id0f07b7145a6a19a6bc13ddeee93dc1957ddd8dd
This commit is contained in:
parent
dc9e804e48
commit
01c15c69cf
|
@ -171,8 +171,8 @@ class SetAvailabilityzoneProfile(command.Command):
|
|||
help="Set the provider of the availability zone profile."
|
||||
)
|
||||
parser.add_argument(
|
||||
'--availabilityzone-data',
|
||||
metavar='<availabilityzone_data>',
|
||||
'--availability-zone-data',
|
||||
metavar='<availability_zone_data>',
|
||||
help="Set the availability zone data of the profile."
|
||||
)
|
||||
|
||||
|
|
|
@ -184,3 +184,18 @@ class TestAvailabilityzoneProfileSet(TestAvailabilityzoneProfile):
|
|||
'availability_zone_profile': {
|
||||
'name': 'new_name'
|
||||
}})
|
||||
|
||||
arglist = [self._availabilityzoneprofile.id,
|
||||
'--availability-zone-data', '{"key1": "value1"}']
|
||||
verifylist = [
|
||||
('availabilityzoneprofile', self._availabilityzoneprofile.id),
|
||||
('availability_zone_data', '{"key1": "value1"}'),
|
||||
]
|
||||
|
||||
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
|
||||
self.cmd.take_action(parsed_args)
|
||||
self.api_mock.availabilityzoneprofile_set.assert_called_with(
|
||||
self._availabilityzoneprofile.id, json={
|
||||
'availability_zone_profile': {
|
||||
'availability_zone_data': '{"key1": "value1"}'
|
||||
}})
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
fixes:
|
||||
- |
|
||||
The ``--availabilityzone-data`` parameter is renamed to
|
||||
``--availability-zone-data`` in the ``openstack loadbalancer
|
||||
availabilityzoneprofile set`` command.
|
||||
This change also fixes an issue with this CLI call, the availabilityzone data
|
||||
parameter was dropped when calling the API, leaving the
|
||||
availabilizyzoneprofile object untouched.
|
Loading…
Reference in New Issue