Merge "Clean port dns_name in case of port detach"

This commit is contained in:
Jenkins 2016-04-22 15:21:56 +00:00 committed by Gerrit Code Review
commit e1522c1d86
2 changed files with 3 additions and 2 deletions

View File

@ -315,7 +315,8 @@ class API(base_api.NetworkAPI):
# in case the caller forgot to filter the list.
if port_id is None:
continue
port_req_body = {'port': {'device_id': '', 'device_owner': ''}}
port_req_body = {'port': {'device_id': '', 'device_owner': '',
'dns_name': ''}}
if port_binding:
port_req_body['port']['binding:host_id'] = None
port_req_body['port']['binding:profile'] = {}

View File

@ -3545,7 +3545,7 @@ class TestNeutronv2WithMock(test.TestCase):
api = neutronapi.API()
api._unbind_ports(mock_ctx, ports, mock_client)
body = {'port': {'device_id': '', 'device_owner': ''}}
body = {'port': {'device_id': '', 'device_owner': '', 'dns_name': ''}}
if has_ext:
body['port']['binding:host_id'] = None
body['port']['binding:profile'] = {}