Description of problem:- Unable to rename VM using Rest API Version-Release number of selected component (if applicable): 5.11 How reproducible: Always Steps to Reproduce:- POST https://<cfme_fqdn>/api/vms/vm_id { "action" : "edit", "resource" : { "name" : "XYZ", "description" : "Renaming VM" } } Actual results:- Response:- { "error": { "kind": "bad_request", "message": "Cannot edit VM - Cannot edit values name", "klass": "Api::BadRequestError" } } Expected results: VM should be successfully renamed. Additional info: VMWare VMs can be renamed from the CloudForms UI as per below document:- https://www.manageiq.org/docs/reference/latest/doc-Provisioning_Virtual_Machines_and_Hosts/miq/index#renaming-a-provisioned-virtual-machine VMs can be renamed using API as per below document:- https://www.manageiq.org/docs/reference/euwe/doc-REST_API/miq/index#updating-resources
https://github.com/ManageIQ/manageiq-api/pull/832
New commit detected on ManageIQ/manageiq-api/master: https://github.com/ManageIQ/manageiq-api/commit/9288b752363c9282db488012ff72f849377a63f0 commit 9288b752363c9282db488012ff72f849377a63f0 Author: d-m-u <drewuhlmann> AuthorDate: Tue May 12 18:40:35 2020 +0000 Commit: d-m-u <drewuhlmann> CommitDate: Tue May 12 18:40:35 2020 +0000 Add name to valid edit attrs fixes https://bugzilla.redhat.com/show_bug.cgi?id=1833362 app/controllers/api/vms_controller.rb | 4 +- spec/requests/vms_spec.rb | 6 +- 2 files changed, 6 insertions(+), 4 deletions(-)
New commit detected on ManageIQ/manageiq-api/jansa: https://github.com/ManageIQ/manageiq-api/commit/7081cfb18b63bf967487de4f0f50dd1277ca0914 commit 7081cfb18b63bf967487de4f0f50dd1277ca0914 Author: Alberto Bellotti <abellotti.github.com> AuthorDate: Wed May 13 18:49:26 2020 +0000 Commit: Alberto Bellotti <abellotti.github.com> CommitDate: Wed May 13 18:49:26 2020 +0000 Merge pull request #832 from d-m-u/add_name_to_vm_valid_edit_attrs Add name to valid edit attrs for vms (cherry picked from commit 3da948436ad7b71cdab1d95843feb5e5a08d3b99) https://bugzilla.redhat.com/show_bug.cgi?id=1833362 app/controllers/api/vms_controller.rb | 4 +- spec/requests/vms_spec.rb | 6 +- 2 files changed, 6 insertions(+), 4 deletions(-)
FIXED. Verified on 5.11.6.0.20200526234234_3fcafeb.
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/RHSA-2020:2480