Set port device_id as uuid of the container
This patch sets the device_id as the UUID of the container when creating or updating the port. Change-Id: I33a1c7a8becb37a249d8cb276b19c22f170fa186 Closes-Bug: #1737267
This commit is contained in:
parent
d88721168c
commit
c806a6ccbd
@ -191,11 +191,14 @@ class KuryrNetwork(network.Network):
|
||||
# either throw an exception or overwrite the port's security
|
||||
# groups.
|
||||
|
||||
# update device_id in port
|
||||
port_req_body = {'port': {'device_id': container.uuid}}
|
||||
self.neutron_api.update_port(neutron_port_id, port_req_body)
|
||||
|
||||
# If there is pci_request_id, it should be a sriov port.
|
||||
# populate pci related info.
|
||||
pci_request_id = requested_network.get('pci_request_id')
|
||||
if pci_request_id:
|
||||
port_req_body = {'port': {'device_id': container.uuid}}
|
||||
self._populate_neutron_extension_values(container,
|
||||
pci_request_id,
|
||||
port_req_body)
|
||||
@ -214,6 +217,7 @@ class KuryrNetwork(network.Network):
|
||||
port_dict = {
|
||||
'network_id': neutron_net_id,
|
||||
'tenant_id': self.context.project_id,
|
||||
'device_id': container.uuid,
|
||||
}
|
||||
ip_addr = requested_network.get("v4-fixed-ip") or requested_network.\
|
||||
get("v6-fixed-ip")
|
||||
|
Loading…
x
Reference in New Issue
Block a user