Don't pass value_specs when creating internal port

When we create the internal port on a nova server, we shouldn't pass
value_specs when specifying extra properties, as it's an internal
dictionary which is not accepted by the API.

Change-Id: I0bb4407e89b5575dbaf8f198402e0926b550224d
Closes-Bug: #1607364
This commit is contained in:
Thomas Herve 2016-07-28 16:54:37 +02:00
parent e7a9e03132
commit 2245aa117e
2 changed files with 4 additions and 0 deletions

View File

@ -123,6 +123,9 @@ class ServerNetworkMixin(object):
extra_props = net_data.get(self.NETWORK_PORT_EXTRA)
if extra_props is not None:
specs = extra_props.pop(neutron_port.Port.VALUE_SPECS)
if specs:
kwargs.update(specs)
port_extra_keys = list(neutron_port.Port.EXTRA_PROPERTIES)
port_extra_keys.remove(neutron_port.Port.ALLOWED_ADDRESS_PAIRS)
for key in port_extra_keys:

View File

@ -3879,6 +3879,7 @@ class ServerInternalPortTest(common.HeatTestCase):
network = {'network': '4321', 'subnet': '1234',
'fixed_ip': '127.0.0.1',
'port_extra_properties': {
'value_specs': {},
'mac_address': '00:00:00:00:00:00',
'allowed_address_pairs': [
{'ip_address': '127.0.0.1',