Add password parameter to the set_admin_password call in the compute api.
Updated servers password to use this parameter.
This commit is contained in:
@@ -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):
|
||||
|
||||
@@ -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."""
|
||||
|
||||
Reference in New Issue
Block a user