Merge pull request #13101 from grischa/nova-cloud-fixes

some fixes for the nova cloud adapter
This commit is contained in:
Joseph Hall 2014-05-29 00:43:47 -06:00
commit e9ac938b73
2 changed files with 4 additions and 3 deletions

View File

@ -758,7 +758,8 @@ def list_nodes(call=None, **kwargs):
'image': server_tmp['image']['id'],
'size': server_tmp['flavor']['id'],
'state': server_tmp['state'],
'private_ips': [addrs['addr'] for addrs in server_tmp['addresses']['private']],
'private_ips': [addrs['addr'] for addrs in
server_tmp['addresses'].get('private', [])],
'public_ips': [server_tmp['accessIPv4'], server_tmp['accessIPv6']],
}
return ret

View File

@ -153,7 +153,7 @@ class SaltNova(object):
self.kwargs['bypass_url'] = get_entry(
servers_endpoints,
'region',
region_name.upper()
region_name
)['publicURL']
self.compute_conn = client.Client(**self.kwargs)
@ -167,7 +167,7 @@ class SaltNova(object):
self.kwargs['bypass_url'] = get_entry(
servers_endpoints,
'region',
region_name.upper()
region_name
)['publicURL']
self.kwargs['service_type'] = 'volume'