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
|
||||
"""
|
||||
|
||||
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:
|
||||
import json
|
||||
except ImportError:
|
||||
|
@ -341,13 +351,6 @@ try:
|
|||
except ImportError:
|
||||
pass
|
||||
|
||||
import os
|
||||
import time
|
||||
from netaddr import IPNetwork, IPAddress
|
||||
|
||||
from ansible.module_utils.urls import fetch_url
|
||||
|
||||
|
||||
class PyVmomiDeviceHelper(object):
|
||||
""" This class is a helper to create easily VMWare Objects for PyVmomiHelper """
|
||||
|
||||
|
@ -1715,9 +1718,5 @@ def main():
|
|||
else:
|
||||
module.exit_json(**result)
|
||||
|
||||
|
||||
from ansible.module_utils.vmware import *
|
||||
from ansible.module_utils.basic import *
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
Loading…
Reference in a new issue