diff options
| author | Jenkins <jenkins@review.openstack.org> | 2011-09-29 16:47:57 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2011-09-29 16:47:57 +0000 |
| commit | bf181c2e322d78e7e3df71c9681555f1ab9f085f (patch) | |
| tree | 4999b0778021cbd8a2d1432689b8e413348ce9ca | |
| parent | a363fd981cc682c875bd4247810910327aae3da0 (diff) | |
| parent | 2dd0445dd60e5f0e845c49adbfb81acbebfc3ea8 (diff) | |
Merge "bug lp845714"
| -rw-r--r-- | nova/tests/test_xenapi.py | 3 | ||||
| -rw-r--r-- | nova/tests/xenapi/stubs.py | 3 | ||||
| -rw-r--r-- | nova/virt/xenapi/fake.py | 6 | ||||
| -rw-r--r-- | nova/virt/xenapi/vmops.py | 5 |
4 files changed, 14 insertions, 3 deletions
diff --git a/nova/tests/test_xenapi.py b/nova/tests/test_xenapi.py index ec0104783..225d51aba 100644 --- a/nova/tests/test_xenapi.py +++ b/nova/tests/test_xenapi.py @@ -82,6 +82,7 @@ class XenAPIVolumeTestCase(test.TestCase): 'image_ref': 1, 'kernel_id': 2, 'ramdisk_id': 3, + 'local_gb': 20, 'instance_type_id': '3', # m1.large 'os_type': 'linux', 'architecture': 'x86-64'} @@ -375,6 +376,7 @@ class XenAPIVMTestCase(test.TestCase): 'image_ref': image_ref, 'kernel_id': kernel_id, 'ramdisk_id': ramdisk_id, + 'local_gb': 20, 'instance_type_id': instance_type_id, 'os_type': os_type, 'hostname': hostname, @@ -651,6 +653,7 @@ class XenAPIVMTestCase(test.TestCase): 'image_ref': 1, 'kernel_id': 2, 'ramdisk_id': 3, + 'local_gb': 20, 'instance_type_id': '3', # m1.large 'os_type': 'linux', 'architecture': 'x86-64'} diff --git a/nova/tests/xenapi/stubs.py b/nova/tests/xenapi/stubs.py index 3b3d494ba..f44d96d20 100644 --- a/nova/tests/xenapi/stubs.py +++ b/nova/tests/xenapi/stubs.py @@ -282,9 +282,6 @@ class FakeSessionForMigrationTests(fake.SessionBase): def VDI_get_by_uuid(self, *args): return 'hurr' - def VDI_resize_online(self, *args): - pass - def VM_start(self, _1, ref, _2, _3): vm = fake.get_record('VM', ref) if vm['power_state'] != 'Halted': diff --git a/nova/virt/xenapi/fake.py b/nova/virt/xenapi/fake.py index 97dfd9fa9..475ed543c 100644 --- a/nova/virt/xenapi/fake.py +++ b/nova/virt/xenapi/fake.py @@ -378,6 +378,12 @@ class SessionBase(object): def host_call_plugin(self, *args): return 'herp' + def VDI_resize_online(self, *args): + return 'derp' + + def VM_clean_reboot(self, *args): + return 'burp' + def network_get_all_records_where(self, _1, filter): return self.xenapi.network.get_all_records() diff --git a/nova/virt/xenapi/vmops.py b/nova/virt/xenapi/vmops.py index 4b1d22bac..aab2a1119 100644 --- a/nova/virt/xenapi/vmops.py +++ b/nova/virt/xenapi/vmops.py @@ -165,6 +165,11 @@ class VMOps(object): instance, instance.image_ref, instance.user_id, instance.project_id, disk_image_type) + + for vdi in vdis: + if vdi["vdi_type"] == "os": + self.resize_instance(instance, vdi["vdi_uuid"]) + return vdis def spawn(self, context, instance, network_info): |
