Commit cad4254d authored by Christos Stavrakakis's avatar Christos Stavrakakis
Browse files

Totally remove password from create_instance

Never pass password as an 'osparam' to Ganeti. Always use the vmapi,
even for VMs created with server-create management command.
parent 6f4f4820
......@@ -162,7 +162,7 @@ class Command(BaseCommand):
try:
# Create the instance in Backend
jobID = create_instance(vm, nic, flavor, image, password)
jobID = create_instance(vm, nic, flavor, image)
vm.backendjobid = jobID
vm.save()
......
......@@ -349,7 +349,7 @@ def create_instance_diagnostic(vm, message, source, level="DEBUG", etime=None,
details=details)
def create_instance(vm, public_nic, flavor, image, password=None):
def create_instance(vm, public_nic, flavor, image):
"""`image` is a dictionary which should contain the keys:
'backend_id', 'format' and 'metadata'
......@@ -401,10 +401,6 @@ def create_instance(vm, public_nic, flavor, image, password=None):
'img_id': image['backend_id'],
'img_format': image['format']}
if password:
# Only for admin created VMs !!
kw['osparams']['img_passwd'] = password
# Defined in settings.GANETI_CREATEINSTANCE_KWARGS
# kw['hvparams'] = dict(serial_console=False)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment