You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jclouds.apache.org by Eyal Kalimi <na...@gmail.com> on 2013/12/25 08:44:45 UTC

sending a specific request to cloud provider

Hi,
Is it possible to use org.jclouds.rest.HttpClient (or any other way) for
sending a request to cloud provider?
I need this for querying ec2 status checks which is not supported by the
API.

Thanks
Eyal

Re: sending a specific request to cloud provider

Posted by Ignasi Barrera <ig...@gmail.com>.
Hi Eyal,

Andrew's suggestion should help, although you'll have to manually invoke
the FormSigner to get the request signed and also manually build the
request with all required fields.

Adding that new call to the AWSInstanceApi should be pretty
straightforward. Wanna try opening a pull request? :) I can help you in the
process!

http://wiki.apache.org/jclouds/How%20to%20Contribute
 El 29/12/2013 09:49, "Eyal Kalimi" <na...@gmail.com> escribió:

> Hi,
> Thanks for your reply, the request is DescribeInstanceStatus
>
>
> 2013/12/25 Andrew Phillips <an...@apache.org>
>
>> Is it possible to use org.jclouds.rest.HttpClient (or any other way) for
>>> sending a request to cloud provider?
>>> I need this for querying ec2 status checks which is not supported by the
>>> API.
>>>
>>
>> You should be able to do something like
>>
>> HttpRequest req = HttpRequest.builder()....build(); // [1]
>> HttpResponse resp = ctx.utils().http().invoke(req); // [2]
>>
>> but you'd have to manage all the authentication and headers yourself :-(
>>
>> Out of curiosity: to which "unsupported request(s)" are you referring?
>>
>> ap
>>
>> [1] http://javadocs.jclouds.cloudbees.net/org/jclouds/
>> http/HttpRequest.html
>> [2] http://javadocs.jclouds.cloudbees.net/org/jclouds/
>> rest/Utils.html#http()
>>
>
>

Re: sending a specific request to cloud provider

Posted by Eyal Kalimi <na...@gmail.com>.
Hi,
Thanks for your reply, the request is DescribeInstanceStatus


2013/12/25 Andrew Phillips <an...@apache.org>

> Is it possible to use org.jclouds.rest.HttpClient (or any other way) for
>> sending a request to cloud provider?
>> I need this for querying ec2 status checks which is not supported by the
>> API.
>>
>
> You should be able to do something like
>
> HttpRequest req = HttpRequest.builder()....build(); // [1]
> HttpResponse resp = ctx.utils().http().invoke(req); // [2]
>
> but you'd have to manage all the authentication and headers yourself :-(
>
> Out of curiosity: to which "unsupported request(s)" are you referring?
>
> ap
>
> [1] http://javadocs.jclouds.cloudbees.net/org/jclouds/
> http/HttpRequest.html
> [2] http://javadocs.jclouds.cloudbees.net/org/jclouds/
> rest/Utils.html#http()
>

Re: sending a specific request to cloud provider

Posted by Andrew Phillips <an...@apache.org>.
> Is it possible to use org.jclouds.rest.HttpClient (or any other way) for
> sending a request to cloud provider?
> I need this for querying ec2 status checks which is not supported by the
> API.

You should be able to do something like

HttpRequest req = HttpRequest.builder()....build(); // [1]
HttpResponse resp = ctx.utils().http().invoke(req); // [2]

but you'd have to manage all the authentication and headers yourself :-(

Out of curiosity: to which "unsupported request(s)" are you referring?

ap

[1] http://javadocs.jclouds.cloudbees.net/org/jclouds/http/HttpRequest.html
[2] http://javadocs.jclouds.cloudbees.net/org/jclouds/rest/Utils.html#http()