diff options
| author | Dan Prince <dan.prince@rackspace.com> | 2011-03-09 14:53:44 -0500 |
|---|---|---|
| committer | Dan Prince <dan.prince@rackspace.com> | 2011-03-09 14:53:44 -0500 |
| commit | a9bd1b456332aaf5f6ab9942979485f2192b6f3e (patch) | |
| tree | 894d3f413f97e20a26cfc9f5a31ffc95ca0f77ea /nova | |
| parent | eadce208c55513ddbab550898e641b8ee55a67ec (diff) | |
| download | nova-a9bd1b456332aaf5f6ab9942979485f2192b6f3e.tar.gz nova-a9bd1b456332aaf5f6ab9942979485f2192b6f3e.tar.xz nova-a9bd1b456332aaf5f6ab9942979485f2192b6f3e.zip | |
Add password parameter to the set_admin_password call in the compute api.
Updated servers password to use this parameter.
Diffstat (limited to 'nova')
| -rw-r--r-- | nova/api/openstack/servers.py | 3 | ||||
| -rw-r--r-- | nova/compute/api.py | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/nova/api/openstack/servers.py b/nova/api/openstack/servers.py index 7222285e0..41166f810 100644 --- a/nova/api/openstack/servers.py +++ b/nova/api/openstack/servers.py @@ -183,7 +183,8 @@ class Controller(wsgi.Controller): password = "%s%s" % (server['server']['name'][:4], utils.generate_password(12)) server['server']['adminPass'] = password - self.compute_api.set_admin_password(context, server['server']['id']) + self.compute_api.set_admin_password(context, server['server']['id'], + password) return server def update(self, req, id): diff --git a/nova/compute/api.py b/nova/compute/api.py index 33d25fc4b..a0bb2cf04 100644 --- a/nova/compute/api.py +++ b/nova/compute/api.py @@ -498,9 +498,10 @@ class API(base.Base): """Unrescue the given instance.""" self._cast_compute_message('unrescue_instance', context, instance_id) - def set_admin_password(self, context, instance_id): + def set_admin_password(self, context, instance_id, password=None): """Set the root/admin password for the given instance.""" - self._cast_compute_message('set_admin_password', context, instance_id) + self._cast_compute_message('set_admin_password', context, instance_id, + password) def inject_file(self, context, instance_id): """Write a file to the given instance.""" |
