diff options
| author | Jenkins <jenkins@review.openstack.org> | 2012-02-08 18:52:04 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2012-02-08 18:52:04 +0000 |
| commit | 2b1c523026ea07e4fa4e7ff42e345b9dcbca23f6 (patch) | |
| tree | 3f9219ee8cd7b2a78086fad110e2d8f242e50630 /nova/api | |
| parent | 3432aa51a00e96db06dcbb88948b82e1dca4cd75 (diff) | |
| parent | 229221ec9780112981aedfc8849272aa49a9b25b (diff) | |
Merge "Fix bug 921814 changes handling of adminPass in API."
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/openstack/compute/servers.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/nova/api/openstack/compute/servers.py b/nova/api/openstack/compute/servers.py index 8f9ee01df..57adf22ae 100644 --- a/nova/api/openstack/compute/servers.py +++ b/nova/api/openstack/compute/servers.py @@ -784,7 +784,8 @@ class Controller(wsgi.Controller): if '_is_precooked' in server['server'].keys(): del server['server']['_is_precooked'] else: - server['server']['adminPass'] = password + if FLAGS.enable_instance_password: + server['server']['adminPass'] = password robj = wsgi.ResponseObject(server) @@ -1107,7 +1108,9 @@ class Controller(wsgi.Controller): view = self._view_builder.show(req, instance) # Add on the adminPass attribute since the view doesn't do it - view['server']['adminPass'] = password + # unless instance passwords are disabled + if FLAGS.enable_instance_password: + view['server']['adminPass'] = password robj = wsgi.ResponseObject(view) return self._add_location(robj) |
