deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ronelle Landy (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DTACLOUD-459) run_command always returns 406 when specifying JSON as a response type
Date Mon, 11 Feb 2013 23:45:12 GMT

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

Ronelle Landy commented on DTACLOUD-459:
----------------------------------------

ACK - patch works for me:

curl -v -X POST --user "un:pw" -F "cmd=uname -a; ls -l" -F "private_key=`cat <location
to key>`" -F "username=ec2-user" "http://cloud-qe-3.idm.lab.bos.redhat.com:3006/api/instances/i-79cbfa09/run?format=json"

> POST /api/instances/i-79cbfa09/run?format=json HTTP/1.1
> Authorization: Basic 
> User-Agent: curl/7.21.7 (x86_64-redhat-linux-gnu) libcurl/7.21.7 NSS/3.13.1.0 zlib/1.2.5
libidn/1.22 libssh2/1.2.7
> Host: cloud-qe-3.idm.lab.bos.redhat.com:3006
> Accept: */*
> Content-Length: 2029
> Expect: 100-continue
> Content-Type: multipart/form-data; boundary=----------------------------a07e05615485
> 
* Done waiting for 100-continue
< HTTP/1.1 200 OK
< ETag: bc7d117d04b6468fef6c8fac6c81452b
< X-Deltacloud-Driver: ec2
< Content-Length: 262
< Date: Mon, 11 Feb 2013 23:41:46 GMT
< Content-Type: application/json
< Cache-Control: max-age=0, private, must-revalidate
< Server: Apache-Deltacloud/1.1.0
< Connection: keep-alive
< 
* Connection #0 to host cloud-qe-3.idm.lab.bos.redhat.com left intact
* Closing connection #0
{"instance":{"public_address":"ec2-204-236-242-72.compute-1.amazonaws.com","output":"Linux
ip-10-110-39-106 2.6.34.7-56.40.amzn1.x86_64 #1 SMP Fri Oct 22 18:48:49 UTC 2010 x86_64 x86_64
x86_64 GNU/Linux\ntotal 0\n","command":"uname -a; ls -l","id":"i-79cbfa09"}}[rlandy@localhost
~]$ 

Please push to master

                
> run_command always returns 406 when specifying JSON as a response type
> ----------------------------------------------------------------------
>
>                 Key: DTACLOUD-459
>                 URL: https://issues.apache.org/jira/browse/DTACLOUD-459
>             Project: DeltaCloud
>          Issue Type: Bug
>          Components: Server
>         Environment: Latest version on GitHub.
>            Reporter: Enrique Fernandez Casado
>         Attachments: 0001-Adds-JSON-as-a-supported-rtype-run_command-DTACLOUD-.patch
>
>
> Deltacloud server always returns 406 error when specifying JSON as response type for
a run_command request (same request works if you set XML as response type). It does not seem
to be prepared for serving JSON responses.
> https://github.com/apache/deltacloud/blob/master/server/lib/deltacloud/collections/instances.rb#L115

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message