Hi Sebastien,

If you see the help doc's example it suggests how you pass in the URL. So,
you replace &amp with space and you run the following for any API that
needs to receive map arguments:

clodumonkey update cloudtouseobjectstore details[0].key=accesskey
details[0].value=valuex details[1].key=key2 details[1].value=valuey

`cloudmonkey` simply takes the args provided on the command line and joins
them using &amp to create a URL it requests (GET) to the management server.

The ACS ApiServer/Servlet does not handle multiple same named fields as
array (bug) and the way we handle maps is yet another ugly hack as the API
is query based (we cannot POST a json data for example, everything has be a
GET request with args as url query) and we're stuck with maintaining
backward compatibility.

The implementation differs (and used to differ a lot) for integration port
(8096) and normal authenticated server:

https://github.com/apache/cloudstack/blob/master/server/src/com/cloud/api/ApiServer.java#L493
(normal
handler)

https://github.com/apache/cloudstack/blob/master/server/src/com/cloud/api/ApiServer.java#L407
(integration
server handler)

Hope this helps.

Regards.


On Fri, Jun 20, 2014 at 2:11 PM, Sebastien Goasguen <run...@gmail.com>
wrote:

> Adding Min,
>
> @Min, it looks like you wrote:
>
> https://cwiki.apache.org/confluence/display/CLOUDSTACK/Migration+of+NFS+Secondary+Storage+to+Object+Store
>
> Can you confirm that this api (updateCloudToObjectStore) can be tested
> using the simulator and an external S3 store ?
> Should this work on basic zones ?
>
> On Jun 19, 2014, at 7:37 AM, Sebastien Goasguen <run...@gmail.com> wrote:
>
> > Hi,
> >
> > I am using the simulator and started a basic zone.
> > I have an S3 object store locally (riakCS), and I am trying to add it to
> the infra using the 'cloudtouseobjectstore' api with cloudmonkey.
> >
> > I tried with:
> >
> >> update cloudtouseobjectstore url=http://localhost:9081/riak-cs
> name=riak provider=riakcs
> details[0].key=accesskey&details[0].value=STU6Z-ZMK1TPMDAXL9I1&details[1].key=secretkey&details[1].value=8OuY3mHDXihu0Tdb2aVJ4vuYZLBAl5Z7NiWKsg==
> > 530: Failed to add data store: DataCenter id is null, and simulator
> image store has to be associated with a data center
> >
> > I am not sure if the arguments are right, has anyone done this before ?
> >
> > thanks,
> >
> > -sebastien
>
>

Reply via email to