openstack: iterate through nova addresses with six (#18408)
This commit is contained in:
parent
4dba83afc5
commit
a9a2f12adb
1 changed files with 2 additions and 1 deletions
|
@ -28,6 +28,7 @@
|
|||
|
||||
import os
|
||||
|
||||
from ansible.module_utils.six import iteritems
|
||||
|
||||
def openstack_argument_spec():
|
||||
# DEPRECATED: This argument spec is only used for the deprecated old
|
||||
|
@ -61,7 +62,7 @@ def openstack_argument_spec():
|
|||
def openstack_find_nova_addresses(addresses, ext_tag, key_name=None):
|
||||
|
||||
ret = []
|
||||
for (k, v) in addresses.iteritems():
|
||||
for (k, v) in iteritems(addresses):
|
||||
if key_name and k == key_name:
|
||||
ret.extend([addrs['addr'] for addrs in v])
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue