diff options
| author | Trey Morris <trey.morris@rackspace.com> | 2011-08-26 16:55:52 -0500 |
|---|---|---|
| committer | Trey Morris <trey.morris@rackspace.com> | 2011-08-26 16:55:52 -0500 |
| commit | d0f42b4bf6e60485c7bebe1c60dccce48a0ddcb3 (patch) | |
| tree | e3ff138166787fa7d29c694b0c1bf14e54f212f3 | |
| parent | 477510214e80be21a40bff6c053090793653f6a1 (diff) | |
| download | nova-d0f42b4bf6e60485c7bebe1c60dccce48a0ddcb3.tar.gz nova-d0f42b4bf6e60485c7bebe1c60dccce48a0ddcb3.tar.xz nova-d0f42b4bf6e60485c7bebe1c60dccce48a0ddcb3.zip | |
stubbed some stuff in test_libvirt
| -rw-r--r-- | nova/tests/test_libvirt.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/nova/tests/test_libvirt.py b/nova/tests/test_libvirt.py index d8bc9575b..58e78daf4 100644 --- a/nova/tests/test_libvirt.py +++ b/nova/tests/test_libvirt.py @@ -1063,10 +1063,17 @@ class IptablesFirewallTestCase(test.TestCase): return '', '' print cmd, kwargs + def get_fixed_ips(*args, **kwargs): + ips = [] + for network, info in network_info: + ips.extend(info['ips']) + return [ip['ip'] for ip in ips] + from nova.network import linux_net linux_net.iptables_manager.execute = fake_iptables_execute network_info = _fake_network_info(self.stubs, 1) + self.stubs.Set(self.db, 'instance_get_fixed_addresses', get_fixed_ips) self.fw.prepare_instance_filter(instance_ref, network_info) self.fw.apply_instance_filter(instance_ref, network_info) |
