remove set_host_offline
change_node_power_state action can be used to make a host offline. set_host_offline never be used and the Nova os-hosts API is deprecated. So remove it https://developer.openstack.org/api-ref/compute/?expanded=update-host-status-detail#hosts-os-hosts-deprecated Change-Id: I5f81fc9e2189db39b143d2935540d637bd2d88cc
This commit is contained in:
@@ -115,19 +115,6 @@ class TestNovaHelper(base.TestCase):
|
||||
result = nova_util.stop_instance(instance_id)
|
||||
self.assertFalse(result)
|
||||
|
||||
def test_set_host_offline(self, mock_glance, mock_cinder, mock_neutron,
|
||||
mock_nova):
|
||||
host = mock.MagicMock()
|
||||
nova_util = nova_helper.NovaHelper()
|
||||
nova_util.nova.hosts = mock.MagicMock()
|
||||
nova_util.nova.hosts.get.return_value = host
|
||||
result = nova_util.set_host_offline("rennes")
|
||||
self.assertTrue(result)
|
||||
|
||||
nova_util.nova.hosts.get.return_value = None
|
||||
result = nova_util.set_host_offline("rennes")
|
||||
self.assertFalse(result)
|
||||
|
||||
@mock.patch.object(time, 'sleep', mock.Mock())
|
||||
def test_resize_instance(self, mock_glance, mock_cinder,
|
||||
mock_neutron, mock_nova):
|
||||
|
||||
Reference in New Issue
Block a user