Skip to content

Commit ce0962c

Browse files
committed
Fix deprecated imports and add changelog fragment
- Replace deprecated ansible.module_utils._text import with ansible.module_utils.common.text.converters - Use base_argument_spec from vmware.vmware collection - Update documentation fragment to vmware.vmware.base_options - Add changelog fragment for new vcenter_object_move module
1 parent 1e10c3e commit ce0962c

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
minor_changes:
2+
- vcenter_object_move - New module to move vCenter inventory objects to specified destination folder
3+
(https://github.com/ansible-collections/community.vmware/pull/2346).

plugins/modules/vcenter_object_move.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@
1414

1515
from typing import cast
1616

17-
from ansible.module_utils._text import to_native
1817
from ansible.module_utils.basic import AnsibleModule
18+
from ansible.module_utils.common.text.converters import to_native
1919
from ansible_collections.community.vmware.plugins.module_utils.vmware import (
2020
PyVmomi,
2121
find_datacenter_by_name,
22-
vmware_argument_spec,
2322
wait_for_task,
2423
)
24+
from ansible_collections.vmware.vmware.plugins.module_utils.argument_spec import base_argument_spec
2525
from pyVmomi import vim
2626

2727
DOCUMENTATION = r"""
@@ -75,7 +75,7 @@
7575
default: present
7676
choices: [ present ]
7777
extends_documentation_fragment:
78-
- community.vmware.vmware.documentation
78+
- vmware.vmware.base_options
7979
"""
8080

8181
EXAMPLES = r"""
@@ -298,7 +298,7 @@ def main():
298298
Main entry point for the module. Validates parameters,
299299
performs the move operation, and exits with the result.
300300
"""
301-
argument_spec = vmware_argument_spec()
301+
argument_spec = base_argument_spec()
302302
argument_spec.update(
303303
{
304304
"datacenter": {

0 commit comments

Comments
 (0)