summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
authorRick Harris <rick.harris@rackspace.com>2011-02-14 23:12:34 +0000
committerRick Harris <rick.harris@rackspace.com>2011-02-14 23:12:34 +0000
commit41e4e18a0324593c0076c3936d63bb6dcca487cb (patch)
tree7fa95340c6726a0edc7cca4b1d1d9e5f439b93a3 /nova/api
parentc42ace8e605b987e683372efb4913d85ee472a70 (diff)
First cut on XenServer unified-images
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/openstack/servers.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/nova/api/openstack/servers.py b/nova/api/openstack/servers.py
index 17c5519a1..1c9dcd9a6 100644
--- a/nova/api/openstack/servers.py
+++ b/nova/api/openstack/servers.py
@@ -140,7 +140,11 @@ class Controller(wsgi.Controller):
image_id = str(image_id)
image = self._image_service.show(req.environ['nova.context'], image_id)
- return lookup('kernel_id'), lookup('ramdisk_id')
+ disk_format = image['properties'].get('disk_format', None)
+ if disk_format == "vhd":
+ return None, None
+ else:
+ return lookup('kernel_id'), lookup('ramdisk_id')
def create(self, req):
""" Creates a new server for a given user """