Bug 1833362
| Summary: | Unable to rename VM using Rest API | ||
|---|---|---|---|
| Product: | Red Hat CloudForms Management Engine | Reporter: | Riya Banerjee <ribanerj> |
| Component: | API | Assignee: | drew uhlmann <duhlmann> |
| Status: | CLOSED ERRATA | QA Contact: | Parthvi Vala <pvala> |
| Severity: | low | Docs Contact: | Red Hat CloudForms Documentation <cloudforms-docs> |
| Priority: | medium | ||
| Version: | 5.11.5 | CC: | akarol, dmetzger, obarenbo, simaishi, yrudman |
| Target Milestone: | GA | Keywords: | ZStream |
| Target Release: | 5.11.6 | Flags: | pm-rhel:
cfme-5.11.z+
|
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | 5.11.6.0 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2020-06-10 13:39:11 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | CFME Core | Target Upstream Version: | |
| Embargoed: | |||
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 |
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