Bug 744290 - deltacloud-client should throw an exception if an action fails
Summary: deltacloud-client should throw an exception if an action fails
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: CloudForms Cloud Engine
Classification: Retired
Component: rubygem-deltacloud-client
Version: 1.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
Assignee: Michal Fojtik
QA Contact: Ronelle Landy
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-10-07 19:00 UTC by Chris Lalancette
Modified: 2012-05-15 19:39 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-05-15 19:39:08 UTC


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2012:0593 0 normal SHIPPED_LIVE new packages: rubygem-deltacloud-client 2012-05-15 22:31:10 UTC

Description Chris Lalancette 2011-10-07 19:00:35 UTC
Description of problem:

This is a placeholder bug for the issue filed at apache:

https://issues.apache.org/jira/browse/DTACLOUD-89

Comment 2 wes hayutin 2012-01-03 17:43:11 UTC
adding ce-sprint-next bugs to ce-sprint

Comment 3 Michal Fojtik 2012-01-17 15:35:03 UTC
Can we close this as NOTABUG?

Comment 4 wes hayutin 2012-01-25 17:08:34 UTC
explain why this is not a bug, why is the jira open

Comment 5 Michal Fojtik 2012-01-26 14:54:02 UTC
From JIRA:

Which IMHO is the correct way. Simply the method is not available (not exists) for current instance of the Instance. To check if current instance support '.start!' operation (same for stop!, reboot!, etc..) you can do following: 

    instance.respond_to? :start! 
  
Eventually you can call: 

   instance.actions 

This should return following: 

    [["stop", "http://localhost:3002/api/instances/ed84016a-a000-4007-adeb-cde73d0f58a6/stop"], ["create_image", "http://localhost:3002/api/images;instance_id=ed84016a-a000-4007-adeb-cde73d0f58a6"]]

Comment 6 Ronelle Landy 2012-01-26 19:12:03 UTC
Copying comments from corresponding JIRA: DTACLOUD-89

Closing this JIRA issue out. Deltacloud does report when actions are not supported on an instance in a particular state:

Example: executing 'start' on a RUNNING instance

<error status='405' url='/api/instances/bf388696-55a4-4fb2-b2d8-170416651a28/start?format=xml'>
  <message>
    Requested method not allowed
  </message>
  <method>
    POST
  </method>
</error>

and executing GET /api/instance/:id will show the supported actions for the instance in its current state:

 <actions>
    <link href='http://server:3001/api/instances/bf388696-55a4-4fb2-b2d8-170416651a28/stop&#39; method='post' rel='stop' />
    <link href='http://server:3001/api/images;instance_id=bf388696-55a4-4fb2-b2d8-170416651a28&#39; method='post' rel='create_image' />
  </actions>

so comments (in Comment 5 above) are verified.

Will add testing for client responses to backend errors.

Comment 8 errata-xmlrpc 2012-05-15 19:39:08 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.

http://rhn.redhat.com/errata/RHEA-2012-0593.html


Note You need to log in before you can comment on or make changes to this bug.