Update ovirt_vm.py (#62425)

* Update ovirt_vm.py
This commit is contained in:
chashtag 2019-09-20 09:40:14 -04:00 committed by Sandra McCann
parent 2969614c2c
commit 7cfcf18a8c

View file

@ -835,6 +835,10 @@ options:
- "VM should have snapshot specified by C(snapshot)."
- "If C(snapshot_name) specified C(snapshot_vm) is required."
version_added: "2.9"
custom_emulated_machine:
description:
- "Sets the value of the custom_emulated_machine attribute."
version_added: "2.10"
notes:
- If VM is in I(UNASSIGNED) or I(UNKNOWN) state before any operation, the module will fail.
@ -1374,6 +1378,7 @@ class VmsModule(BaseModule):
use_latest_template_version=self.param('use_latest_template_version'),
stateless=self.param('stateless') or self.param('use_latest_template_version'),
delete_protected=self.param('delete_protected'),
custom_emulated_machine=self.param('custom_emulated_machine'),
bios=(
otypes.Bios(boot_menu=otypes.BootMenu(enabled=self.param('boot_menu')))
) if self.param('boot_menu') is not None else None,
@ -1585,6 +1590,7 @@ class VmsModule(BaseModule):
equal(self.param('stateless'), entity.stateless) and
equal(self.param('cpu_shares'), entity.cpu_shares) and
equal(self.param('delete_protected'), entity.delete_protected) and
equal(self.param('custom_emulated_machine'), entity.custom_emulated_machine) and
equal(self.param('use_latest_template_version'), entity.use_latest_template_version) and
equal(self.param('boot_devices'), [str(dev) for dev in getattr(entity.os.boot, 'devices', [])]) and
equal(self.param('instance_type'), get_link_name(self._connection, entity.instance_type), ignore_case=True) and
@ -2349,6 +2355,7 @@ def main():
lease=dict(type='str'),
stateless=dict(type='bool'),
delete_protected=dict(type='bool'),
custom_emulated_machine=dict(type='str'),
force=dict(type='bool', default=False),
nics=dict(type='list', default=[]),
cloud_init=dict(type='dict'),