From ed80ed615762e0ff24235b7d57fa8b356c659e11 Mon Sep 17 00:00:00 2001 From: Vishvananda Ishaya Date: Sun, 12 Aug 2012 10:01:09 -0700 Subject: Key auto_disk_config in create server off of ext. Implements part of blueprint disable-server-extensions Makes sure that auto_disk_config is only accepted in the create server request if the extension is enabled. Note that the extension alias is OS-DCF because it also adds output to the server request. Change-Id: I59fafe769e1e562e6bf9f6db768acc9b0f8d2b93 --- nova/api/openstack/compute/servers.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'nova/api') diff --git a/nova/api/openstack/compute/servers.py b/nova/api/openstack/compute/servers.py index ca446f24b..797c498b8 100644 --- a/nova/api/openstack/compute/servers.py +++ b/nova/api/openstack/compute/servers.py @@ -678,7 +678,9 @@ class Controller(wsgi.Controller): if min_count > max_count: min_count = max_count - auto_disk_config = server_dict.get('auto_disk_config') + auto_disk_config = False + if self.ext_mgr.is_loaded('OS-DCF'): + auto_disk_config = server_dict.get('auto_disk_config') scheduler_hints = {} if self.ext_mgr.is_loaded('os-scheduler-hints'): -- cgit