diff options
| author | Cory Wright <cory.wright@rackspace.com> | 2011-03-04 17:48:28 +0000 |
|---|---|---|
| committer | Cory Wright <cory.wright@rackspace.com> | 2011-03-04 17:48:28 +0000 |
| commit | 68d894be2ec3b4eaa14dc5c90143f45f7db1e4b8 (patch) | |
| tree | db72e2cde9511e9c93b15543e44945feeb014730 /nova/compute | |
| parent | 6321c5047c082bba8edf10a660fdb6a56430cc44 (diff) | |
| download | nova-68d894be2ec3b4eaa14dc5c90143f45f7db1e4b8.tar.gz nova-68d894be2ec3b4eaa14dc5c90143f45f7db1e4b8.tar.xz nova-68d894be2ec3b4eaa14dc5c90143f45f7db1e4b8.zip | |
* Tests to verify correct vm-params for Windows and Linux instances
Diffstat (limited to 'nova/compute')
| -rw-r--r-- | nova/compute/api.py | 5 |
1 files changed, 4 insertions, 1 deletions
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) |
