Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VMware: Add datatypes in documentation #59221

Merged
merged 1 commit into from
Jul 24, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 11 additions & 0 deletions lib/ansible/modules/cloud/vmware/vcenter_extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,36 +30,46 @@
description:
- The extension key of the extension to install or uninstall.
required: True
type: str
version:
description:
- The version of the extension you are installing or uninstalling.
required: True
type: str
name:
description:
- Required for C(state=present). The name of the extension you are installing.
type: str
company:
description:
- Required for C(state=present). The name of the company that makes the extension.
type: str
description:
description:
- Required for C(state=present). A short description of the extension.
type: str
email:
description:
- Required for C(state=present). Administrator email to use for extension.
type: str
url:
description:
- Required for C(state=present). Link to server hosting extension zip file to install.
type: str
ssl_thumbprint:
description:
- Required for C(state=present). SSL thumbprint of the extension hosting server.
type: str
server_type:
description:
- Required for C(state=present). Type of server being used to install the extension (SOAP, REST, HTTP, etc.).
default: vsphere-client-serenity
type: str
client_type:
description:
- Required for C(state=present). Type of client the extension is (win32, .net, linux, etc.).
default: vsphere-client-serenity
type: str
visible:
description:
- Show the extension in solution manager inside vCenter.
Expand All @@ -70,6 +80,7 @@
- Add or remove vCenter Extension.
choices: [absent, present]
default: present
type: str
extends_documentation_fragment: vmware.documentation
'''

Expand Down
5 changes: 5 additions & 0 deletions lib/ansible/modules/cloud/vmware/vcenter_folder.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,22 @@
- Name of the datacenter.
required: True
aliases: ['datacenter_name']
type: str
folder_name:
description:
- Name of folder to be managed.
- This is case sensitive parameter.
- Folder name should be under 80 characters. This is a VMware restriction.
required: True
type: str
parent_folder:
description:
- Name of the parent folder under which new folder needs to be created.
- This is case sensitive parameter.
- Please specify unique folder name as there is no way to detect duplicate names.
- "If user wants to create a folder under '/DC0/vm/vm_folder', this value will be 'vm_folder'."
required: False
type: str
folder_type:
description:
- This is type of folder.
Expand All @@ -58,6 +61,7 @@
- This parameter is required, if C(state) is set to C(present) and parent_folder is absent.
- This option is ignored, if C(parent_folder) is set.
default: vm
type: str
required: False
choices: [ datastore, host, network, vm ]
state:
Expand All @@ -68,6 +72,7 @@
- If set to C(absent), then folder is unregistered and destroyed.
default: present
choices: [ present, absent ]
type: str
extends_documentation_fragment: vmware.documentation
'''

Expand Down
4 changes: 4 additions & 0 deletions lib/ansible/modules/cloud/vmware/vcenter_license.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,24 @@
default: {
'source': 'ansible'
}
type: dict
license:
description:
- The license key to manage in vSphere vCenter.
required: yes
type: str
state:
description:
- Whether to add (C(present)) or remove (C(absent)) the license key.
choices: [absent, present]
default: present
type: str
esxi_hostname:
description:
- The hostname of the ESXi server to which the specified license will be assigned.
- This parameter is optional.
version_added: '2.8'
type: str
datacenter:
description:
- The datacenter name to use for the operation.
Expand Down
5 changes: 5 additions & 0 deletions lib/ansible/modules/cloud/vmware/vmware_category.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,22 +37,26 @@
description:
- The name of category to manage.
required: True
type: str
category_description:
description:
- The category description.
- This is required only if C(state) is set to C(present).
- This parameter is ignored, when C(state) is set to C(absent).
default: ''
type: str
category_cardinality:
description:
- The category cardinality.
- This parameter is ignored, when updating existing category.
choices: ['multiple', 'single']
default: 'multiple'
type: str
new_category_name:
description:
- The new name for an existing category.
- This value is used while updating an existing category.
type: str
state:
description:
- The state of category.
Expand All @@ -63,6 +67,7 @@
- Process of updating category only allows name, description change.
default: 'present'
choices: [ 'present', 'absent' ]
type: str
extends_documentation_fragment: vmware_rest_client.documentation
'''

Expand Down
4 changes: 4 additions & 0 deletions lib/ansible/modules/cloud/vmware/vmware_cfg_backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,24 @@
description:
- Name of ESXi server. This is required only if authentication against a vCenter is done.
required: False
type: str
dest:
description:
- The destination where the ESXi configuration bundle will be saved. The I(dest) can be a folder or a file.
- If I(dest) is a folder, the backup file will be saved in the folder with the default filename generated from the ESXi server.
- If I(dest) is a file, the backup file will be saved with that filename. The file extension will always be .tgz.
type: path
src:
description:
- The file containing the ESXi configuration that will be restored.
type: path
state:
description:
- If C(saved), the .tgz backup bundle will be saved in I(dest).
- If C(absent), the host configuration will be reset to default values.
- If C(loaded), the backup file in I(src) will be loaded to the ESXi host rewriting the hosts settings.
choices: [saved, absent, loaded]
type: str
extends_documentation_fragment: vmware.documentation
'''

Expand Down
2 changes: 2 additions & 0 deletions lib/ansible/modules/cloud/vmware/vmware_cluster_facts.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,14 @@
- Datacenter to search for cluster/s.
- This parameter is required, if C(cluster_name) is not supplied.
required: False
type: str
cluster_name:
description:
- Name of the cluster.
- If set, facts of this cluster will be returned.
- This parameter is required, if C(datacenter) is not supplied.
required: False
type: str
extends_documentation_fragment: vmware.documentation
'''

Expand Down
2 changes: 2 additions & 0 deletions lib/ansible/modules/cloud/vmware/vmware_datacenter.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,13 @@
description:
- The name of the datacenter the cluster will be created in.
required: True
type: str
state:
description:
- If the datacenter should be present or absent.
choices: [ present, absent ]
default: present
type: str
extends_documentation_fragment: vmware.documentation
'''

