Bug 1428250

Summary: [RFE] Edit action is not been supported for VMS resources.
Product: Red Hat CloudForms Management Engine Reporter: Neha Chugh <nchugh>
Component: APIAssignee: Jillian Tullo <jtullo>
Status: CLOSED CURRENTRELEASE QA Contact: Martin Kourim <mkourim>
Severity: high Docs Contact:
Priority: medium    
Version: 5.7.0CC: cpelland, ealcaniz, Egarciad, gtanzill, jhardy, jtullo, molasaga, obarenbo, simaishi
Target Milestone: GAKeywords: FutureFeature, RFE, TestOnly
Target Release: 5.9.0   
Hardware: All   
OS: Linux   
Whiteboard: rest:api
Fixed In Version: 5.9.0.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1445354 1445356 (view as bug list) Environment:
Last Closed: 2018-03-06 14:59:29 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1445354, 1445356, 1480288    

Description Neha Chugh 2017-03-02 06:51:40 UTC
Description of problem:

"edit" action is not been supported for vms resources. While trying to hit the post HTTP method for editing the name and description of specific VM ID using "edit" as action then it returns below message
{"error":{"kind":"bad_request","message":"Disabled Action edit for the vms resource specified","klass":"Api::BadRequestError"}}

Version-Release number of selected component (if applicable):
5.7.0

How reproducible:
Always

Steps to Reproduce:
1. Try to hit the curl command to edit the attributes of Vms resources
2. It will respond with message: {"error":{"kind":"bad_request","message":"Disabled Action edit for the vms resource specified","klass":"Api::BadRequestError"}}
3.

Actual results:
It should modify the attribute of specfic VM.

Expected results:
Bad request exception thrown as the "Edit" action is not enabled for vms resource.



Additional info:
 The same is working for service resource but not for vm resource.

Comment 2 Neha Chugh 2017-03-14 12:47:28 UTC
Greg: Can we have an ETA for this? or any workaround?

Comment 5 CFME Bot 2017-04-05 20:56:16 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/ec696a21ab33b3a9b6cb5b17aebf9599e47bc0e8

commit ec696a21ab33b3a9b6cb5b17aebf9599e47bc0e8
Author:     Jillian Tullo <jtullo>
AuthorDate: Mon Apr 3 15:53:42 2017 -0400
Commit:     Jillian Tullo <jtullo>
CommitDate: Tue Apr 4 11:12:08 2017 -0400

    edit vm
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1428250
    
    update custom identifier

 app/controllers/api/vms_controller.rb | 38 +++++++++++++++++++
 config/api.yml                        |  2 -
 spec/requests/api/vms_spec.rb         | 69 +++++++++++++++++++++++++++++++++++
 3 files changed, 107 insertions(+), 2 deletions(-)

Comment 8 Jillian Tullo 2017-04-18 18:51:43 UTC
Hi Mikel,

The flags to be backported to CF-4.2.3 were just added.

Thank you,
Jillian

Comment 12 Jillian Tullo 2017-07-24 13:33:40 UTC
Hi-

Editing will only account for basic VM attributes. Updating other attributes such as operating system will require a separate action. I would suggest creating a separate RFE BZ for these cases.

Comment 13 Martin Kourim 2017-10-24 11:31:46 UTC
Verified that it's now possible to edit vms resources using REST API.