|
|
@ -1250,6 +1250,7 @@ from ansible.module_utils.ovirt import (
|
|
|
|
search_by_attributes,
|
|
|
|
search_by_attributes,
|
|
|
|
search_by_name,
|
|
|
|
search_by_name,
|
|
|
|
wait,
|
|
|
|
wait,
|
|
|
|
|
|
|
|
engine_supported,
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -2255,6 +2256,15 @@ 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
|
|
|
@ -2403,6 +2413,7 @@ 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,
|
|
|
|