Expand Down
4 changes: 4 additions & 0 deletions lib/ansible/modules/cloud/vmware/vmware_datastore_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,18 @@
- Mutually exclusive with C(folder) parameter.
required: False
aliases: [ datacenter ]
type: str
datastore_cluster_name:
description:
- The name of the datastore cluster.
required: True
type: str
state:
description:
- If the datastore cluster should be present or absent.
choices: [ present, absent ]
default: present
type: str
folder:
description:
- Destination folder, absolute path to place datastore cluster in.
Expand All @@ -63,6 +66,7 @@
- ' folder: /folder1/datacenter1/datastore/folder2'
required: False
version_added: '2.9'
type: str
extends_documentation_fragment: vmware.documentation
'''

Expand Down
3 changes: 3 additions & 0 deletions lib/ansible/modules/cloud/vmware/vmware_datastore_facts.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,21 @@
- Name of the datastore to match.
- If set, facts of specific datastores are returned.
required: False
type: str
datacenter:
description:
- Datacenter to search for datastores.
- This parameter is required, if C(cluster) is not supplied.
required: False
aliases: ['datacenter_name']
type: str
cluster:
description:
- Cluster to search for datastores.
- If set, facts of datastores belonging this clusters will be returned.
- This parameter is required, if C(datacenter) is not supplied.
required: False
type: str
gather_nfs_mount_info:
description:
- Gather mount information of NFS datastores.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,18 @@
description:
- Name of datastore to manage.
- If C(datastore_cluster) or C(cluster_name) are not set, this parameter is required.
type: str
datastore_cluster:
description:
- Name of the datastore cluster from all child datastores to be managed.
- If C(datastore) or C(cluster_name) are not set, this parameter is required.
type: str
cluster_name:
description:
- Name of the cluster where datastore is connected to.
- If multiple datastores are connected to the given cluster, then all datastores will be managed by C(state).
- If C(datastore) or C(datastore_cluster) are not set, this parameter is required.
type: str
state:
description:
- If set to C(present), then enter datastore into maintenance mode.
Expand All @@ -52,6 +55,7 @@
choices: [ present, absent ]
default: present
required: False
type: str
extends_documentation_fragment: vmware.documentation
'''

Expand Down
3 changes: 3 additions & 0 deletions lib/ansible/modules/cloud/vmware/vmware_dns_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,17 @@
description:
- The hostname that an ESXi host should be changed to.
required: True
type: str
domainname:
description:
- The domain the ESXi host should be apart of.
required: True
type: str
dns_servers:
description:
- The DNS servers that the host should be configured to use.
required: True
type: list
extends_documentation_fragment: vmware.documentation
'''

Expand Down
10 changes: 8 additions & 2 deletions lib/ansible/modules/cloud/vmware/vmware_drs_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,25 @@
description:
- "Cluster to create vm/host group."
required: true
type: str
datacenter:
aliases:
- datacenter_name
description:
- "Datacenter to search for given cluster. If not set, we use first cluster we encounter with C(cluster_name)."
required: false
type: str
group_name:
description:
- "The name of the group to create or remove."
required: true
type: str
hosts:
description:
- "List of hosts to create in group."
- "Required only if C(vms) is not set."
required: false
type: list
state:
choices:
- present
Expand All @@ -53,11 +57,13 @@
- "If set to C(present) and the group doesn't exists then the group will be created."
- "If set to C(absent) and the group exists then the group will be deleted."
required: true
type: str
vms:
description:
- "List of vms to create in group."
- "Required only if C(hosts) is not set."
required: false
type: list
requirements:
- "python >= 2.6"
- PyVmomi
Expand Down Expand Up @@ -256,7 +262,7 @@ def get_changed(self):

def __set_vm_obj_list(self, vm_list=None, cluster_obj=None):
"""
Function pupulate vm object list from list of vms
Function populate vm object list from list of vms
Args:
vm_list: List of vm names

Expand Down Expand Up @@ -288,7 +294,7 @@ def __set_vm_obj_list(self, vm_list=None, cluster_obj=None):

def __set_host_obj_list(self, host_list=None):
"""
Function pupulate host object list from list of hostnames
Function populate host object list from list of hostnames
Args:
host_list: List of host names

Expand Down
2 changes: 2 additions & 0 deletions lib/ansible/modules/cloud/vmware/vmware_drs_group_facts.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,14 @@
- "If set, facts of DRS groups belonging this cluster will be returned."
- "Not needed if C(datacenter) is set."
required: false
type: str
datacenter:
aliases:
- datacenter_name
description:
- "Datacenter to search for DRS VM/Host groups."
required: true
type: str
requirements:
- "python >= 2.6"
- PyVmomi
Expand Down
2 changes: 2 additions & 0 deletions lib/ansible/modules/cloud/vmware/vmware_drs_rule_facts.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,13 @@
- Name of the cluster.
- DRS facts for the given cluster will be returned.
- This is required parameter if C(datacenter) parameter is not provided.
type: str
datacenter:
description:
- Name of the datacenter.
- DRS facts for all the clusters from the given datacenter will be returned.
- This is required parameter if C(cluster_name) parameter is not provided.
type: str
extends_documentation_fragment: vmware.documentation
'''

Expand Down