deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michal Fojtik (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DTACLOUD-240) Return code for vsphere instance reboot has changed from 202 to 200
Date Mon, 16 Jul 2012 12:16:33 GMT

    [ https://issues.apache.org/jira/browse/DTACLOUD-240?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13415047#comment-13415047
] 

Michal Fojtik commented on DTACLOUD-240:
----------------------------------------

Hi,

Using latest git:

firefly ~/code/core $ curl -X POST --user 'Administrator:100yard-' -H 'Accept: application/xml'
-v 'http://localhost:4001/api/instances/rhel6-mfojtik/reboot'
* About to connect() to localhost port 4001 (#0)
*   Trying ::1... Connection refused
*   Trying fe80::1... Connection refused
*   Trying 127.0.0.1... connected
* Connected to localhost (127.0.0.1) port 4001 (#0)
* Server auth using Basic with user 'Administrator'
> POST /api/instances/rhel6-mfojtik/reboot HTTP/1.1
> Authorization: Basic QWRtaW5pc3RyYXRvcjoxMDB5YXJkLQ==
> User-Agent: curl/7.21.4 (universal-apple-darwin11.0) libcurl/7.21.4 OpenSSL/0.9.8r zlib/1.2.5
> Host: localhost:4001
> Accept: application/xml
> 
< HTTP/1.1 303 See Other
< X-Frame-Options: sameorigin
< X-XSS-Protection: 1; mode=block
< Content-Type: text/html;charset=utf-8
< X-Backend-Runtime: 3.563232898712158
< Location: http://localhost:4001/api/instances/rhel6-mfojtik
< Server: Apache-Deltacloud/1.0.0
< Content-Length: 0
< Date: Mon, 16 Jul 2012 12:14:11 GMT
< Connection: keep-alive
< 
* Connection #0 to host localhost left intact
* Closing connection #0


The 303 is unfortunately appropriate here, because VSphere does not return the instance after
this call. Nor we can 'reconstruct' the instance without 'querying' VSphere. For that VSphere
for all actions returns 303 (Redirect) after actions. 
                
> Return code for vsphere instance reboot has changed from 202 to 200
> -------------------------------------------------------------------
>
>                 Key: DTACLOUD-240
>                 URL: https://issues.apache.org/jira/browse/DTACLOUD-240
>             Project: DeltaCloud
>          Issue Type: Bug
>          Components: Server
>         Environment: deltacloud git commit: 59960151dac052cfdec63387bce58c14963c849 
> rhel 6.2
>            Reporter: Ronelle Landy
>            Assignee: Michal Fojtik
>
> The following test code now fails when checking the return code for vsphere instance
reboot:
> // Reboot the instance
> >> respXML = restClient.post( path: '/api/instances/' + respInstance.data.@id.text()
+ '/reboot', contentType: ContentType.XML,headers: [Accept: 'application/xml'])
> >> assert respXML.status == 202
> assert respXML.status == 202
>        |       |      |
>        |       200    false
> ie; the return code used to be 202 and now it's 200. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message