Skip to content

Commit

Permalink
Implement semantic markup (5)
Browse files Browse the repository at this point in the history
  • Loading branch information
mariolenz committed Oct 24, 2023
1 parent 136556d commit 29b2ad6
Show file tree
Hide file tree
Showing 24 changed files with 186 additions and 195 deletions.
14 changes: 7 additions & 7 deletions plugins/modules/vmware_guest_custom_attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,25 +23,25 @@
name:
description:
- Name of the virtual machine to work with.
- This is required parameter, if C(uuid) or C(moid) is not supplied.
- This is required parameter, if O(uuid) or O(moid) is not supplied.
type: str
state:
description:
- The action to take.
- If set to C(present), then custom attribute is added or updated.
- If set to C(absent), then custom attribute value is removed.
- If set to V(present), then custom attribute is added or updated.
- If set to V(absent), then custom attribute value is removed.
default: 'present'
choices: ['present', 'absent']
type: str
uuid:
description:
- UUID of the virtual machine to manage if known. This is VMware's unique identifier.
- This is required parameter, if C(name) or C(moid) is not supplied.
- This is required parameter, if O(name) or O(moid) is not supplied.
type: str
moid:
description:
- Managed Object ID of the instance to manage if known, this is a unique identifier only within a single vCenter instance.
- This is required if C(name) or C(uuid) is not supplied.
- This is required if O(name) or O(uuid) is not supplied.
type: str
use_instance_uuid:
description:
Expand All @@ -51,7 +51,7 @@
folder:
description:
- Absolute path to find an existing guest.
- This is required parameter, if C(name) is supplied and multiple virtual machines with same name are found.
- This is required parameter, if O(name) is supplied and multiple virtual machines with same name are found.
type: str
datacenter:
description:
Expand All @@ -60,7 +60,7 @@
attributes:
description:
- A list of name and value of custom attributes that needs to be manage.
- Value of custom attribute is not required and will be ignored, if C(state) is set to C(absent).
- Value of custom attribute is not required and will be ignored, if O(state=absent).
suboptions:
name:
description:
Expand Down
65 changes: 31 additions & 34 deletions plugins/modules/vmware_guest_disk.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@
name:
description:
- Name of the virtual machine.
- This is a required parameter, if parameter C(uuid) or C(moid) is not supplied.
- This is a required parameter, if parameter O(uuid) or O(moid) is not supplied.
type: str
uuid:
description:
- UUID of the instance to gather facts if known, this is VMware's unique identifier.
- This is a required parameter, if parameter C(name) or C(moid) is not supplied.
- This is a required parameter, if parameter O(name) or O(moid) is not supplied.
type: str
moid:
description:
- Managed Object ID of the instance to manage if known, this is a unique identifier only within a single vCenter instance.
- This is required if C(name) or C(uuid) is not supplied.
- This is required if O(name) or O(uuid) is not supplied.
type: str
folder:
description:
Expand Down Expand Up @@ -89,58 +89,55 @@
type: int
type:
description:
- The type of disk, if not specified then use C(thick) type for new disk, no eagerzero.
- The disk type C(rdm) is added in version 1.13.0.
- The disk type C(vpmemdisk) is added in version 2.7.0.
- The type of disk, if not specified then use V(thick) type for new disk, no eagerzero.
type: str
choices: ['thin', 'eagerzeroedthick', 'thick', 'rdm', 'vpmemdisk']
disk_mode:
description:
- Type of disk mode. If not specified then use C(persistent) mode for new disk.
- If set to 'persistent' mode, changes are immediately and permanently written to the virtual disk.
- If set to 'independent_persistent' mode, same as persistent, but not affected by snapshots.
- If set to 'independent_nonpersistent' mode, changes to virtual disk are made to a redo log and discarded
- Type of disk mode. If not specified then use V(persistent) mode for new disk.
- If set to V(persistent) mode, changes are immediately and permanently written to the virtual disk.
- If set to V(independent_persistent) mode, same as persistent, but not affected by snapshots.
- If set to V('independent_nonpersistent) mode, changes to virtual disk are made to a redo log and discarded
at power off, but not affected by snapshots.
- Not applicable when disk C(type) is set to C(vpmemdisk).
- Not applicable when disk O(disk.type=vpmemdisk).
type: str
choices: ['persistent', 'independent_persistent', 'independent_nonpersistent']
rdm_path:
description:
- Path of LUN for Raw Device Mapping required for disk type C(rdm).
- Only valid if C(type) is set to C(rdm).
- Path of LUN for Raw Device Mapping required for O(disk.type=rdm).
- Only valid if O(disk.type=rdm).
type: str
cluster_disk:
description:
- This value allows for the sharing of an RDM between two machines.
- The primary machine holding the RDM uses the default C(false).
- The secondary machine holding the RDM uses C(true).
- The primary machine holding the RDM uses the default V(false).
- The secondary machine holding the RDM uses V(true).
type: bool
default: false
compatibility_mode:
description: Compatibility mode for raw devices. Required when disk type C(type) is set to C(rdm).
description: Compatibility mode for raw devices. Required when O(disk.type=rdm).
type: str
choices: ['physicalMode','virtualMode']
sharing:
description:
- The sharing mode of the virtual disk.
- Setting sharing means that multiple virtual machines can write to the virtual disk.
- Sharing can only be set if C(type) is set to C(eagerzeroedthick) or C(rdm).
- Sharing can only be set if O(disk.type=eagerzeroedthick) or O(disk.type=rdm).
type: bool
default: false
datastore:
description:
- Name of datastore or datastore cluster to be used for the disk.
- Not applicable when disk C(type) is set to C(vpmemdisk).
- Not applicable when disk O(disk.type=vpmemdisk).
type: str
autoselect_datastore:
description:
- Select the less used datastore. Specify only if C(datastore) is not specified.
- Not applicable when disk C(type) is set to C(vpmemdisk).
- Select the less used datastore. Specify only if O(disk.datastore) is not specified.
- Not applicable when disk O(disk.type=vpmemdisk).
type: bool
scsi_controller:
description:
- SCSI controller number. Only 4 SCSI controllers are allowed per VM.
- Care should be taken while specifying 'scsi_controller' is 0 and 'unit_number' as 0 as this disk may contain OS.
type: int
choices: [0, 1, 2, 3]
bus_sharing:
Expand All @@ -163,44 +160,44 @@
scsi_type:
description:
- Type of SCSI controller. This value is required only for the first occurrence of SCSI Controller.
- This value is ignored, if SCSI Controller is already present or C(state) is C(absent).
- This value is ignored, if SCSI Controller is already present or O(disk.state=absent).
type: str
choices: ['buslogic', 'lsilogic', 'lsilogicsas', 'paravirtual']
destroy:
description: If C(state) is C(absent), make sure the disk file is deleted from the datastore. Added in version 2.10.
description: If O(disk.state=absent), make sure the disk file is deleted from the datastore.
type: bool
default: true
filename:
description:
- Existing disk image to be used. Filename must already exist on the datastore.
- Specify filename string in C([datastore_name] path/to/file.vmdk) format. Added in version 2.10.
- Not applicable when disk C(type) is set to C(vpmemdisk).
- Specify filename string in C([datastore_name] path/to/file.vmdk) format.
- Not applicable when disk O(disk.type=vpmemdisk).
type: str
state:
description:
- State of disk.
- If set to 'absent', disk will be removed permanently from virtual machine configuration and from VMware storage.
- If set to 'present', disk will be added if not present at given Controller and Unit Number.
- If set to V(absent), disk will be removed permanently from virtual machine configuration and from VMware storage.
- If set to V(present), disk will be added if not present at given Controller and Unit Number.
- or disk exists with different size, disk size is increased, reducing disk size is not allowed.
type: str
choices: ['present', 'absent']
default: 'present'
controller_type:
description:
- This parameter is added for managing disks attaching other types of controllers, e.g., SATA or NVMe.
- If either C(controller_type) or C(scsi_type) is not specified, then use C(paravirtual) type.
- If either O(disk.controller_type) or O(disk.scsi_type) is not specified, then use V(paravirtual) type.
type: str
choices: ['buslogic', 'lsilogic', 'lsilogicsas', 'paravirtual', 'sata', 'nvme', 'ide']
controller_number:
description:
- This parameter is used with C(controller_type) for specifying controller bus number.
- For C(ide) controller type, valid value is 0 or 1.
- This parameter is used with O(disk.controller_type) for specifying controller bus number.
- For O(disk.controller_type=ide), valid value is 0 or 1.
type: int
choices: [0, 1, 2, 3]
iolimit:
description:
- Section specifies the shares and limit for storage I/O resource.
- Not applicable when disk C(type) is set to C(vpmemdisk).
- Not applicable when O(disk.type=vpmemdisk).
suboptions:
limit:
description: Section specifies values for limit where the utilization of a virtual machine will not exceed, even if there are available resources.
Expand All @@ -213,21 +210,21 @@
type: str
choices: ['low', 'normal', 'high', 'custom']
level_value:
description: Custom value when C(level) is set as C(custom).
description: Custom value when O(disk.iolimit.shares.level=custom).
type: int
type: dict
type: dict
shares:
description:
- Section for iolimit section tells about what are all different types of shares user can add for disk.
- Not applicable when disk C(type) is set to C(vpmemdisk).
- Not applicable when disk O(disk.type=vpmemdisk).
suboptions:
level:
description: Tells about different level for the shares section.
type: str
choices: ['low', 'normal', 'high', 'custom']
level_value:
description: Custom value when C(level) is set as C(custom).
description: Custom value when O(disk.shares.level=custom).
type: int
type: dict
default: []
Expand Down
6 changes: 3 additions & 3 deletions plugins/modules/vmware_guest_disk_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@
name:
description:
- Name of the virtual machine.
- This is required parameter, if parameter C(uuid) or C(moid) is not supplied.
- This is required parameter, if parameter O(uuid) or O(moid) is not supplied.
type: str
uuid:
description:
- UUID of the instance to gather information if known, this is VMware's unique identifier.
- This is required parameter, if parameter C(name) or C(moid) is not supplied.
- This is required parameter, if parameter O(name) or O(moid) is not supplied.
type: str
moid:
description:
- Managed Object ID of the instance to manage if known, this is a unique identifier only within a single vCenter instance.
- This is required if C(name) or C(uuid) is not supplied.
- This is required if O(name) or O(uuid) is not supplied.
type: str
use_instance_uuid:
description:
Expand Down
9 changes: 4 additions & 5 deletions plugins/modules/vmware_guest_file_operation.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
description:
- Destination folder, absolute path to find an existing guest or create the new guest.
- The folder should include the datacenter. ESX's datacenter is ha-datacenter
- Used only if C(vm_id_type) is C(inventory_path).
- Used only if O(vm_id_type=inventory_path).
- 'Examples:'
- ' folder: /ha-datacenter/vm'
- ' folder: ha-datacenter/vm'
Expand Down Expand Up @@ -79,7 +79,6 @@
- Create or delete a directory.
- Can be used to create temp directory inside guest using mktemp operation.
- mktemp sets variable C(dir) in the result with the name of the new directory.
- mktemp operation option is added in version 2.8.
suboptions:
operation:
description:
Expand All @@ -91,17 +90,17 @@
type: str
description:
- Directory path.
- Required for C(create) or C(remove).
- Required for O(directory.operation=create) or O(directory.operation=remove).
prefix:
description:
- Temporary directory prefix.
- Required for C(mktemp).
- Required for O(directory.operation=mktemp).
type: str
suffix:
type: str
description:
- Temporary directory suffix.
- Required for C(mktemp).
- Required for O(directory.operation=mktemp).
recurse:
type: bool
description:
Expand Down
4 changes: 2 additions & 2 deletions plugins/modules/vmware_guest_find.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
name:
description:
- Name of the VM to work with.
- This is required if C(uuid) parameter is not supplied.
- This is required if O(uuid) parameter is not supplied.
type: str
uuid:
description:
- UUID of the instance to manage if known, this is VMware's BIOS UUID by default.
- This is required if C(name) parameter is not supplied.
- This is required if O(name) parameter is not supplied.
type: str
use_instance_uuid:
description:
Expand Down
24 changes: 12 additions & 12 deletions plugins/modules/vmware_guest_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
name:
description:
- Name of the VM to work with
- This is required if C(uuid) or C(moid) is not supplied.
- This is required if O(uuid) or O(moid) is not supplied.
type: str
name_match:
description:
Expand All @@ -33,7 +33,7 @@
uuid:
description:
- UUID of the instance to manage if known, this is VMware's unique identifier.
- This is required if C(name) or C(moid) is not supplied.
- This is required if O(name) or O(moid) is not supplied.
type: str
use_instance_uuid:
description:
Expand All @@ -43,12 +43,12 @@
moid:
description:
- Managed Object ID of the instance to manage if known, this is a unique identifier only within a single vCenter instance.
- This is required if C(name) or C(uuid) is not supplied.
- This is required if O(name) or O(uuid) is not supplied.
type: str
folder:
description:
- Destination folder, absolute or relative path to find an existing guest.
- This is required if name is supplied.
- This is required if O(name) is supplied.
- The folder should include the datacenter. ESX's datacenter is ha-datacenter
- 'Examples:'
- ' folder: /ha-datacenter/vm'
Expand All @@ -69,24 +69,24 @@
tags:
description:
- Whether to show tags or not.
- If set C(true), shows tags information. Returns a list of tag names.
- If set C(false), hides tags information.
- If set V(true), shows tags information. Returns a list of tag names.
- If set V(false), hides tags information.
- vSphere Automation SDK is required.
default: false
type: bool
tag_details:
description:
- If set C(true), detail information about 'tags' returned.
- Without this flag, the 'tags' returns a list of tag names.
- With this flag, the 'tags' returns a list of dict about tag information with additional details like category name, category id, and tag id.
- If set V(true), detail information about tags returned.
- Without this flag, O(tags=true) returns a list of tag names.
- With this flag, O(tags=true) returns a list of dict about tag information with additional details like category name, category id, and tag id.
- This parameter is added to maintain backward compatability.
default: false
type: bool
schema:
description:
- Specify the output schema desired.
- The 'summary' output schema is the legacy output from the module
- The 'vsphere' output schema is the vSphere API class definition
- The V(summary) output schema is the legacy output from the module
- The V(vsphere) output schema is the vSphere API class definition
which requires pyvmomi>6.7.1
choices: ['summary', 'vsphere']
default: 'summary'
Expand All @@ -103,7 +103,7 @@
- ' "guest.disk",'
- ' "overallStatus"'
- ' ]'
- Only valid when C(schema) is C(vsphere).
- Only valid when O(schema=vsphere).
type: list
elements: str
required: false
Expand Down
Loading

0 comments on commit 29b2ad6

Please sign in to comment.