Bug 1306833

Summary: cannot trigger VM retirement via API
Product: Red Hat CloudForms Management Engine Reporter: Colin Arnott <carnott>
Component: APIAssignee: Tim Wade <twade>
Status: CLOSED ERRATA QA Contact: Martin Kourim <mkourim>
Severity: high Docs Contact:
Priority: high    
Version: 5.5.0CC: benglish, carnott, cpelland, dajohnso, jhardy, jocarter, jprause, mfeifer, obarenbo, twade
Target Milestone: GAKeywords: Reopened, ZStream
Target Release: 5.6.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: rest:retirement
Fixed In Version: 5.6.0.0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1309746 (view as bug list) Environment:
Last Closed: 2016-06-29 15:41:19 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: 1309746    

Description Colin Arnott 2016-02-11 20:21:39 UTC
Description of problem:
you cannot triger retirement via an API call; service retirement can be trigger it via an API call and can result in the retirement of a VM, however without a service one would need to instantiate an automate model and interact with the automate APIs in order to directly retire a VM.

Version-Release number of selected component (if applicable):
cfme-5.5.2.4-1.el7cf.x86_64

Additional info:
this bug is requesting that there be an API created that allows one to trigger retirement by interacting with a VM object

Comment 2 Tim Wade 2016-02-15 16:04:41 UTC
Colin,

You can retire a vm with the following API call:

POST /api/vms/:id

{
  "action": "retire"
}

Please let me know if that doesn't meet your needs.

Thanks,
Tim

Comment 3 Colin Arnott 2016-02-16 15:38:04 UTC
This looks like what we would like. Thanks for the info.

Comment 6 Dave Johnson 2016-02-18 18:04:33 UTC
Tim/Colin,  if we can cleanly merge this to downstream 5.5.z, then there is no reason to wait.

Comment 9 Joe Rafaniello 2016-02-19 19:45:18 UTC
This was fixed upstream in https://github.com/ManageIQ/manageiq/pull/5718

Comment 11 Taras Lehinevych 2016-04-27 10:57:08 UTC
Verified in 5.6.0.4-beta2.3

Comment 13 errata-xmlrpc 2016-06-29 15:41:19 UTC
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-2016:1348