mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 03:41:25 -07:00
Merge branch 'nova-compute-enhancements' of git://github.com/emonty/ansible into devel
Conflicts: lib/ansible/module_utils/openstack.py library/cloud/nova_compute
This commit is contained in:
commit
66eddfd491
4 changed files with 359 additions and 31 deletions
|
@ -54,3 +54,16 @@ def openstack_argument_spec():
|
|||
else:
|
||||
spec['login_tenant_name'] = dict(required=True)
|
||||
return spec
|
||||
|
||||
def openstack_find_nova_addresses(addresses, ext_tag, key_name=None):
|
||||
|
||||
ret = []
|
||||
for (k, v) in addresses.iteritems():
|
||||
if key_name and k == key_name:
|
||||
ret.extend([addrs['addr'] for addrs in v])
|
||||
else:
|
||||
for interface_spec in v:
|
||||
if 'OS-EXT-IPS:type' in interface_spec and interface_spec['OS-EXT-IPS:type'] == ext_tag:
|
||||
ret.append(interface_spec['addr'])
|
||||
return ret
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue