We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
vmware_guest_snapshot_info documentation is outdated on website, as folder is now a required parameter
_From @NeverUsedID on Jun 17, 2020 08:57_

<!--- Verify first that your improvement is not already reported on GitHub -->
<!--- Also test if the latest release and devel branch are affected too -->
<!--- Complete *all* sections as described, this form is processed automatically -->

##### SUMMARY
Like in https://github.com/ansible/ansible/issues/22644 for vmware_guest_snapshot,  the documentation for vmware_guest_snapshot_info is outdated, as the folder parameter is now REQUIRED.

<!--- HINT: Did you know the documentation has an "Edit on GitHub" link on every page ? -->

The "Edit on Github Button" does not work, as it throws a 404

##### ISSUE TYPE
- Documentation Report

##### COMPONENT NAME

vmware_guest_snapshot_info


##### ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes -->
```
ansible 2.9.9
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/home/ansible/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/dist-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.12 (default, Apr 15 2020, 17:07:12) [GCC 5.4.0 20160609]

```

##### CONFIGURATION
<!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes -->
```paste below

```

##### OS / ENVIRONMENT
<!--- Provide all relevant information below, e.g. OS version, browser, etc. -->

##### ADDITIONAL INFORMATION
<!--- Describe how this improves the documentation, e.g. before/after situation or screenshots -->

<!--- HINT: You can paste gist.github.com links for larger files -->


