zone_name is null in zone trasfer request response
The response to API call has zone_id set with zone id but zone name is set to 'null'. Change-Id: Id2d093891953efcbb125560ea1113b8a9e613a9c Closes-Bug: #1580014
This commit is contained in:
parent
424ebf3206
commit
9deeed706e
@ -88,6 +88,8 @@ class TransferRequestsController(rest.RestController):
|
||||
except exceptions.EmptyRequestBody:
|
||||
body = dict()
|
||||
|
||||
zone = self.central_api.get_zone(context, zone_id)
|
||||
body['zone_name'] = zone.name
|
||||
body['zone_id'] = zone_id
|
||||
|
||||
zone_transfer_request = DesignateAdapter.parse(
|
||||
|
@ -49,6 +49,7 @@ class ZoneTransferRequestAPIv2Adapter(base.APIv2Adapter):
|
||||
'protected': False
|
||||
},
|
||||
"zone_name": {
|
||||
'immutable': True,
|
||||
'protected': False
|
||||
},
|
||||
"created_at": {},
|
||||
|
@ -42,6 +42,9 @@ class ApiV2ZoneTransfersTest(ApiV2TestCase):
|
||||
self.assertIn('id', response.json)
|
||||
self.assertIn('created_at', response.json)
|
||||
self.assertEqual('ACTIVE', response.json['status'])
|
||||
self.assertEqual(
|
||||
self.zone.name,
|
||||
response.json['zone_name'])
|
||||
self.assertEqual(
|
||||
self.zone.id,
|
||||
response.json['zone_id'])
|
||||
|
@ -0,0 +1,3 @@
|
||||
---
|
||||
fixes:
|
||||
- Added zone_name in zone trasfer request response. Closed bug#1580014
|
Loading…
Reference in New Issue
Block a user