You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jclouds.apache.org by Avi Ben-Harush <no...@github.com> on 2014/11/02 10:16:02 UTC

Re: [jclouds-labs-openstack] OS Ceilometer API support (#166)

Hi @jdaggett 
I've managed to overcome most of the issues using the following signature
MeterApi.listMeters(QueryOptions... options) 
where QueryOptions is extending the BaseHttpRequestOptions class.

i'm now left with the following -
meters and samples can get query params, problem is they cant be sent as null/empty string since ceilometer fails. example - {"filter": "", "orderby": "", "limit": ""}

need a way to avoid sending empty query params, any idea?


---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/166#issuecomment-61399081

Re: [jclouds-labs-openstack] OS Ceilometer API support (#166)

Posted by Avi Ben-Harush <av...@gmail.com>.
thanks Adrian, I was hoping this will be the answer J

On Tue, Nov 4, 2014 at 6:17 PM, Adrian Cole <ad...@gmail.com> wrote:
> You can create your own internal gson instance, use jsonwriter directly, or
> even stringbuilder. Mapbinder gives you the power, and this is a simple
> payload type!



-- 
Avi Ben-Harush

Re: [jclouds-labs-openstack] OS Ceilometer API support (#166)

Posted by Adrian Cole <ad...@gmail.com>.
You can create your own internal gson instance, use jsonwriter directly, or
even stringbuilder. Mapbinder gives you the power, and this is a simple
payload type!

Re: [jclouds-labs-openstack] OS Ceilometer API support (#166)

Posted by Avi Ben-Harush <av...@gmail.com>.
ok, so i've changed the code to use mapbiner, and encountered an encoding issue.
the filter/orderBy params can have ">= " inside the value. problem is
that the injected Json object is it is replacing those characters with
"\u003e\u003d".
any idea how to overcome this issue?

I've seen that the some people are recomending to use the
Gson.disableHtmlEscaping method.

any idea how to resolve this issue?

thanks

On Sun, Nov 2, 2014 at 8:57 PM, Adrian Cole <ad...@gmail.com> wrote:
> If only we could tell whoever designed this awful api to please stop making
> messes. OpenStack is full of some of the worst api design malpractice.
>
> You need a MapBinder to resolve this.



-- 
Avi Ben-Harush

Re: [jclouds-labs-openstack] OS Ceilometer API support (#166)

Posted by Adrian Cole <ad...@gmail.com>.
If only we could tell whoever designed this awful api to please stop making
messes. OpenStack is full of some of the worst api design malpractice.

You need a MapBinder to resolve this.