fix bug where nova driver exits with no adminPass

This commit is contained in:
Daniel Wallace 2015-12-31 02:58:53 -06:00
parent 3652dbae76
commit 1b98f7af38
2 changed files with 4 additions and 1 deletions

View file

@ -633,6 +633,9 @@ def request_instance(vm_=None, call=None):
vm_['name'], exc
)
)
if data.extra.get('password', None) is None and vm_.get('key_filename', None) is None:
raise SaltCloudSystemExit('No password returned. Set ssh_key_file.')
vm_['password'] = data.extra.get('password', '')
return data, vm_

View file

@ -336,7 +336,7 @@ class SaltNova(OpenStackComputeShell):
)
response = nt_ks.servers.create(**kwargs)
self.uuid = response.id
self.password = response.adminPass
self.password = getattr(response, 'adminPass', None)
start = time.time()
trycount = 0