From 645c2d3a06bbf8b0854ebcc539ad33dd706866c5 Mon Sep 17 00:00:00 2001 From: Xavier Queralt Date: Wed, 12 Jun 2013 14:59:29 +0200 Subject: Accept is_public=None when listing all flavors nova-client uses a None (with capital N) when listing all the flavors. Right now this is interpreted as a wrong query by n-api preventing us from listing the private flavors using the nova-client. Fixes bug #1190239 Change-Id: I2a9b1c24cd744c8819c1d41e0ad103d05398401c --- nova/api/openstack/compute/flavors.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'nova/api') diff --git a/nova/api/openstack/compute/flavors.py b/nova/api/openstack/compute/flavors.py index 4da130e9b..c6303646a 100644 --- a/nova/api/openstack/compute/flavors.py +++ b/nova/api/openstack/compute/flavors.py @@ -24,6 +24,7 @@ from nova.api.openstack import xmlutil from nova.compute import flavors from nova import exception from nova.openstack.common import strutils +from nova import utils def make_flavor(elem, detailed=False): @@ -98,7 +99,7 @@ class Controller(wsgi.Controller): if is_public is None: # preserve default value of showing only public flavors return True - elif is_public == 'none': + elif utils.is_none_string(is_public): return None else: try: -- cgit