mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-26 14:41:23 -07:00
E501 fixes (#22879)
This commit is contained in:
parent
4fdeade389
commit
3164e8b561
215 changed files with 1328 additions and 761 deletions
|
@ -82,7 +82,9 @@ options:
|
|||
description:
|
||||
- "Set the guest ID (Debian, RHEL, Windows...)"
|
||||
- "This field is required when creating a VM"
|
||||
- "Valid values are referenced here: https://www.vmware.com/support/developer/converter-sdk/conv55_apireference/vim.vm.GuestOsDescriptor.GuestOsIdentifier.html"
|
||||
- >
|
||||
Valid values are referenced here:
|
||||
https://www.vmware.com/support/developer/converter-sdk/conv55_apireference/vim.vm.GuestOsDescriptor.GuestOsIdentifier.html
|
||||
version_added: "2.3"
|
||||
disk:
|
||||
description:
|
||||
|
@ -675,7 +677,9 @@ class PyVmomiHelper(object):
|
|||
# VDS switch
|
||||
pg_obj = get_obj(self.content, [vim.dvs.DistributedVirtualPortgroup], network_devices[key]['name'])
|
||||
|
||||
if nic.device.backing and ( nic.device.backing.port.portgroupKey != pg_obj.key or nic.device.backing.port.switchUuid != pg_obj.config.distributedVirtualSwitch.uuid ):
|
||||
if (nic.device.backing and
|
||||
(nic.device.backing.port.portgroupKey != pg_obj.key or
|
||||
nic.device.backing.port.switchUuid != pg_obj.config.distributedVirtualSwitch.uuid)):
|
||||
nic_change_detected = True
|
||||
|
||||
dvs_port_connection = vim.dvs.PortConnection()
|
||||
|
@ -792,7 +796,8 @@ class PyVmomiHelper(object):
|
|||
|
||||
if 'joindomain' in self.params['customization']:
|
||||
if 'domainadmin' not in self.params['customization'] or 'domainadminpassword' not in self.params['customization']:
|
||||
self.module.fail_json(msg="'domainadmin' and 'domainadminpassword' entries are mandatory in 'customization' section to use joindomain feature")
|
||||
self.module.fail_json(msg="'domainadmin' and 'domainadminpassword' entries are mandatory in 'customization' section to use "
|
||||
"joindomain feature")
|
||||
|
||||
ident.identification.domainAdmin = str(self.params['customization'].get('domainadmin'))
|
||||
ident.identification.joinDomain = str(self.params['customization'].get('joindomain'))
|
||||
|
|
|
@ -75,18 +75,21 @@ options:
|
|||
default: None
|
||||
esxi:
|
||||
description:
|
||||
- Dictionary which includes datacenter and hostname on which the VM should be created. For standalone ESXi hosts, ha-datacenter should be used as the datacenter name
|
||||
- Dictionary which includes datacenter and hostname on which the VM should be created. For standalone ESXi hosts, ha-datacenter should be used as the
|
||||
datacenter name
|
||||
required: false
|
||||
default: null
|
||||
state:
|
||||
description:
|
||||
- Indicate desired state of the vm. 'reconfigured' only applies changes to 'vm_cdrom', 'memory_mb', and 'num_cpus' in vm_hardware parameter. The 'memory_mb' and 'num_cpus' changes are applied to powered-on vms when hot-plugging is enabled for the guest.
|
||||
- Indicate desired state of the vm. 'reconfigured' only applies changes to 'vm_cdrom', 'memory_mb', and 'num_cpus' in vm_hardware parameter.
|
||||
The 'memory_mb' and 'num_cpus' changes are applied to powered-on vms when hot-plugging is enabled for the guest.
|
||||
default: present
|
||||
choices: ['present', 'powered_off', 'absent', 'powered_on', 'restarted', 'reconfigured']
|
||||
from_template:
|
||||
version_added: "1.9"
|
||||
description:
|
||||
- Specifies if the VM should be deployed from a template (mutually exclusive with 'state' parameter). No guest customization changes to hardware such as CPU, RAM, NICs or Disks can be applied when launching from template.
|
||||
- Specifies if the VM should be deployed from a template (mutually exclusive with 'state' parameter). No guest customization changes to hardware
|
||||
such as CPU, RAM, NICs or Disks can be applied when launching from template.
|
||||
default: no
|
||||
choices: ['yes', 'no']
|
||||
template_src:
|
||||
|
@ -128,7 +131,8 @@ options:
|
|||
default: null
|
||||
vm_hw_version:
|
||||
description:
|
||||
- Desired hardware version identifier (for example, "vmx-08" for vms that needs to be managed with vSphere Client). Note that changing hardware version of existing vm is not supported.
|
||||
- Desired hardware version identifier (for example, "vmx-08" for vms that needs to be managed with vSphere Client). Note that changing hardware
|
||||
version of existing vm is not supported.
|
||||
required: false
|
||||
default: null
|
||||
version_added: "1.7"
|
||||
|
@ -1780,7 +1784,8 @@ def main():
|
|||
# CONNECT TO THE SERVER
|
||||
viserver = VIServer()
|
||||
if validate_certs and not hasattr(ssl, 'SSLContext') and not vcenter_hostname.startswith('http://'):
|
||||
module.fail_json(msg='pysphere does not support verifying certificates with python < 2.7.9. Either update python or set validate_certs=False on the task')
|
||||
module.fail_json(msg='pysphere does not support verifying certificates with python < 2.7.9. Either update python or set '
|
||||
'validate_certs=False on the task')
|
||||
|
||||
try:
|
||||
viserver.connect(vcenter_hostname, username, password)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue