diff options
| author | Jenkins <jenkins@review.openstack.org> | 2012-03-07 01:45:33 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2012-03-07 01:45:33 +0000 |
| commit | 52d2ba8237d72b98cae63af65fc8ec00fa50bac4 (patch) | |
| tree | d28549dc8f1064b8047da57908890070f9d2c97f /nova/tests | |
| parent | 11ba52fb202ad58a6133cf7b80886cb539117981 (diff) | |
| parent | 0c7a54b3b44f849bf397bb4068ab16c576c3559c (diff) | |
Merge "Setup and teardown networks during migration"
Diffstat (limited to 'nova/tests')
| -rw-r--r-- | nova/tests/api/ec2/test_cloud.py | 3 | ||||
| -rw-r--r-- | nova/tests/test_compute.py | 8 | ||||
| -rw-r--r-- | nova/tests/test_network.py | 2 |
3 files changed, 11 insertions, 2 deletions
diff --git a/nova/tests/api/ec2/test_cloud.py b/nova/tests/api/ec2/test_cloud.py index 52cb670ca..5a64f237e 100644 --- a/nova/tests/api/ec2/test_cloud.py +++ b/nova/tests/api/ec2/test_cloud.py @@ -218,7 +218,8 @@ class CloudTestCase(test.TestCase): public_ip=address) self.cloud.release_address(self.context, public_ip=address) - self.network.deallocate_fixed_ip(self.context, fixed_ips[0]['address']) + self.network.deallocate_fixed_ip(self.context, fixed_ips[0]['address'], + inst['host']) db.instance_destroy(self.context, inst['id']) db.floating_ip_destroy(self.context, address) diff --git a/nova/tests/test_compute.py b/nova/tests/test_compute.py index 24a383f80..3b784dfa1 100644 --- a/nova/tests/test_compute.py +++ b/nova/tests/test_compute.py @@ -1387,6 +1387,10 @@ class ComputeTestCase(BaseTestCase): 'disk': None} }).AndRaise(rpc.common.RemoteError('', '', '')) # mocks for rollback + rpc.call(c, 'network', {'method': 'setup_networks_on_host', + 'args': {'instance_id': instance_id, + 'host': self.compute.host, + 'teardown': False}}) rpc.call(c, topic, {"method": "remove_volume_connection", "args": {'instance_id': instance_id, 'volume_id': volume_id}}) @@ -1455,6 +1459,10 @@ class ComputeTestCase(BaseTestCase): self.mox.StubOutWithMock(self.compute.driver, 'unfilter_instance') self.compute.driver.unfilter_instance(i_ref, []) self.mox.StubOutWithMock(rpc, 'call') + rpc.call(c, 'network', {'method': 'setup_networks_on_host', + 'args': {'instance_id': instance_id, + 'host': self.compute.host, + 'teardown': True}}) rpc.call(c, db.queue_get_for(c, FLAGS.compute_topic, dest), {"method": "post_live_migration_at_destination", "args": {'instance_id': i_ref['id'], 'block_migration': False}}) diff --git a/nova/tests/test_network.py b/nova/tests/test_network.py index 05b931617..ba9dd6e12 100644 --- a/nova/tests/test_network.py +++ b/nova/tests/test_network.py @@ -838,7 +838,7 @@ class VlanNetworkTestCase(test.TestCase): # Clean up the ip addresses self.network.disassociate_floating_ip(context1, float_addr) self.network.deallocate_floating_ip(context1, float_addr) - self.network.deallocate_fixed_ip(context1, fix_addr) + self.network.deallocate_fixed_ip(context1, fix_addr, 'fake') db.floating_ip_destroy(context1.elevated(), float_addr) db.fixed_ip_disassociate(context1.elevated(), fix_addr) |
