diff options
| author | Tushar Patil <tushar.vitthal.patil@gmail.com> | 2011-07-11 16:02:46 -0700 |
|---|---|---|
| committer | Tushar Patil <tushar.vitthal.patil@gmail.com> | 2011-07-11 16:02:46 -0700 |
| commit | bf30f9c1d65053aba29ffff8d8d9a3810455a082 (patch) | |
| tree | 8bb1c0b01c14fcafdcfe208b6797cfe432269da8 /nova | |
| parent | e30a9e1516e44d839ebd5b41586a32e99c47b8c9 (diff) | |
fixed all failed unit test cases
Diffstat (limited to 'nova')
| -rw-r--r-- | nova/compute/api.py | 8 | ||||
| -rw-r--r-- | nova/tests/test_network.py | 5 |
2 files changed, 8 insertions, 5 deletions
diff --git a/nova/compute/api.py b/nova/compute/api.py index ddcb23db5..fd7df4560 100644 --- a/nova/compute/api.py +++ b/nova/compute/api.py @@ -366,7 +366,8 @@ class API(base.Base): key_name=None, key_data=None, security_group='default', availability_zone=None, user_data=None, metadata={}, injected_files=None, admin_password=None, zone_blob=None, - reservation_id=None, block_device_mapping=None): + reservation_id=None, block_device_mapping=None, + requested_networks=None): """Provision the instances by passing the whole request to the Scheduler for execution. Returns a Reservation ID related to the creation of all of these instances.""" @@ -378,13 +379,14 @@ class API(base.Base): key_name, key_data, security_group, availability_zone, user_data, metadata, injected_files, admin_password, zone_blob, - reservation_id) + reservation_id, requested_networks) self._ask_scheduler_to_create_instance(context, base_options, instance_type, zone_blob, availability_zone, injected_files, admin_password, - num_instances=num_instances) + num_instances=num_instances, + requested_networks=requested_networks) return base_options['reservation_id'] diff --git a/nova/tests/test_network.py b/nova/tests/test_network.py index 6d5166019..30e1c0512 100644 --- a/nova/tests/test_network.py +++ b/nova/tests/test_network.py @@ -211,12 +211,13 @@ class VlanNetworkTestCase(test.TestCase): self.network.allocate_fixed_ip(None, 0, network, vpn=True) def test_allocate_fixed_ip(self): - self.mox.StubOutWithMock(db, 'fixed_ip_associate_pool') + self.mox.StubOutWithMock(db, 'fixed_ip_associate_by_address') self.mox.StubOutWithMock(db, 'fixed_ip_update') self.mox.StubOutWithMock(db, 'virtual_interface_get_by_instance_and_network') - db.fixed_ip_associate_pool(mox.IgnoreArg(), + db.fixed_ip_associate_by_address(mox.IgnoreArg(), + mox.IgnoreArg(), mox.IgnoreArg(), mox.IgnoreArg()).AndReturn('192.168.0.1') db.fixed_ip_update(mox.IgnoreArg(), |
