Ovirt vm deprecated backport (#67923)

* ovirt_vm: remove deprecated warning (#67922)

* ovirt_vm: remove deprecated warning of boot params

* update docs

* add changelog
pull/67986/head
Martin Nečas 5 years ago committed by GitHub
parent 2376f20bd9
commit 6e7383807a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,2 @@
minor_changes:
- "ovirt_vm: remove deprecated warning of Linux boot parameters"

@ -522,25 +522,21 @@ options:
description: description:
- "If I(true) C(kernel_params), C(initrd_path) and C(kernel_path) will persist in virtual machine configuration, - "If I(true) C(kernel_params), C(initrd_path) and C(kernel_path) will persist in virtual machine configuration,
if I(False) it will be used for run once." if I(False) it will be used for run once."
- Usable with oVirt 4.3 and lower; removed in oVirt 4.4.
type: bool type: bool
version_added: "2.8" version_added: "2.8"
kernel_path: kernel_path:
description: description:
- Path to a kernel image used to boot the virtual machine. - Path to a kernel image used to boot the virtual machine.
- Kernel image must be stored on either the ISO domain or on the host's storage. - Kernel image must be stored on either the ISO domain or on the host's storage.
- Usable with oVirt 4.3 and lower; removed in oVirt 4.4.
version_added: "2.3" version_added: "2.3"
initrd_path: initrd_path:
description: description:
- Path to an initial ramdisk to be used with the kernel specified by C(kernel_path) option. - Path to an initial ramdisk to be used with the kernel specified by C(kernel_path) option.
- Ramdisk image must be stored on either the ISO domain or on the host's storage. - Ramdisk image must be stored on either the ISO domain or on the host's storage.
- Usable with oVirt 4.3 and lower; removed in oVirt 4.4.
version_added: "2.3" version_added: "2.3"
kernel_params: kernel_params:
description: description:
- Kernel command line parameters (formatted as string) to be used with the kernel specified by C(kernel_path) option. - Kernel command line parameters (formatted as string) to be used with the kernel specified by C(kernel_path) option.
- Usable with oVirt 4.3 and lower; removed in oVirt 4.4.
version_added: "2.3" version_added: "2.3"
instance_type: instance_type:
description: description:
@ -1264,7 +1260,6 @@ from ansible.module_utils.ovirt import (
search_by_attributes, search_by_attributes,
search_by_name, search_by_name,
wait, wait,
engine_supported,
) )
@ -2271,15 +2266,6 @@ def import_vm(module, connection):
return True return True
def check_deprecated_params(module, connection):
if engine_supported(connection, '4.4') and \
(module.params.get('kernel_params_persist') is not None or
module.params.get('kernel_path') is not None or
module.params.get('initrd_path') is not None or
module.params.get('kernel_params') is not None):
module.warn("Parameters 'kernel_params_persist', 'kernel_path', 'initrd_path', 'kernel_params' are not supported since oVirt 4.4.")
def control_state(vm, vms_service, module): def control_state(vm, vms_service, module):
if vm is None: if vm is None:
return return
@ -2428,7 +2414,6 @@ def main():
state = module.params['state'] state = module.params['state']
auth = module.params.pop('auth') auth = module.params.pop('auth')
connection = create_connection(auth) connection = create_connection(auth)
check_deprecated_params(module, connection)
vms_service = connection.system_service().vms_service() vms_service = connection.system_service().vms_service()
vms_module = VmsModule( vms_module = VmsModule(
connection=connection, connection=connection,

Loading…
Cancel
Save