Clean port dns_name in case of port detach

In case of port detach dns_name should be also
updated in Neutron

Change-Id: I65edb33b955a91d1701fc91cb9fae0a5f26d4e46
Closes-Bug: #1572593
This commit is contained in:
Timofey Durakov 2016-04-20 17:58:23 +03:00
parent db06f9aa61
commit fc66e7eb41
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'] = {}