Tidy up validate-modules:doc-required-mismatch (#1415)

* Tidy up validate-modules ignores doc-required-mismatch

* Tidy up validate-modules ignores doc-required-mismatch - update on 2.11

* Fixed chengelog frag

* rolledback removal of parameter from cloud/smartos/vmadm.py

* removed changelog frag for the rollback

* Update plugins/modules/cloud/smartos/vmadm.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Revert "removed changelog frag for the rollback"

This reverts commit 56a02ead3b.

* suggestion from PR

* yet another PR suggestion

Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
Alexei Znamensky 2020-11-29 02:06:28 +13:00 committed by GitHub
parent cff8463882
commit b69ea1dfd9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
51 changed files with 158 additions and 220 deletions

View file

@ -41,7 +41,6 @@ options:
id:
description:
- "ID of the scheduling policy."
required: true
name:
description:
- "Name of the scheduling policy, can be used as glob expression."
@ -77,7 +76,6 @@ ovirt_scheduling_policies:
import fnmatch
import traceback
from ansible.module_utils.common.removed import removed_module
from ansible.module_utils.basic import AnsibleModule
from ansible_collections.community.general.plugins.module_utils._ovirt import (
check_sdk,

View file

@ -48,7 +48,6 @@ options:
project_id:
description:
- UUID of a project of the device to/from which to assign/remove a subnet.
required: True
type: str
device_count:
@ -63,6 +62,7 @@ options:
- IPv4 or IPv6 subnet which you want to manage. It must come from a reserved block for your project in the Packet Host.
aliases: [name]
type: str
required: true
state:
description:

View file

@ -45,6 +45,7 @@ options:
description:
- UUID of the project to which the device and volume belong.
type: str
required: true
volume:
description:
@ -52,6 +53,7 @@ options:
- It can be a UUID, an API-generated volume name, or user-defined description string.
- 'Example values: 4a347482-b546-4f67-8300-fb5018ef0c5, volume-4a347482, "my volume"'
type: str
required: true
device:
description:

View file

@ -21,193 +21,235 @@ options:
description:
- When enabled, the zone dataset will be mounted on C(/zones/archive)
upon removal.
type: bool
autoboot:
required: false
description:
- Whether or not a VM is booted when the system is rebooted.
type: bool
brand:
required: true
choices: [ joyent, joyent-minimal, lx, kvm, bhyve ]
default: joyent
description:
- Type of virtual machine. The C(bhyve) option was added in community.general 0.2.0.
type: str
boot:
required: false
description:
- Set the boot order for KVM VMs.
type: str
cpu_cap:
required: false
description:
- Sets a limit on the amount of CPU time that can be used by a VM.
Use C(0) for no cap.
type: int
cpu_shares:
required: false
description:
- Sets a limit on the number of fair share scheduler (FSS) CPU shares for
a VM. This limit is relative to all other VMs on the system.
type: int
cpu_type:
required: false
choices: [ qemu64, host ]
default: qemu64
description:
- Control the type of virtual CPU exposed to KVM VMs.
type: str
customer_metadata:
required: false
description:
- Metadata to be set and associated with this VM, this contain customer
modifiable keys.
type: dict
delegate_dataset:
required: false
description:
- Whether to delegate a ZFS dataset to an OS VM.
type: bool
disk_driver:
required: false
description:
- Default value for a virtual disk model for KVM guests.
type: str
disks:
required: false
description:
- A list of disks to add, valid properties are documented in vmadm(1M).
type: list
dns_domain:
required: false
description:
- Domain value for C(/etc/hosts).
type: str
docker:
required: false
description:
- Docker images need this flag enabled along with the I(brand) set to C(lx).
type: bool
filesystems:
required: false
description:
- Mount additional filesystems into an OS VM.
required: false
description:
- Mount additional filesystems into an OS VM.
type: list
firewall_enabled:
required: false
description:
- Enables the firewall, allowing fwadm(1M) rules to be applied.
type: bool
force:
required: false
description:
- Force a particular action (i.e. stop or delete a VM).
type: bool
fs_allowed:
required: false
description:
- Comma separated list of filesystem types this zone is allowed to mount.
type: str
hostname:
required: false
description:
- Zone/VM hostname.
type: str
image_uuid:
required: false
description:
- Image UUID.
type: str
indestructible_delegated:
required: false
description:
- Adds an C(@indestructible) snapshot to delegated datasets.
type: bool
indestructible_zoneroot:
required: false
description:
- Adds an C(@indestructible) snapshot to zoneroot.
type: bool
internal_metadata:
required: false
description:
- Metadata to be set and associated with this VM, this contains operator
generated keys.
type: dict
internal_metadata_namespace:
required: false
description:
- List of namespaces to be set as I(internal_metadata-only); these namespaces
will come from I(internal_metadata) rather than I(customer_metadata).
type: str
kernel_version:
required: false
description:
- Kernel version to emulate for LX VMs.
type: str
limit_priv:
required: false
description:
- Set (comma separated) list of privileges the zone is allowed to use.
type: str
maintain_resolvers:
required: false
description:
- Resolvers in C(/etc/resolv.conf) will be updated when updating
the I(resolvers) property.
type: bool
max_locked_memory:
required: false
description:
- Total amount of memory (in MiBs) on the host that can be locked by this VM.
type: int
max_lwps:
required: false
description:
- Maximum number of lightweight processes this VM is allowed to have running.
type: int
max_physical_memory:
required: false
description:
- Maximum amount of memory (in MiBs) on the host that the VM is allowed to use.
type: int
max_swap:
required: false
description:
- Maximum amount of virtual memory (in MiBs) the VM is allowed to use.
type: int
mdata_exec_timeout:
required: false
description:
- Timeout in seconds (or 0 to disable) for the C(svc:/smartdc/mdata:execute) service
that runs user-scripts in the zone.
type: int
name:
required: false
aliases: [ alias ]
description:
- Name of the VM. vmadm(1M) uses this as an optional name.
type: str
nic_driver:
required: false
description:
- Default value for a virtual NIC model for KVM guests.
type: str
nics:
required: false
description:
- A list of nics to add, valid properties are documented in vmadm(1M).
type: list
nowait:
required: false
description:
- Consider the provisioning complete when the VM first starts, rather than
when the VM has rebooted.
type: bool
qemu_opts:
required: false
description:
- Additional qemu arguments for KVM guests. This overwrites the default arguments
provided by vmadm(1M) and should only be used for debugging.
type: str
qemu_extra_opts:
required: false
description:
- Additional qemu cmdline arguments for KVM guests.
type: str
quota:
required: false
description:
- Quota on zone filesystems (in MiBs).
type: int
ram:
required: false
description:
- Amount of virtual RAM for a KVM guest (in MiBs).
type: int
resolvers:
required: false
description:
- List of resolvers to be put into C(/etc/resolv.conf).
type: list
routes:
required: false
description:
- Dictionary that maps destinations to gateways, these will be set as static
routes in the VM.
type: dict
spice_opts:
required: false
description:
- Addition options for SPICE-enabled KVM VMs.
type: str
spice_password:
required: false
description:
- Password required to connect to SPICE. By default no password is set.
Please note this can be read from the Global Zone.
type: str
state:
required: true
choices: [ present, running, absent, deleted, stopped, created, restarted, rebooted ]
default: running
description:
- States for the VM to be in. Please note that C(present), C(stopped) and C(restarted)
operate on a VM that is currently provisioned. C(present) means that the VM will be
@ -215,74 +257,91 @@ options:
shutdown the zone before removing it.
C(stopped) means the zone will be created if it doesn't exist already, before shutting
it down.
type: str
tmpfs:
required: false
description:
- Amount of memory (in MiBs) that will be available in the VM for the C(/tmp) filesystem.
type: int
uuid:
required: false
description:
- UUID of the VM. Can either be a full UUID or C(*) for all VMs.
type: str
vcpus:
required: false
description:
- Number of virtual CPUs for a KVM guest.
type: int
vga:
required: false
description:
- Specify VGA emulation used by KVM VMs.
type: str
virtio_txburst:
required: false
description:
- Number of packets that can be sent in a single flush of the tx queue of virtio NICs.
type: int
virtio_txtimer:
required: false
description:
- Timeout (in nanoseconds) for the TX timer of virtio NICs.
type: int
vnc_password:
required: false
description:
- Password required to connect to VNC. By default no password is set.
Please note this can be read from the Global Zone.
type: str
vnc_port:
required: false
description:
- TCP port to listen of the VNC server. Or set C(0) for random,
or C(-1) to disable.
type: int
zfs_data_compression:
required: false
description:
- Specifies compression algorithm used for this VMs data dataset. This option
only has effect on delegated datasets.
type: str
zfs_data_recsize:
required: false
description:
- Suggested block size (power of 2) for files in the delegated dataset's filesystem.
type: int
zfs_filesystem_limit:
required: false
description:
- Maximum number of filesystems the VM can have.
type: int
zfs_io_priority:
required: false
description:
- IO throttle priority value relative to other VMs.
type: int
zfs_root_compression:
required: false
description:
- Specifies compression algorithm used for this VMs root dataset. This option
only has effect on the zoneroot dataset.
type: str
zfs_root_recsize:
required: false
description:
- Suggested block size (power of 2) for files in the zoneroot dataset's filesystem.
type: int
zfs_snapshot_limit:
required: false
description:
- Number of snapshots the VM can have.
type: int
zpool:
required: false
description:
- ZFS pool the VM's zone dataset will be created in.
type: str
requirements:
- python >= 2.6
'''
@ -497,17 +556,11 @@ def set_vm_state(module, vm_uuid, vm_state):
def create_payload(module, uuid):
# Create the JSON payload (vmdef) and return the filename.
p = module.params
# Filter out the few options that are not valid VM properties.
module_options = ['debug', 'force', 'state']
vmattrs = filter(lambda prop: prop not in module_options, p)
vmdef = {}
for attr in vmattrs:
if p[attr]:
vmdef[attr] = p[attr]
# @TODO make this a simple {} comprehension as soon as py2 is ditched
# @TODO {k: v for k, v in p.items() if k not in module_options}
vmdef = dict([(k, v) for k, v in module.params.items() if k not in module_options and v])
try:
vmdef_json = json.dumps(vmdef)

View file

@ -145,7 +145,6 @@ options:
key_pair:
description:
- (String) Specify a Key Pair to attach to the instances
required: true
kubernetes:
description:
@ -181,7 +180,6 @@ options:
monitoring:
description:
- (Boolean) Describes whether instance Enhanced Monitoring is enabled
required: true
name:
description:
@ -214,7 +212,6 @@ options:
on_demand_instance_type:
description:
- (String) On-demand instance type that will be provisioned
required: true
opsworks:
description:
@ -342,7 +339,6 @@ options:
description:
- (String) The capacity unit to launch instances by.
- "The available choices are: C(instance), C(weight)."
required: true
up_scaling_policies:
description: