From 68d894be2ec3b4eaa14dc5c90143f45f7db1e4b8 Mon Sep 17 00:00:00 2001 From: Cory Wright Date: Fri, 4 Mar 2011 17:48:28 +0000 Subject: * Tests to verify correct vm-params for Windows and Linux instances --- nova/compute/api.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'nova/compute') diff --git a/nova/compute/api.py b/nova/compute/api.py index 8bdf712a0..d79371e94 100644 --- a/nova/compute/api.py +++ b/nova/compute/api.py @@ -125,7 +125,10 @@ class API(base.Base): raise quota.QuotaError(msg, "MetadataLimitExceeded") image = self.image_service.show(context, image_id) - os_type = image['properties'].get('os_type', 'linux') + + os_type = None + if 'properties' in image and 'os_type' in image['properties']: + os_type = image['properties']['os_type'] if kernel_id is None: kernel_id = image.get('kernel_id', None) -- cgit