From 9893c3eb5794e689736e881ec0551bdfeda48d8f Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Wed, 1 Aug 2012 11:24:59 -0400 Subject: Remove agent_update from the compute manager. It appears that this method of the compute method has never been used since it was added in fa0b64b500f3a196044459ba4bf8ed0dea214e92, so just remove it. It was also added to the virt driver API, but the only use is internally to the xenapi driver, so leave it as an internal thing to that driver only. Part of blueprint no-db-messaging. Change-Id: Idb2c823421e714fa364affbbb80d28175b9b5b4e --- nova/tests/compute/test_compute.py | 20 -------------------- nova/tests/test_virt_drivers.py | 6 ------ 2 files changed, 26 deletions(-) (limited to 'nova/tests') diff --git a/nova/tests/compute/test_compute.py b/nova/tests/compute/test_compute.py index 4988a4be9..d59753d58 100644 --- a/nova/tests/compute/test_compute.py +++ b/nova/tests/compute/test_compute.py @@ -766,26 +766,6 @@ class ComputeTestCase(BaseTestCase): self.compute.terminate_instance(self.context, instance=instance) - def test_agent_update(self): - """Ensure instance can have its agent updated""" - called = {'agent_update': False} - - def fake_driver_agent_update(self2, instance, url, md5hash): - called['agent_update'] = True - self.assertEqual(url, 'http://fake/url/') - self.assertEqual(md5hash, 'fakehash') - - self.stubs.Set(nova.virt.fake.FakeDriver, 'agent_update', - fake_driver_agent_update) - - instance = self._create_fake_instance() - self.compute.run_instance(self.context, instance['uuid']) - self.compute.agent_update(self.context, instance['uuid'], - 'http://fake/url/', 'fakehash') - self.assertTrue(called['agent_update']) - self.compute.terminate_instance(self.context, - instance=jsonutils.to_primitive(instance)) - def test_snapshot(self): """Ensure instance can be snapshotted""" instance = jsonutils.to_primitive(self._create_fake_instance()) diff --git a/nova/tests/test_virt_drivers.py b/nova/tests/test_virt_drivers.py index b724c2276..fb109731f 100644 --- a/nova/tests/test_virt_drivers.py +++ b/nova/tests/test_virt_drivers.py @@ -258,12 +258,6 @@ class _VirtDriverTestCase(_FakeDriverBackendTestCase): base64.b64encode('/testfile'), base64.b64encode('testcontents')) - @catch_notimplementederror - def test_agent_update(self): - instance_ref, network_info = self._get_running_instance() - self.connection.agent_update(instance_ref, 'http://www.openstack.org/', - 'd41d8cd98f00b204e9800998ecf8427e') - @catch_notimplementederror def test_resume_state_on_host_boot(self): instance_ref, network_info = self._get_running_instance() -- cgit