From 2ba65aad823006a35af12e15128619d907164836 Mon Sep 17 00:00:00 2001 From: Zhenguo Niu Date: Fri, 8 Sep 2017 09:19:34 +0800 Subject: [PATCH] Update port['device_id'] when creating server Co-Authored-By: Zhenguo Niu Change-Id: Ia54f7a5121c33ab09874c35fba06adf7b622d20d Closes-Bug: #1715040 --- mogan/engine/flows/create_server.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mogan/engine/flows/create_server.py b/mogan/engine/flows/create_server.py index f6f72eb9..accb52ea 100644 --- a/mogan/engine/flows/create_server.py +++ b/mogan/engine/flows/create_server.py @@ -157,6 +157,10 @@ class BuildNetworkTask(flow_utils.MoganTask): elif vif.get('port_id'): port = self.manager.network_api.show_port( context, vif.get('port_id')) + self.manager.network_api.check_port_availability(port) + self.manager.network_api.bind_port(context, + port['id'], + server) nic_dict = {'port_id': port['id'], 'network_id': port['network_id'],