From 6de51fc650432a359b0de3cd511f51a9c25cb0c4 Mon Sep 17 00:00:00 2001 From: divakar-padiyar-nandavar Date: Wed, 6 Mar 2013 08:38:09 -0700 Subject: Fixed image filter support for vmware The vmware compute driver does not support the image filter based on hypervisor_type. In a heterogeneous environment, this filter attribute allows us to provision an instance to a specific hypervisor based on the property of the glance image. The solution is to populate the dictionary 'supported_instances' from the vmware compute driver. Fix for bug 1131542 Change-Id: I6ebf9f0d4a17b3083f66f69f077f910552d9a951 --- nova/virt/vmwareapi/host.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nova/virt/vmwareapi/host.py b/nova/virt/vmwareapi/host.py index 9d11901d6..95d86311c 100644 --- a/nova/virt/vmwareapi/host.py +++ b/nova/virt/vmwareapi/host.py @@ -1,5 +1,5 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 - +# Copyright (c) 2013 Hewlett-Packard Development Company, L.P. # Copyright (c) 2012 VMware, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may @@ -135,6 +135,8 @@ class HostState(object): data["hypervisor_type"] = summary.config.product.name data["hypervisor_version"] = summary.config.product.version data["hypervisor_hostname"] = self._host_name + data["supported_instances"] = [('i686', 'vmware', 'hvm'), + ('x86_64', 'vmware', 'hvm')] self._stats = data return data -- cgit