Skip to content

Commit

Permalink
set admin password during instance creation
Browse files Browse the repository at this point in the history
Fix bug #1026650

Change-Id: Ie52751021275d1c7f718b84e7a2e66420131ce4d
  • Loading branch information
Alessio Ababilov committed Jul 23, 2012
1 parent 186a38c commit cdae4e1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion novaclient/v1_1/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ def _boot(self, resource_url, response_key, name, image, flavor,
reservation_id=None, return_raw=False, min_count=None,
max_count=None, security_groups=None, key_name=None,
availability_zone=None, block_device_mapping=None, nics=None,
scheduler_hints=None, config_drive=None, **kwargs):
scheduler_hints=None, config_drive=None, admin_pass=None,
**kwargs):
"""
Create (boot) a new server.
Expand Down Expand Up @@ -61,6 +62,7 @@ def _boot(self, resource_url, response_key, name, image, flavor,
specified by the client to help boot an instance.
:param config_drive: (optional extension) value for config drive
either boolean, or volume-id
:param admin_pass: admin password for the server.
"""
body = {"server": {
"name": name,
Expand All @@ -81,6 +83,8 @@ def _boot(self, resource_url, response_key, name, image, flavor,
body['os:scheduler_hints'] = scheduler_hints
if config_drive:
body["server"]["config_drive"] = config_drive
if admin_pass:
body["server"]["adminPass"] = admin_pass
if not min_count:
min_count = 1
if not max_count:
Expand Down

0 comments on commit cdae4e1

Please sign in to comment.