mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-26 14:41:23 -07:00
vmware_guest: import iteritems (#19821)
Without this change you get this on Python 2.7.5: NameError: global name 'iteritems' is not defined
This commit is contained in:
parent
0ca3800ae1
commit
0d9392a3bc
1 changed files with 10 additions and 11 deletions
|
@ -327,6 +327,16 @@ instance:
|
||||||
sample: None
|
sample: None
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
import os
|
||||||
|
import time
|
||||||
|
from netaddr import IPNetwork, IPAddress
|
||||||
|
|
||||||
|
# import module snippets
|
||||||
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
|
from ansible.module_utils.six import iteritems
|
||||||
|
from ansible.module_utils.urls import fetch_url
|
||||||
|
from ansible.module_utils.vmware import get_all_objs, connect_to_api
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import json
|
import json
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
@ -341,13 +351,6 @@ try:
|
||||||
except ImportError:
|
except ImportError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
import os
|
|
||||||
import time
|
|
||||||
from netaddr import IPNetwork, IPAddress
|
|
||||||
|
|
||||||
from ansible.module_utils.urls import fetch_url
|
|
||||||
|
|
||||||
|
|
||||||
class PyVmomiDeviceHelper(object):
|
class PyVmomiDeviceHelper(object):
|
||||||
""" This class is a helper to create easily VMWare Objects for PyVmomiHelper """
|
""" This class is a helper to create easily VMWare Objects for PyVmomiHelper """
|
||||||
|
|
||||||
|
@ -1715,9 +1718,5 @@ def main():
|
||||||
else:
|
else:
|
||||||
module.exit_json(**result)
|
module.exit_json(**result)
|
||||||
|
|
||||||
|
|
||||||
from ansible.module_utils.vmware import *
|
|
||||||
from ansible.module_utils.basic import *
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue