summaryrefslogtreecommitdiff
path: root/ironic/tests/unit/dhcp
diff options
context:
space:
mode:
authorVasyl Saienko <vsaienko@mirantis.com>2016-11-17 11:03:00 +0200
committerRuby Loo <ruby.loo@intel.com>2016-11-21 23:00:39 +0000
commita9a1293312ca67c5e5dbb258146832516a41e939 (patch)
tree0789f1156653ebfe5459b039ec6148aeb68faefc /ironic/tests/unit/dhcp
parent6ef7e23aa35502f94fa5b0fc38244b0cd9d4bc25 (diff)
downloadironic-a9a1293312ca67c5e5dbb258146832516a41e939.tar.gz
Remove deprecated Neutron DHCP provider methods
This patch removes deprecated methods from Neutron DHCP provider: * create_cleaning_ports * delete_cleaning_ports Also drop related methods from deploy_utils in ironic.drivers.modules * prepare_cleaning_ports * tear_down_cleaning_ports If you have your own custom ironic DHCP provider that implements cleaning methods, you may need to update your code to use the add_cleaning_network() and remove_cleaning_network() network interface methods. They were deprecated in I0c26582b6b6e9d32650ff3e2b9a3269c3c2d5454 Change-Id: I758e5b21028a4dfcca9c907c63020d0cfca4e37d Closes-Bug: #1642512
Diffstat (limited to 'ironic/tests/unit/dhcp')
-rw-r--r--ironic/tests/unit/dhcp/test_neutron.py32
1 files changed, 0 insertions, 32 deletions
diff --git a/ironic/tests/unit/dhcp/test_neutron.py b/ironic/tests/unit/dhcp/test_neutron.py
index e9e867d6e..00ef5f874 100644
--- a/ironic/tests/unit/dhcp/test_neutron.py
+++ b/ironic/tests/unit/dhcp/test_neutron.py
@@ -507,35 +507,3 @@ class TestNeutron(db_base.DbTestCase):
get_ip_mock.assert_has_calls(
[mock.call(task, task.ports[0], mock.ANY),
mock.call(task, task.portgroups[0], mock.ANY)])
-
- @mock.patch.object(neutron, 'create_cleaning_ports_deprecation', False)
- @mock.patch.object(neutron, 'LOG', autospec=True)
- def test_create_cleaning_ports(self, log_mock):
- self.config(cleaning_network_uuid=uuidutils.generate_uuid(),
- group='neutron')
- api = dhcp_factory.DHCPFactory().provider
-
- with task_manager.acquire(self.context, self.node.uuid) as task:
- with mock.patch.object(
- task.driver.network, 'add_cleaning_network',
- autospec=True) as add_net_mock:
- api.create_cleaning_ports(task)
- add_net_mock.assert_called_once_with(task)
-
- api.create_cleaning_ports(task)
- self.assertEqual(1, log_mock.warning.call_count)
-
- @mock.patch.object(neutron, 'delete_cleaning_ports_deprecation', False)
- @mock.patch.object(neutron, 'LOG', autospec=True)
- def test_delete_cleaning_ports(self, log_mock):
- api = dhcp_factory.DHCPFactory().provider
-
- with task_manager.acquire(self.context, self.node.uuid) as task:
- with mock.patch.object(
- task.driver.network, 'remove_cleaning_network',
- autospec=True) as rm_net_mock:
- api.delete_cleaning_ports(task)
- rm_net_mock.assert_called_once_with(task)
-
- api.delete_cleaning_ports(task)
- self.assertEqual(1, log_mock.warning.call_count)