From cccc4561e1fb3112ad54876b533015159d15495a Mon Sep 17 00:00:00 2001 From: Bill Wei Date: Tue, 6 Feb 2018 15:21:41 -0500 Subject: [PATCH] New service model for transformation plan request and task --- ...ce_service_template_transformation_plan_request.rb | 7 +++++++ ...rvice_service_template_transformation_plan_task.rb | 11 +++++++++++ 2 files changed, 18 insertions(+) create mode 100644 lib/miq_automation_engine/service_models/miq_ae_service_service_template_transformation_plan_request.rb create mode 100644 lib/miq_automation_engine/service_models/miq_ae_service_service_template_transformation_plan_task.rb diff --git a/lib/miq_automation_engine/service_models/miq_ae_service_service_template_transformation_plan_request.rb b/lib/miq_automation_engine/service_models/miq_ae_service_service_template_transformation_plan_request.rb new file mode 100644 index 000000000..9e6f3a43b --- /dev/null +++ b/lib/miq_automation_engine/service_models/miq_ae_service_service_template_transformation_plan_request.rb @@ -0,0 +1,7 @@ +module MiqAeMethodService + class MiqAeServiceServiceTemplateTransformationPlanRequest < MiqAeServiceServiceTemplateProvisionRequest + expose :source_vms, :association => true + expose :validate_vm, :association => true + expose :approve_vm, :association => true + end +end diff --git a/lib/miq_automation_engine/service_models/miq_ae_service_service_template_transformation_plan_task.rb b/lib/miq_automation_engine/service_models/miq_ae_service_service_template_transformation_plan_task.rb new file mode 100644 index 000000000..ee1a9ab54 --- /dev/null +++ b/lib/miq_automation_engine/service_models/miq_ae_service_service_template_transformation_plan_task.rb @@ -0,0 +1,11 @@ +module MiqAeMethodService + class MiqAeServiceServiceTemplateTransformationPlanTask < MiqAeServiceServiceTemplateProvisionTask + expose :update_transformation_progress + + def transformation_destination(source_obj) + ar_method do + wrap_results(@object.transformation_destination(source_obj.object_class.find(source_obj.id))) + end + end + end +end