commit 756ad1945eb7f706ee78dcdf335a4094e57d251b Author: Shu Juan Zhang Date: Thu Oct 15 10:43:10 2020 +0800 Do not create vswitch when it doesn't exist Comment out the code of creating non-existing vswitch, print a warning message into log. Change-Id: Ia16aaf6126e7b95bc9ec803ba6a59c1c1a10ca57 Signed-off-by: Shu Juan Zhang diff --git a/neutron/plugins/zvm/agent/zvm_network.py b/neutron/plugins/zvm/agent/zvm_network.py index f01d60f..cb38f98 100644 --- a/neutron/plugins/zvm/agent/zvm_network.py +++ b/neutron/plugins/zvm/agent/zvm_network.py @@ -76,8 +76,11 @@ class zvmNetwork(object): LOG.info('Vswitch %s is pre-created by admin or system, ' 'neutron-zvm-agent will not handle it' % vsw) else: - self._vsws.append(zvmVswitch(vsw, - self._maps[physical_net])) + LOG.warning('Vswitch %s does not exist, please change ' + 'to another existing vswitch or create this ' + 'vswitch manually.' % vsw) + # self._vsws.append(zvmVswitch(vsw, + # self._maps[physical_net])) # Log the physical networks which do not map to physical vswitches # and continue the running. if unmapped_physical_nets: