Fixing response of floating_ip_show to align with other floating ip's. Spelling fix

This commit is contained in:
CEG 2017-06-07 11:33:56 -06:00
parent 58459adbe8
commit 6f66c9d10c
2 changed files with 9 additions and 2 deletions

View file

@ -773,7 +773,7 @@ def request_instance(vm_=None, call=None):
raise SaltCloudSystemExit(
'Error assigning floating_ip for {0} on Nova\n\n'
'The following exception was thrown by libcloud when trying to '
'assing a floating ip: {1}\n'.format(
'assign a floating ip: {1}\n'.format(
vm_['name'], exc
)
)

View file

@ -1145,7 +1145,14 @@ class SaltNova(object):
floating_ips = nt_ks.floating_ips.list()
for floating_ip in floating_ips:
if floating_ip.ip == ip:
return floating_ip
response = {
'ip': floating_ip.ip,
'fixed_ip': floating_ip.fixed_ip,
'id': floating_ip.id,
'instance_id': floating_ip.instance_id,
'pool': floating_ip.pool
}
return response
return {}
def floating_ip_create(self, pool=None):