_Copied from original issue: ansible/ansible#70111_

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `plugins/modules/vmware_guest_snapshot_info.py`
Content:
```
1 #!/usr/bin/python
2 # -*- coding: utf-8 -*-
3 
4 # Copyright: (c) 2018, Ansible Project
5 # Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>
6 # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
7 
8 from __future__ import absolute_import, division, print_function
9 __metaclass__ = type
10 
11 
12 DOCUMENTATION = '''
13 ---
14 module: vmware_guest_snapshot_info
15 short_description: Gather info about virtual machine's snapshots in vCenter
16 description:
17     - This module can be used to gather information about virtual machine's snapshots.
18     - This module was called C(vmware_guest_snapshot_facts) before Ansible 2.9. The usage did not change.
19 author:
20     - Abhijeet Kasurde (@Akasurde)
21 notes:
22     - Tested on vSphere 6.0 and 6.5
23 requirements:
24     - "python >= 2.6"
25     - PyVmomi
26 options:
27    name:
28      description:
29      - Name of the VM to work with.
30      - This is required if C(uuid) or C(moid) is not supplied.
31      type: str
32    uuid:
33      description:
34      - UUID of the instance to manage if known, this is VMware's BIOS UUID by default.
35      - This is required if C(name) or C(moid) parameter is not supplied.
36      - The C(folder) is ignored, if C(uuid) is provided.
37      type: str
38    moid:
39      description:
40      - Managed Object ID of the instance to manage if known, this is a unique identifier only within a single vCenter instance.
41      - This is required if C(name) or C(uuid) is not supplied.
42      type: str
43    use_instance_uuid:
44      description:
45      - Whether to use the VMware instance UUID rather than the BIOS UUID.
46      default: no
47      type: bool
48    folder:
49      description:
50      - Destination folder, absolute or relative path to find an existing guest.
51      - This is required only, if multiple virtual machines with same name are found on given vCenter.
52      - The folder should include the datacenter. ESX's datacenter is ha-datacenter
53      - 'Examples:'
54      - '   folder: /ha-datacenter/vm'
55      - '   folder: ha-datacenter/vm'
56      - '   folder: /datacenter1/vm'
57      - '   folder: datacenter1/vm'
58      - '   folder: /datacenter1/vm/folder1'
59      - '   folder: datacenter1/vm/folder1'
60      - '   folder: /folder1/datacenter1/vm'
61      - '   folder: folder1/datacenter1/vm'
62      - '   folder: /folder1/datacenter1/vm/folder2'
63      type: str
64    datacenter:
65      description:
66      - Name of the datacenter.
67      required: True
68      type: str
69 extends_documentation_fragment:
70 - community.vmware.vmware.documentation
71 
72 '''
73 
74 EXAMPLES = '''
75 - name: Gather snapshot information about the virtual machine in the given vCenter
76   community.vmware.vmware_guest_snapshot_info:
77     hostname: "{{ vcenter_hostname }}"
78     username: "{{ vcenter_username }}"
79     password: "{{ vcenter_password }}"
80     datacenter: "{{ datacenter_name }}"
81     name: "{{ guest_name }}"
82   delegate_to: localhost
83   register: snapshot_info
84 
85 - name: Gather snapshot information about the virtual machine using MoID
86   community.vmware.vmware_guest_snapshot_info:
87     hostname: "{{ vcenter_hostname }}"
88     username: "{{ vcenter_username }}"
89     password: "{{ vcenter_password }}"
90     datacenter: "{{ datacenter_name }}"
91     moid: vm-42
92   delegate_to: localhost
93   register: snapshot_info
94 '''
95 
96 RETURN = """
97 guest_snapshots:
98     description: metadata about the snapshot information
99     returned: always
100     type: dict
101     sample: {
102         "current_snapshot": {
103             "creation_time": "2018-02-10T14:48:31.999459+00:00",
104             "description": "",
105             "id": 28,
106             "name": "snap_0003",
107             "state": "poweredOff"
108         },
109         "snapshots": [
110             {
111                 "creation_time": "2018-02-10T14:48:31.999459+00:00",
112                 "description": "",
113                 "id": 28,
114                 "name": "snap_0003",
115                 "state": "poweredOff"
116             }
117         ]
118     }
119 """
120 
121 from ansible.module_utils.basic import AnsibleModule
122 from ansible_collections.community.vmware.plugins.module_utils.vmware import PyVmomi, list_snapshots, vmware_argument_spec
123 
124 
125 class PyVmomiHelper(PyVmomi):
126     def __init__(self, module):
127         super(PyVmomiHelper, self).__init__(module)
128 
129     @staticmethod
130     def gather_guest_snapshot_info(vm_obj=None):
131         """
132         Return snapshot related information about given virtual machine
133         Args:
134             vm_obj: Virtual Machine Managed object
135 
136         Returns: Dictionary containing snapshot information
137 
138         """
139         if vm_obj is None:
140             return {}
141         return list_snapshots(vm=vm_obj)
142 
143 
144 def main():
145     argument_spec = vmware_argument_spec()
146     argument_spec.update(
147         name=dict(type='str'),
148         uuid=dict(type='str'),
149         moid=dict(type='str'),
150         use_instance_uuid=dict(type='bool', default=False),
151         folder=dict(type='str'),
152         datacenter=dict(required=True, type='str'),
153     )
154     module = AnsibleModule(
155         argument_spec=argument_spec,
156         required_together=[
157             ['name', 'folder']
158         ],
159         required_one_of=[
160             ['name', 'uuid', 'moid']
161         ],
162         supports_check_mode=True,
163     )
164     if module._name == 'vmware_guest_snapshot_facts':
165         module.deprecate("The 'vmware_guest_snapshot_facts' module has been renamed to 'vmware_guest_snapshot_info'", version='2.13')
166 
167     if module.params['folder']:
168         # FindByInventoryPath() does not require an absolute path
169         # so we should leave the input folder path unmodified
170         module.params['folder'] = module.params['folder'].rstrip('/')
171 
172     pyv = PyVmomiHelper(module)
173     # Check if the VM exists before continuing
174     vm = pyv.get_vm()
175 
176     if not vm:
177         # If UUID is set, get_vm select UUID, show error message accordingly.
178         vm_id = (module.params.get('uuid') or module.params.get('name') or module.params.get('moid'))
179         module.fail_json(msg="Unable to gather information about snapshots for"
180                              " non-existing VM ['%s']" % vm_id)
181 
182     results = dict(changed=False, guest_snapshots=pyv.gather_guest_snapshot_info(vm_obj=vm))
183     module.exit_json(**results)
184 
185 
186 if __name__ == '__main__':
187     main()
188
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/plugins/modules/vmware_guest_snapshot_info.py b/plugins/modules/vmware_guest_snapshot_info.py
--- a/plugins/modules/vmware_guest_snapshot_info.py
+++ b/plugins/modules/vmware_guest_snapshot_info.py
@@ -48,7 +48,7 @@
    folder:
      description:
      - Destination folder, absolute or relative path to find an existing guest.
-     - This is required only, if multiple virtual machines with same name are found on given vCenter.
+     - This is required parameter, if C(name) is supplied.
      - The folder should include the datacenter. ESX's datacenter is ha-datacenter
      - 'Examples:'
      - '   folder: /ha-datacenter/vm'
@@ -78,6 +78,7 @@
     username: "{{ vcenter_username }}"
     password: "{{ vcenter_password }}"
     datacenter: "{{ datacenter_name }}"
+    folder: "/{{ datacenter_name }}/vm/"
     name: "{{ guest_name }}"
   delegate_to: localhost
   register: snapshot_info

{"golden_diff": "diff --git a/plugins/modules/vmware_guest_snapshot_info.py b/plugins/modules/vmware_guest_snapshot_info.py\n--- a/plugins/modules/vmware_guest_snapshot_info.py\n+++ b/plugins/modules/vmware_guest_snapshot_info.py\n@@ -48,7 +48,7 @@\n    folder:\n      description:\n      - Destination folder, absolute or relative path to find an existing guest.\n-     - This is required only, if multiple virtual machines with same name are found on given vCenter.\n+     - This is required parameter, if C(name) is supplied.\n      - The folder should include the datacenter. ESX's datacenter is ha-datacenter\n      - 'Examples:'\n      - '   folder: /ha-datacenter/vm'\n@@ -78,6 +78,7 @@\n     username: \"{{ vcenter_username }}\"\n     password: \"{{ vcenter_password }}\"\n     datacenter: \"{{ datacenter_name }}\"\n+    folder: \"/{{ datacenter_name }}/vm/\"\n     name: \"{{ guest_name }}\"\n   delegate_to: localhost\n   register: snapshot_info\n", "issue": "vmware_guest_snapshot_info documentation is outdated on website, as folder is now a required parameter\n_From @NeverUsedID on Jun 17, 2020 08:57_\n\n<!--- Verify first that your improvement is not already reported on GitHub -->\r\n<!--- Also test if the latest release and devel branch are affected too -->\r\n<!--- Complete *all* sections as described, this form is processed automatically -->\r\n\r\n##### SUMMARY\r\nLike in https://github.com/ansible/ansible/issues/22644 for vmware_guest_snapshot,  the documentation for vmware_guest_snapshot_info is outdated, as the folder parameter is now REQUIRED.\r\n\r\n<!--- HINT: Did you know the documentation has an \"Edit on GitHub\" link on every page ? -->\r\n\r\nThe \"Edit on Github Button\" does not work, as it throws a 404\r\n\r\n##### ISSUE TYPE\r\n- Documentation Report\r\n\r\n##### COMPONENT NAME\r\n\r\nvmware_guest_snapshot_info\r\n\r\n\r\n##### ANSIBLE VERSION\r\n<!--- Paste verbatim output from \"ansible --version\" between quotes -->\r\n```\r\nansible 2.9.9\r\n  config file = /etc/ansible/ansible.cfg\r\n  configured module search path = [u'/home/ansible/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']\r\n  ansible python module location = /usr/lib/python2.7/dist-packages/ansible\r\n  executable location = /usr/bin/ansible\r\n  python version = 2.7.12 (default, Apr 15 2020, 17:07:12) [GCC 5.4.0 20160609]\r\n\r\n```\r\n\r\n##### CONFIGURATION\r\n<!--- Paste verbatim output from \"ansible-config dump --only-changed\" between quotes -->\r\n```paste below\r\n\r\n```\r\n\r\n##### OS / ENVIRONMENT\r\n<!--- Provide all relevant information below, e.g. OS version, browser, etc. -->\r\n\r\n##### ADDITIONAL INFORMATION\r\n<!--- Describe how this improves the documentation, e.g. before/after situation or screenshots -->\r\n\r\n<!--- HINT: You can paste gist.github.com links for larger files -->\r\n\n\n_Copied from original issue: ansible/ansible#70111_\n", "before_files": [{"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# Copyright: (c) 2018, Ansible Project\n# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import absolute_import, division, print_function\n__metaclass__ = type\n\n\nDOCUMENTATION = '''\n---\nmodule: vmware_guest_snapshot_info\nshort_description: Gather info about virtual machine's snapshots in vCenter\ndescription:\n    - This module can be used to gather information about virtual machine's snapshots.\n    - This module was called C(vmware_guest_snapshot_facts) before Ansible 2.9. The usage did not change.\nauthor:\n    - Abhijeet Kasurde (@Akasurde)\nnotes:\n    - Tested on vSphere 6.0 and 6.5\nrequirements:\n    - \"python >= 2.6\"\n    - PyVmomi\noptions:\n   name:\n     description:\n     - Name of the VM to work with.\n     - This is required if C(uuid) or C(moid) is not supplied.\n     type: str\n   uuid:\n     description:\n     - UUID of the instance to manage if known, this is VMware's BIOS UUID by default.\n     - This is required if C(name) or C(moid) parameter is not supplied.\n     - The C(folder) is ignored, if C(uuid) is provided.\n     type: str\n   moid:\n     description:\n     - Managed Object ID of the instance to manage if known, this is a unique identifier only within a single vCenter instance.\n     - This is required if C(name) or C(uuid) is not supplied.\n     type: str\n   use_instance_uuid:\n     description:\n     - Whether to use the VMware instance UUID rather than the BIOS UUID.\n     default: no\n     type: bool\n   folder:\n     description:\n     - Destination folder, absolute or relative path to find an existing guest.\n     - This is required only, if multiple virtual machines with same name are found on given vCenter.\n     - The folder should include the datacenter. ESX's datacenter is ha-datacenter\n     - 'Examples:'\n     - '   folder: /ha-datacenter/vm'\n     - '   folder: ha-datacenter/vm'\n     - '   folder: /datacenter1/vm'\n     - '   folder: datacenter1/vm'\n     - '   folder: /datacenter1/vm/folder1'\n     - '   folder: datacenter1/vm/folder1'\n     - '   folder: /folder1/datacenter1/vm'\n     - '   folder: folder1/datacenter1/vm'\n     - '   folder: /folder1/datacenter1/vm/folder2'\n     type: str\n   datacenter:\n     description:\n     - Name of the datacenter.\n     required: True\n     type: str\nextends_documentation_fragment:\n- community.vmware.vmware.documentation\n\n'''\n\nEXAMPLES = '''\n- name: Gather snapshot information about the virtual machine in the given vCenter\n  community.vmware.vmware_guest_snapshot_info:\n    hostname: \"{{ vcenter_hostname }}\"\n    username: \"{{ vcenter_username }}\"\n    password: \"{{ vcenter_password }}\"\n    datacenter: \"{{ datacenter_name }}\"\n    name: \"{{ guest_name }}\"\n  delegate_to: localhost\n  register: snapshot_info\n\n- name: Gather snapshot information about the virtual machine using MoID\n  community.vmware.vmware_guest_snapshot_info:\n    hostname: \"{{ vcenter_hostname }}\"\n    username: \"{{ vcenter_username }}\"\n    password: \"{{ vcenter_password }}\"\n    datacenter: \"{{ datacenter_name }}\"\n    moid: vm-42\n  delegate_to: localhost\n  register: snapshot_info\n'''\n\nRETURN = \"\"\"\nguest_snapshots:\n    description: metadata about the snapshot information\n    returned: always\n    type: dict\n    sample: {\n        \"current_snapshot\": {\n            \"creation_time\": \"2018-02-10T14:48:31.999459+00:00\",\n            \"description\": \"\",\n            \"id\": 28,\n            \"name\": \"snap_0003\",\n            \"state\": \"poweredOff\"\n        },\n        \"snapshots\": [\n            {\n                \"creation_time\": \"2018-02-10T14:48:31.999459+00:00\",\n                \"description\": \"\",\n                \"id\": 28,\n                \"name\": \"snap_0003\",\n                \"state\": \"poweredOff\"\n            }\n        ]\n    }\n\"\"\"\n\nfrom ansible.module_utils.basic import AnsibleModule\nfrom ansible_collections.community.vmware.plugins.module_utils.vmware import PyVmomi, list_snapshots, vmware_argument_spec\n\n\nclass PyVmomiHelper(PyVmomi):\n    def __init__(self, module):\n        super(PyVmomiHelper, self).__init__(module)\n\n    @staticmethod\n    def gather_guest_snapshot_info(vm_obj=None):\n        \"\"\"\n        Return snapshot related information about given virtual machine\n        Args:\n            vm_obj: Virtual Machine Managed object\n\n        Returns: Dictionary containing snapshot information\n\n        \"\"\"\n        if vm_obj is None:\n            return {}\n        return list_snapshots(vm=vm_obj)\n\n\ndef main():\n    argument_spec = vmware_argument_spec()\n    argument_spec.update(\n        name=dict(type='str'),\n        uuid=dict(type='str'),\n        moid=dict(type='str'),\n        use_instance_uuid=dict(type='bool', default=False),\n        folder=dict(type='str'),\n        datacenter=dict(required=True, type='str'),\n    )\n    module = AnsibleModule(\n        argument_spec=argument_spec,\n        required_together=[\n            ['name', 'folder']\n        ],\n        required_one_of=[\n            ['name', 'uuid', 'moid']\n        ],\n        supports_check_mode=True,\n    )\n    if module._name == 'vmware_guest_snapshot_facts':\n        module.deprecate(\"The 'vmware_guest_snapshot_facts' module has been renamed to 'vmware_guest_snapshot_info'\", version='2.13')\n\n    if module.params['folder']:\n        # FindByInventoryPath() does not require an absolute path\n        # so we should leave the input folder path unmodified\n        module.params['folder'] = module.params['folder'].rstrip('/')\n\n    pyv = PyVmomiHelper(module)\n    # Check if the VM exists before continuing\n    vm = pyv.get_vm()\n\n    if not vm:\n        # If UUID is set, get_vm select UUID, show error message accordingly.\n        vm_id = (module.params.get('uuid') or module.params.get('name') or module.params.get('moid'))\n        module.fail_json(msg=\"Unable to gather information about snapshots for\"\n                             \" non-existing VM ['%s']\" % vm_id)\n\n    results = dict(changed=False, guest_snapshots=pyv.gather_guest_snapshot_info(vm_obj=vm))\n    module.exit_json(**results)\n\n\nif __name__ == '__main__':\n    main()\n", "path": "plugins/modules/vmware_guest_snapshot_info.py"}], "after_files": [{"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# Copyright: (c) 2018, Ansible Project\n# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import absolute_import, division, print_function\n__metaclass__ = type\n\n\nDOCUMENTATION = '''\n---\nmodule: vmware_guest_snapshot_info\nshort_description: Gather info about virtual machine's snapshots in vCenter\ndescription:\n    - This module can be used to gather information about virtual machine's snapshots.\n    - This module was called C(vmware_guest_snapshot_facts) before Ansible 2.9. The usage did not change.\nauthor:\n    - Abhijeet Kasurde (@Akasurde)\nnotes:\n    - Tested on vSphere 6.0 and 6.5\nrequirements:\n    - \"python >= 2.6\"\n    - PyVmomi\noptions:\n   name:\n     description:\n     - Name of the VM to work with.\n     - This is required if C(uuid) or C(moid) is not supplied.\n     type: str\n   uuid:\n     description:\n     - UUID of the instance to manage if known, this is VMware's BIOS UUID by default.\n     - This is required if C(name) or C(moid) parameter is not supplied.\n     - The C(folder) is ignored, if C(uuid) is provided.\n     type: str\n   moid:\n     description:\n     - Managed Object ID of the instance to manage if known, this is a unique identifier only within a single vCenter instance.\n     - This is required if C(name) or C(uuid) is not supplied.\n     type: str\n   use_instance_uuid:\n     description:\n     - Whether to use the VMware instance UUID rather than the BIOS UUID.\n     default: no\n     type: bool\n   folder:\n     description:\n     - Destination folder, absolute or relative path to find an existing guest.\n     - This is required parameter, if C(name) is supplied.\n     - The folder should include the datacenter. ESX's datacenter is ha-datacenter\n     - 'Examples:'\n     - '   folder: /ha-datacenter/vm'\n     - '   folder: ha-datacenter/vm'\n     - '   folder: /datacenter1/vm'\n     - '   folder: datacenter1/vm'\n     - '   folder: /datacenter1/vm/folder1'\n     - '   folder: datacenter1/vm/folder1'\n     - '   folder: /folder1/datacenter1/vm'\n     - '   folder: folder1/datacenter1/vm'\n     - '   folder: /folder1/datacenter1/vm/folder2'\n     type: str\n   datacenter:\n     description:\n     - Name of the datacenter.\n     required: True\n     type: str\nextends_documentation_fragment:\n- community.vmware.vmware.documentation\n\n'''\n\nEXAMPLES = '''\n- name: Gather snapshot information about the virtual machine in the given vCenter\n  community.vmware.vmware_guest_snapshot_info:\n    hostname: \"{{ vcenter_hostname }}\"\n    username: \"{{ vcenter_username }}\"\n    password: \"{{ vcenter_password }}\"\n    datacenter: \"{{ datacenter_name }}\"\n    folder: \"/{{ datacenter_name }}/vm/\"\n    name: \"{{ guest_name }}\"\n  delegate_to: localhost\n  register: snapshot_info\n\n- name: Gather snapshot information about the virtual machine using MoID\n  community.vmware.vmware_guest_snapshot_info:\n    hostname: \"{{ vcenter_hostname }}\"\n    username: \"{{ vcenter_username }}\"\n    password: \"{{ vcenter_password }}\"\n    datacenter: \"{{ datacenter_name }}\"\n    moid: vm-42\n  delegate_to: localhost\n  register: snapshot_info\n'''\n\nRETURN = \"\"\"\nguest_snapshots:\n    description: metadata about the snapshot information\n    returned: always\n    type: dict\n    sample: {\n        \"current_snapshot\": {\n            \"creation_time\": \"2018-02-10T14:48:31.999459+00:00\",\n            \"description\": \"\",\n            \"id\": 28,\n            \"name\": \"snap_0003\",\n            \"state\": \"poweredOff\"\n        },\n        \"snapshots\": [\n            {\n                \"creation_time\": \"2018-02-10T14:48:31.999459+00:00\",\n                \"description\": \"\",\n                \"id\": 28,\n                \"name\": \"snap_0003\",\n                \"state\": \"poweredOff\"\n            }\n        ]\n    }\n\"\"\"\n\nfrom ansible.module_utils.basic import AnsibleModule\nfrom ansible_collections.community.vmware.plugins.module_utils.vmware import PyVmomi, list_snapshots, vmware_argument_spec\n\n\nclass PyVmomiHelper(PyVmomi):\n    def __init__(self, module):\n        super(PyVmomiHelper, self).__init__(module)\n\n    @staticmethod\n    def gather_guest_snapshot_info(vm_obj=None):\n        \"\"\"\n        Return snapshot related information about given virtual machine\n        Args:\n            vm_obj: Virtual Machine Managed object\n\n        Returns: Dictionary containing snapshot information\n\n        \"\"\"\n        if vm_obj is None:\n            return {}\n        return list_snapshots(vm=vm_obj)\n\n\ndef main():\n    argument_spec = vmware_argument_spec()\n    argument_spec.update(\n        name=dict(type='str'),\n        uuid=dict(type='str'),\n        moid=dict(type='str'),\n        use_instance_uuid=dict(type='bool', default=False),\n        folder=dict(type='str'),\n        datacenter=dict(required=True, type='str'),\n    )\n    module = AnsibleModule(\n        argument_spec=argument_spec,\n        required_together=[\n            ['name', 'folder']\n        ],\n        required_one_of=[\n            ['name', 'uuid', 'moid']\n        ],\n        supports_check_mode=True,\n    )\n    if module._name == 'vmware_guest_snapshot_facts':\n        module.deprecate(\"The 'vmware_guest_snapshot_facts' module has been renamed to 'vmware_guest_snapshot_info'\", version='2.13')\n\n    if module.params['folder']:\n        # FindByInventoryPath() does not require an absolute path\n        # so we should leave the input folder path unmodified\n        module.params['folder'] = module.params['folder'].rstrip('/')\n\n    pyv = PyVmomiHelper(module)\n    # Check if the VM exists before continuing\n    vm = pyv.get_vm()\n\n    if not vm:\n        # If UUID is set, get_vm select UUID, show error message accordingly.\n        vm_id = (module.params.get('uuid') or module.params.get('name') or module.params.get('moid'))\n        module.fail_json(msg=\"Unable to gather information about snapshots for\"\n                             \" non-existing VM ['%s']\" % vm_id)\n\n    results = dict(changed=False, guest_snapshots=pyv.gather_guest_snapshot_info(vm_obj=vm))\n    module.exit_json(**results)\n\n\nif __name__ == '__main__':\n    main()\n", "path": "plugins/modules/vmware_guest_snapshot_info.py"}]}