summaryrefslogtreecommitdiffstats
path: root/nova/tests
diff options
context:
space:
mode:
authorGary Kotton <gkotton@redhat.com>2013-02-12 09:48:13 +0000
committerGary Kotton <gkotton@redhat.com>2013-02-12 15:14:12 +0000
commit55af31cfec74244de4efbc7187a548972c4d99f3 (patch)
treec984cbc85d9e030f05bcd61955891bd040e6e622 /nova/tests
parentb64c53e0368ea63d8cd4beb71dabce9987b9bb54 (diff)
Ensure that only one IP address is allocated.
Fixes bug 1122899 Change-Id: I03f7509977a37bfcb8f1698a83638be3079065a0
Diffstat (limited to 'nova/tests')
-rw-r--r--nova/tests/network/test_quantumv2.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/nova/tests/network/test_quantumv2.py b/nova/tests/network/test_quantumv2.py
index 1805044a1..f3f306694 100644
--- a/nova/tests/network/test_quantumv2.py
+++ b/nova/tests/network/test_quantumv2.py
@@ -189,6 +189,16 @@ class TestQuantumv2(test.TestCase):
'gateway_ip': '10.0.1.1',
'dns_nameservers': ['8.8.1.1', '8.8.1.2']}]
self.subnet_data2 = []
+ self.subnet_data_n = [{'id': 'my_subid1',
+ 'cidr': '10.0.1.0/24',
+ 'network_id': 'my_netid1',
+ 'gateway_ip': '10.0.1.1',
+ 'dns_nameservers': ['8.8.1.1', '8.8.1.2']},
+ {'id': 'my_subid2',
+ 'cidr': '20.0.1.0/24',
+ 'network_id': 'my_netid2',
+ 'gateway_ip': '20.0.1.1',
+ 'dns_nameservers': ['8.8.1.1', '8.8.1.2']}]
self.subnet_data2.append({'id': 'my_subid2',
'cidr': '10.0.2.0/24',
'network_id': 'my_netid2',
@@ -1010,7 +1020,7 @@ class TestQuantumv2(test.TestCase):
network_id = 'my_netid1'
search_opts = {'network_id': network_id}
self.moxed_client.list_subnets(
- **search_opts).AndReturn({'subnets': self.subnet_data1})
+ **search_opts).AndReturn({'subnets': self.subnet_data_n})
zone = 'compute:%s' % self.instance['availability_zone']
search_opts = {'device_id': self.instance['uuid'],