Description of problem: To move VMWare VMs to folders ruby method move_into_folder(folder) can be used. While this method is not exposed to Automate Explorer hence can't use $evm.vmdb. Could this be exposed to Automate Explorer ? Version-Release number of selected component (if applicable): Red Hat CloudForms 5.10 How reproducible: Always Steps to move VM to a folder using a Ruby Method, but can not be done using Automate: 1. login to the appliance 2. `vmdb` 3. rails c 4. irb(main):004:0> vm = Vm.find_by_name('<vm_name>') 5. irb(main):013:0> folder = EmsFolder.find_by(:name => '<folder_name>') 6. irb(main):014:0> vm.move_into_folder(folder) unless folder.nil? Actual results: Not exposed to Automate Explorer hence can't use $evm.vmdb Expected results: This ruby method should be exposed to automate. Additional info: Does CloudForms plan to work on this in future?
Hey Dennis, could I get you to mark this as a 5.11 only RFE please? The code to do it is already on master, so technically it can be closed as current release. I believe this is VMWare only, there's a question about what else might support this.
Has documentation been made aware of this change?
Since the functionality was technically originally introduced in March of '17 I should sure hope so but who even knows? https://github.com/ManageIQ/manageiq/pull/14465 and https://github.com/ManageIQ/manageiq-automation_engine/pull/308
Hey Suyog, I don't know if the docs team is aware of this.
Hey Suyog, that I think looks good, except it's a bit more complicated. I've no idea what the right way of addressing this is, actually, because with https://github.com/ManageIQ/manageiq/pull/14465 move_into_folder is merely one of a bunch of methods that are now dynamically exposed on the Automate Service models (see https://github.com/ManageIQ/manageiq/pull/14465#issue-112112165).
This is needed for Monday, and the work's done, and I'd like to move it to post, but we have this unresolved docs question and I'm not sure what the next step with this but it's not actionable on my part.
Hey Tina, per comments 8 and 9 and 2, this is needed soon -- today -- and it's not actionable for me at the moment, could you please look at it?
Hi Dennis, The work for this is complete. There is likely more to be done documentation wise, but I'd like to see if this can move to POST for dev complete. Can we discuss? Thanks, Tina
Hi Dennis, After further review, I think this ticket can be moved to POST, and another ticket opened for the dynamically created service models. Setting to POST. Thanks, Tina
Hi Suyog, The method documentation looks good. I opened this new ticket for the additional documentation required to explain the dynamic service model generation. https://bugzilla.redhat.com/show_bug.cgi?id=1732169 Let me know if you have any questions. Thanks, Tina
Thanks, Tina. I'll address dynamic service model generation documentation via bug 1732169 in a separate PR.
Hi Satoe, I have checked this RFE on latest version of 5.10.8.0 and 5.10.11.17 but I am getting error while using 'move_into_folder'. Please let me know, In which version we are adding this RFE. Fixed in version is not available. Thanks, Ganesh
Hey Ganesh, please put the error in the ticket with the backtrace. Thanks.
And a reproducer, please!
Thanks for the information, Ganesh. The method in question is part of a vm relocation though, I wouldn't expect the lines you ran to work. It looks like, per https://github.com/ManageIQ/manageiq/commit/6ec2e3f6d3aa6c96bcf08b60c5208de9ccdb99b5, we're using that method as part of the LifeCycle/Migrate VM code, so I'm going to go ahead and tag Lucy on this, maybe she can tell you how to best test this.
Ganesh's testing seems good to me. The issue is move_to_folder method is not exposed to automate. [----] E, [2019-07-31T10:56:02.775518 #12289:44a5a5c] ERROR -- : <AEMethod test_method> DRb::DRbRemoteError: undefined method `move_into_folder' for #<MiqAeMethodService::MiqAeServiceManageIQ_Providers_Vmware_InfraManager_Vm:0x0000000003420f60> (NoMethodError) The method should be added into MiqAeServiceManageIQ_Providers_Vmware_InfraManager_Vm since it is VMware specific.
Thanks Lucy for your information. As per comment 24 'move_into_folder' is not exposed to automate. Hence failing this BZ.
https://github.com/ManageIQ/manageiq-automation_engine/pull/344 https://github.com/ManageIQ/manageiq/pull/19086
New commit detected on ManageIQ/manageiq/ivanchuk: https://github.com/ManageIQ/manageiq/commit/95cbe8eba21b5f2c55d08a61335118ee72f933ae commit 95cbe8eba21b5f2c55d08a61335118ee72f933ae Author: Greg McCullough <gmccullo> AuthorDate: Mon Aug 12 11:30:35 2019 -0400 Commit: Greg McCullough <gmccullo> CommitDate: Mon Aug 12 11:30:35 2019 -0400 Merge pull request #19086 from d-m-u/allow_move_into_folder_to_take_ems_ref Allow move_into_folder to optionally take string arg for automate engine exposure (cherry picked from commit e088fad7b7349ec960588498dc5d854b12486845) https://bugzilla.redhat.com/show_bug.cgi?id=1716858 app/models/vm_or_template/operations/relocation.rb | 19 +- spec/models/vm_migrate_task_spec.rb | 27 +- 2 files changed, 44 insertions(+), 2 deletions(-)
New commit detected on ManageIQ/manageiq-automation_engine/ivanchuk: https://github.com/ManageIQ/manageiq-automation_engine/commit/960830d3f106cd728319a3a677802659d43dc716 commit 960830d3f106cd728319a3a677802659d43dc716 Author: Greg McCullough <gmccullo> AuthorDate: Mon Aug 12 12:05:25 2019 -0400 Commit: Greg McCullough <gmccullo> CommitDate: Mon Aug 12 12:05:25 2019 -0400 Merge pull request #344 from d-m-u/expose_move_into_folder Expose move_into_folder on the engine (cherry picked from commit 445f6a0505eb025638853be5a59f41832cb1fa85) https://bugzilla.redhat.com/show_bug.cgi?id=1716858 lib/miq_automation_engine/service_models/miq_ae_service_manageiq-providers-vmware-infra_manager-vm.rb | 6 + spec/service_models/miq_ae_service_manageiq-providers-vmware-infra_manager-vm_spec.rb | 16 +- 2 files changed, 20 insertions(+), 2 deletions(-)
Fixed! I can able to VMWare vm to custom VM folder using exposed automate method - move_into_folder Verified on version: 5.11.0.19.20190813184334_ed72c9f
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2019:4199