diff --git a/lib/miq_automation_engine/service_models/miq_ae_service_manageiq-providers-vmware-infra_manager-vm.rb b/lib/miq_automation_engine/service_models/miq_ae_service_manageiq-providers-vmware-infra_manager-vm.rb index 675ed07f..d391b485 100644 --- a/lib/miq_automation_engine/service_models/miq_ae_service_manageiq-providers-vmware-infra_manager-vm.rb +++ b/lib/miq_automation_engine/service_models/miq_ae_service_manageiq-providers-vmware-infra_manager-vm.rb @@ -1,5 +1,9 @@ module MiqAeMethodService class MiqAeServiceManageIQ_Providers_Vmware_InfraManager_Vm < MiqAeServiceManageIQ_Providers_InfraManager_Vm + def set_description(new_description, options = {}) + sync_or_async_ems_operation(options[:sync], "set_description", [new_description]) + end + def set_number_of_cpus(count, options = {}) sync_or_async_ems_operation(options[:sync], "set_number_of_cpus", [count]) end diff --git a/spec/service_models/miq_ae_service_manageiq-providers-vmware-infra_manager-vm_spec.rb b/spec/service_models/miq_ae_service_manageiq-providers-vmware-infra_manager-vm_spec.rb index 4c0520a5..2137f031 100644 --- a/spec/service_models/miq_ae_service_manageiq-providers-vmware-infra_manager-vm_spec.rb +++ b/spec/service_models/miq_ae_service_manageiq-providers-vmware-infra_manager-vm_spec.rb @@ -15,6 +15,14 @@ } end + it "#set_description" do + service_vm.set_description("new-description") + + expect(MiqQueue.first).to have_attributes( + @base_queue_options.merge(:method_name => "set_description", :args => %w[new-description]) + ) + end + it "#set_number_of_cpus" do service_vm.set_number_of_cpus(1)