Remove unsupported nova-networking
Nova-network is not supported by the driver. This removes the nova-net case and reference from the network task. Change-Id: I8081bec98871d4207d5a6b57ff942f4c8288308f
This commit is contained in:
parent
2f7d2bf8a1
commit
258fa979dc
|
@ -375,8 +375,7 @@ class TestNetwork(test.NoDBTestCase):
|
|||
mock_vm_get.assert_not_called()
|
||||
mock_plug_rmc_vif.assert_not_called()
|
||||
|
||||
@mock.patch('nova.utils.is_neutron')
|
||||
def test_get_vif_events(self, mock_is_neutron):
|
||||
def test_get_vif_events(self):
|
||||
# Set up common mocks.
|
||||
inst = objects.Instance(**powervm.TEST_INSTANCE)
|
||||
net_info = [mock.MagicMock(), mock.MagicMock()]
|
||||
|
@ -390,12 +389,6 @@ class TestNetwork(test.NoDBTestCase):
|
|||
'host_uuid', 'slot_mgr')
|
||||
p_vifs.crt_network_infos = net_info
|
||||
|
||||
# Mock that neutron is off.
|
||||
mock_is_neutron.return_value = False
|
||||
self.assertEqual([], p_vifs._get_vif_events())
|
||||
|
||||
# Turn neutron on.
|
||||
mock_is_neutron.return_value = True
|
||||
resp = p_vifs._get_vif_events()
|
||||
|
||||
# Only one should be returned since only one was active.
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
import eventlet
|
||||
|
||||
from nova import exception
|
||||
from nova import utils
|
||||
|
||||
from oslo_log import log as logging
|
||||
from pypowervm.wrappers import network as pvm_net
|
||||
|
@ -217,20 +216,15 @@ class PlugVifs(task.Task):
|
|||
"""Returns the VIF events that need to be received for a VIF plug.
|
||||
|
||||
In order for a VIF plug to be successful, certain events should be
|
||||
received from other components within the OpenStack ecosystem. If
|
||||
using neutron, certain events are needed. If Nova networking, then no
|
||||
events are required. This method returns the events needed for a given
|
||||
deploy.
|
||||
received from other components within the OpenStack ecosystem. This
|
||||
method returns the events neutron needs for a given deploy.
|
||||
"""
|
||||
# See libvirt's driver.py -> _get_neutron_events method for
|
||||
# more information.
|
||||
if (utils.is_neutron() and CONF.vif_plugging_is_fatal and
|
||||
CONF.vif_plugging_timeout):
|
||||
if CONF.vif_plugging_is_fatal and CONF.vif_plugging_timeout:
|
||||
return [('network-vif-plugged', network_info['id'])
|
||||
for network_info in self.crt_network_infos
|
||||
if not network_info.get('active', True)]
|
||||
else:
|
||||
return []
|
||||
|
||||
def revert(self, lpar_wrap, result, flow_failures):
|
||||
if not self.network_infos:
|
||||
|
|
Loading…
Reference in New Issue