mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
Resolve module correctly (#25658)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
committed by
jctanner
parent
ed15a0e9a7
commit
29f5fe3ddd
@@ -85,6 +85,8 @@ try:
|
|||||||
HAS_PYVMOMI = True
|
HAS_PYVMOMI = True
|
||||||
except ImportError:
|
except ImportError:
|
||||||
HAS_PYVMOMI = False
|
HAS_PYVMOMI = False
|
||||||
|
from ansible.module_utils.vmware import vmware_argument_spec, find_dvs_by_name, find_hostsystem_by_name, connect_to_api, find_dvspg_by_name
|
||||||
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
|
|
||||||
|
|
||||||
class VMwareMigrateVmk(object):
|
class VMwareMigrateVmk(object):
|
||||||
@@ -189,13 +191,11 @@ def main():
|
|||||||
module = AnsibleModule(argument_spec=argument_spec, supports_check_mode=False)
|
module = AnsibleModule(argument_spec=argument_spec, supports_check_mode=False)
|
||||||
|
|
||||||
if not HAS_PYVMOMI:
|
if not HAS_PYVMOMI:
|
||||||
self.module.fail_json(msg='pyvmomi required for this module')
|
module.fail_json(msg='pyvmomi required for this module')
|
||||||
|
|
||||||
vmware_migrate_vmk = VMwareMigrateVmk(module)
|
vmware_migrate_vmk = VMwareMigrateVmk(module)
|
||||||
vmware_migrate_vmk.process_state()
|
vmware_migrate_vmk.process_state()
|
||||||
|
|
||||||
from ansible.module_utils.vmware import *
|
|
||||||
from ansible.module_utils.basic import *
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
|||||||
Reference in New Issue
Block a user