You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by Paul Angus <pa...@shapeblue.com> on 2014/02/12 11:25:37 UTC

API Calls with key value pairs (Details)

Hi Devs,

I've noticed that a few newer API commands are requiring a slightly different format, which is to require a details parameter.

# cloudmonkey create storagepool scope=cluster clusterid=$CLUSTERID name=Pri1 podid=$POD1ID zoneid=$ZONEID provider=smb url='"cifs://10.0.1.27/hypervPri/stor/Primary?user=hyperv&password=hyperv13!&domain=angusnet.local"'

: Failed to add data store: Missing cifs user and password details. Add them as details parameter.

And from my S3 testing yesterday:

addImageStore&response=json&sessionkey=sctphRL69EJ5RZdAWIrzfZH7jIo%3D&name=S3Storage&provider=S3&details%5B0%5D.key=accesskey&details%5B0%5D.value=AKIAJBYAOXAE7JJYBKEQ&details%5B1%5D.key=secretkey&details%5B1%5D.value=3F76mmMubsZohZAnPutLkxK9adA1XQNBQAMUdv%2FO&details%5B2%5D.key=bucket&details%5B2%5D.value=cloudstack-sec-stor&details%5B3%5D.key=usehttps&details%5B3%5D.value=true&details%5B4%5D.key=endpoint&details%5B4%5D.value=s3.amazonaws.com&_=1392125369653

API Docs:
addImageStoreExample: details[0].key=accesskey&details[0].value=s389ddssaa&details[1].key=secretkey&details[1].value=8dshfsss

The format seems very cumbersome compared to accesskey=<value> secretkey=<value> - has this been a community decision to move in this direction that I've missed?

Regards

Paul Angus
Senior Consultant / Cloud Architect

[cid:image002.png@01CE1071.C6CC9C10]

S: +44 20 3603 0540<tel:+442036030540> | M: +4<tel:+447968161581>47711418784 | T: @CloudyAngus
paul.angus@shapeblue.com<ma...@shapeblue.com> | www.shapeblue.com<http://www.shapeblue.com/> | Twitter:@shapeblue<https://twitter.com/>
ShapeBlue Ltd, 53 Chandos Place, Covent Garden, London, WC2N 4HS

Need Enterprise Grade Support for Apache CloudStack?
Our CloudStack Infrastructure Support<http://shapeblue.com/cloudstack-infrastructure-support/> offers the best 24/7 SLA for CloudStack Environments.

Apache CloudStack Bootcamp training courses

**NEW!** CloudStack 4.2.1 training<http://shapeblue.com/cloudstack-training/>
18th-19th February 2014, Brazil. Classroom<http://shapeblue.com/cloudstack-training/>
17th-23rd March 2014, Region A. Instructor led, On-line<http://shapeblue.com/cloudstack-training/>
24th-28th March 2014, Region B. Instructor led, On-line<http://shapeblue.com/cloudstack-training/>
16th-20th June 2014, Region A. Instructor led, On-line<http://shapeblue.com/cloudstack-training/>
23rd-27th June 2014, Region B. Instructor led, On-line<http://shapeblue.com/cloudstack-training/>

This email and any attachments to it may be confidential and are intended solely for the use of the individual to whom it is addressed. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Shape Blue Ltd or related companies. If you are not the intended recipient of this email, you must neither take any action based upon its contents, nor copy or show it to anyone. Please contact the sender if you believe you have received this email in error. Shape Blue Ltd is a company incorporated in England & Wales. ShapeBlue Services India LLP is a company incorporated in India and is operated under license from Shape Blue Ltd. Shape Blue Brasil Consultoria Ltda is a company incorporated in Brasil and is operated under license from Shape Blue Ltd. ShapeBlue is a registered trademark.

RE: API Calls with key value pairs (Details)

Posted by Paul Angus <pa...@shapeblue.com>.
Yes, it's 4.3 rc4 I'm testing - built yesterday



Regards,

Paul Angus
Cloud Architect
S: +44 20 3603 0540 | M: +447711418784 | T: @CloudyAngus
paul.angus@shapeblue.com

-----Original Message-----
From: Daan Hoogland [mailto:daan.hoogland@gmail.com]
Sent: 12 February 2014 11:23
To: dev
Cc: Sebastien Goasguen
Subject: Re: API Calls with key value pairs (Details)

Paul, I heard rumours (Alex in the room) but can you confirm that 4.3 is the version which you are testing?

regards,
Daan


On Wed, Feb 12, 2014 at 11:25 AM, Paul Angus <pa...@shapeblue.com>wrote:

>  Hi Devs,
>
>
>
> I've noticed that a few newer API commands are requiring a slightly
> different format, which is to require a details parameter.
>
>
>
> # cloudmonkey create storagepool scope=cluster clusterid=$CLUSTERID
> name=Pri1 podid=$POD1ID zoneid=$ZONEID provider=smb url='"cifs://
> 10.0.1.27/hypervPri/stor/Primary?user=hyperv&password=hyperv13!&domain
> =angusnet.local
> "'
>
>
>
> : Failed to add data store: Missing cifs user and password details.
> Add them as details parameter.
>
>
>
> And from my S3 testing yesterday:
>
>
>
>
> addImageStore&response=json&sessionkey=sctphRL69EJ5RZdAWIrzfZH7jIo%3D&
> name=S3Storage&provider=S3&
> *details*%5B0%5D.key=accesskey&*details*
> %5B0%5D.value=AKIAJBYAOXAE7JJYBKEQ&*details*%5B1%5D.key=secretkey&
> *details*%5B1%5D.value=3F76mmMubsZohZAnPutLkxK9adA1XQNBQAMUdv%2FO&
> *details*%5B2%5D.key=bucket&*details*%5B2%5D.value=cloudstack-sec-stor
> &
> *details*%5B3%5D.key=usehttps&*details*%5B3%5D.value=true&*details*
> %5B4%5D.key=endpoint&*details*%5B4%5D.value=s3.amazonaws.com
> &_=1392125369653
>
>  API Docs:
>
> addImageStoreExample:
> details[0].key=accesskey&details[0].value=s389ddssaa&details[1].key=se
> cretkey&details[1].value=8dshfsss
>
>
>
> The format seems very cumbersome compared to accesskey=<value>
> secretkey=<value> - has this been a community decision to move in this
> direction that I've missed?
>
>
>
> Regards
>
>
>
> Paul Angus
>
> *Senior Consultant / Cloud Architect*
>
>
>
> [image: cid:image002.png@01CE1071.C6CC9C10]
>
>
>
> S: +44 20 3603 0540 <+442036030540> | M: +4 <+447968161581>47711418784
> |
> T: @CloudyAngus
>
> paul.angus@shapeblue.com | www.shapeblue.com |
> Twitter:@shapeblue<https://twitter.com/>
>
> ShapeBlue Ltd, 53 Chandos Place, Covent Garden, London, WC2N 4HS
>
>
>  Need Enterprise Grade Support for Apache CloudStack?
> Our CloudStack Infrastructure Support<http://shapeblue.com/cloudstack-infrastructure-support/>offers the best 24/7 SLA for CloudStack Environments.
>
> Apache CloudStack Bootcamp training courses
>
> **NEW!** CloudStack 4.2.1
> training<http://shapeblue.com/cloudstack-training/>
> 18th-19th February 2014, Brazil.
> Classroom<http://shapeblue.com/cloudstack-training/>
> 17th-23rd March 2014, Region A. Instructor led,
> On-line<http://shapeblue.com/cloudstack-training/>
> 24th-28th March 2014, Region B. Instructor led,
> On-line<http://shapeblue.com/cloudstack-training/>
> 16th-20th June 2014, Region A. Instructor led,
> On-line<http://shapeblue.com/cloudstack-training/>
> 23rd-27th June 2014, Region B. Instructor led,
> On-line<http://shapeblue.com/cloudstack-training/>
>
> This email and any attachments to it may be confidential and are
> intended solely for the use of the individual to whom it is addressed.
> Any views or opinions expressed are solely those of the author and do
> not necessarily represent those of Shape Blue Ltd or related
> companies. If you are not the intended recipient of this email, you
> must neither take any action based upon its contents, nor copy or show
> it to anyone. Please contact the sender if you believe you have
> received this email in error. Shape Blue Ltd is a company incorporated
> in England & Wales. ShapeBlue Services India LLP is a company
> incorporated in India and is operated under license from Shape Blue
> Ltd. Shape Blue Brasil Consultoria Ltda is a company incorporated in
> Brasil and is operated under license from Shape Blue Ltd. ShapeBlue is a registered trademark.
>



--
Daan
This email and any attachments to it may be confidential and are intended solely for the use of the individual to whom it is addressed. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Shape Blue Ltd or related companies. If you are not the intended recipient of this email, you must neither take any action based upon its contents, nor copy or show it to anyone. Please contact the sender if you believe you have received this email in error. Shape Blue Ltd is a company incorporated in England & Wales. ShapeBlue Services India LLP is a company incorporated in India and is operated under license from Shape Blue Ltd. Shape Blue Brasil Consultoria Ltda is a company incorporated in Brasil and is operated under license from Shape Blue Ltd. ShapeBlue is a registered trademark.

Re: API Calls with key value pairs (Details)

Posted by Daan Hoogland <da...@gmail.com>.
Paul, I heard rumours (Alex in the room) but can you confirm that 4.3 is
the version which you are testing?

regards,
Daan


On Wed, Feb 12, 2014 at 11:25 AM, Paul Angus <pa...@shapeblue.com>wrote:

>  Hi Devs,
>
>
>
> I've noticed that a few newer API commands are requiring a slightly
> different format, which is to require a details parameter.
>
>
>
> # cloudmonkey create storagepool scope=cluster clusterid=$CLUSTERID
> name=Pri1 podid=$POD1ID zoneid=$ZONEID provider=smb url='"cifs://
> 10.0.1.27/hypervPri/stor/Primary?user=hyperv&password=hyperv13!&domain=angusnet.local
> "'
>
>
>
> : Failed to add data store: Missing cifs user and password details. Add
> them as details parameter.
>
>
>
> And from my S3 testing yesterday:
>
>
>
>
> addImageStore&response=json&sessionkey=sctphRL69EJ5RZdAWIrzfZH7jIo%3D&name=S3Storage&provider=S3&
> *details*%5B0%5D.key=accesskey&*details*
> %5B0%5D.value=AKIAJBYAOXAE7JJYBKEQ&*details*%5B1%5D.key=secretkey&
> *details*%5B1%5D.value=3F76mmMubsZohZAnPutLkxK9adA1XQNBQAMUdv%2FO&
> *details*%5B2%5D.key=bucket&*details*%5B2%5D.value=cloudstack-sec-stor&
> *details*%5B3%5D.key=usehttps&*details*%5B3%5D.value=true&*details*
> %5B4%5D.key=endpoint&*details*%5B4%5D.value=s3.amazonaws.com
> &_=1392125369653
>
>  API Docs:
>
> addImageStoreExample:
> details[0].key=accesskey&details[0].value=s389ddssaa&details[1].key=secretkey&details[1].value=8dshfsss
>
>
>
> The format seems very cumbersome compared to accesskey=<value>
> secretkey=<value> - has this been a community decision to move in this
> direction that I've missed?
>
>
>
> Regards
>
>
>
> Paul Angus
>
> *Senior Consultant / Cloud Architect*
>
>
>
> [image: cid:image002.png@01CE1071.C6CC9C10]
>
>
>
> S: +44 20 3603 0540 <+442036030540> | M: +4 <+447968161581>47711418784 |
> T: @CloudyAngus
>
> paul.angus@shapeblue.com | www.shapeblue.com | Twitter:@shapeblue<https://twitter.com/>
>
> ShapeBlue Ltd, 53 Chandos Place, Covent Garden, London, WC2N 4HS
>
>
>  Need Enterprise Grade Support for Apache CloudStack?
> Our CloudStack Infrastructure Support<http://shapeblue.com/cloudstack-infrastructure-support/>offers the best 24/7 SLA for CloudStack Environments.
>
> Apache CloudStack Bootcamp training courses
>
> **NEW!** CloudStack 4.2.1 training<http://shapeblue.com/cloudstack-training/>
> 18th-19th February 2014, Brazil. Classroom<http://shapeblue.com/cloudstack-training/>
> 17th-23rd March 2014, Region A. Instructor led, On-line<http://shapeblue.com/cloudstack-training/>
> 24th-28th March 2014, Region B. Instructor led, On-line<http://shapeblue.com/cloudstack-training/>
> 16th-20th June 2014, Region A. Instructor led, On-line<http://shapeblue.com/cloudstack-training/>
> 23rd-27th June 2014, Region B. Instructor led, On-line<http://shapeblue.com/cloudstack-training/>
>
> This email and any attachments to it may be confidential and are intended
> solely for the use of the individual to whom it is addressed. Any views or
> opinions expressed are solely those of the author and do not necessarily
> represent those of Shape Blue Ltd or related companies. If you are not the
> intended recipient of this email, you must neither take any action based
> upon its contents, nor copy or show it to anyone. Please contact the sender
> if you believe you have received this email in error. Shape Blue Ltd is a
> company incorporated in England & Wales. ShapeBlue Services India LLP is a
> company incorporated in India and is operated under license from Shape Blue
> Ltd. Shape Blue Brasil Consultoria Ltda is a company incorporated in Brasil
> and is operated under license from Shape Blue Ltd. ShapeBlue is a
> registered trademark.
>



-- 
Daan

RE: API Calls with key value pairs (Details)

Posted by Devdeep Singh <de...@citrix.com>.
> -----Original Message-----
> From: Chip Childers [mailto:chipchilders@apache.org]
> Sent: Wednesday, February 12, 2014 7:43 PM
> To: dev@cloudstack.apache.org
> Subject: Re: API Calls with key value pairs (Details)
> 
> On Wed, Feb 12, 2014 at 8:24 AM, Devdeep Singh
> <de...@citrix.com> wrote:
> > The user name and password were never there in the key value pair for
> creating storage pool. This was done for adding smb as a primary storage and
> was done in 4.3 (adding smb as a pool type wasn't available in earlier release).
> >
> > Initially user details were passed in the url query string (for smb). However,
> it would mean adding a password with special characters could fail if the
> password wasn't encoded and then the entire url encoded again. So I
> updated it to pass smb user information in details. This is required only if a
> storage pool being added is of type smb.
> >
> > Regards,
> > Devdeep
> 
> Except it breaks backward compat, right?

No, it will not break backward compat with 4.2.x (or earlier). When smb was added as pool type (in 4.3), the user information was initially in the query string of the url parameter. I made a change to pass it in details. I am not aware of any storage pool type which takes user information in the url parameter. If there is any, the change only affects smb pool type (which has been added in 4.3).

Regards,
Devdeep

RE: API Calls with key value pairs (Details)

Posted by Edison Su <Ed...@citrix.com>.
The "details" mess should be easily fixed by using POST + JSON object, such as:
POST addimagestore with json content:
{
  Key1:value1,
  Key2: value2
}

It really takes you a while to understand what hell is " details[0].key=accesskey&details[0].value=s389ddssaa&details[1].key=secretkey&details[1].value=8dshfsss "

Maybe in CloudStack 5, we should clean up our APIs. 

> -----Original Message-----
> From: Marcus [mailto:shadowsor@gmail.com]
> Sent: Wednesday, February 12, 2014 11:26 AM
> To: dev@cloudstack.apache.org
> Cc: Animesh Chaturvedi
> Subject: Re: API Calls with key value pairs (Details)
> 
> If I'm not mistaken, I think the primary concern wasn't about breaking
> compatibility, but simply this:
> 
> "The format seems very cumbersome compared to accesskey=<value>
> secretkey=<value> - has this been a community decision to move in this
> direction that I've missed?"
> 
> I'd say yes, it was a community decision, and out of necessity, because
> various storage types are going to require various data. We can't (easily) hack
> on a table column/api param every time a new storage type needs a custom
> piece of data, so the 'details' abstracts that. This allows even third party
> vendors who simply ship a plugin, with no community involvment, to have
> custom parameters that don't need to be api params.
> 
> That said, we could probably add optional API params for a common subset
> of community maintained storage types, as a convenience, but whether to
> use the details parameter or create new ones is up to the API designer(s).
> 
> On Wed, Feb 12, 2014 at 10:44 AM, Min Chen <mi...@citrix.com> wrote:
> > AddImageStore has no such issues of breaking existing scripts at all. There
> has no change on that API in 4.3.
> >
> > Thanks
> > -min
> >
> > Sent from my iPhone
> >
> >> On Feb 12, 2014, at 9:36 AM, "Animesh Chaturvedi"
> <an...@citrix.com> wrote:
> >>
> >> Can you call out which scripts in particular? Copying min for S3 comment.
> May be i am missing something but i dont think Devdeep's change breaks
> compatibility. If we do not specify password in details  not sure how else the
> password special characters can be handled without double encoding of the
> URL ( first just the password and then the URL). But double encoding means
> server implementation is leaking into API. The API caller would have to
> encode the password first if it is in URL and then encode the URL.
> >>
> >>
> >> Thanks
> >> Animesh
> >>
> >>> On Feb 12, 2014, at 6:19 AM, "Alex Hitchins"
> <al...@shapeblue.com> wrote:
> >>>
> >>> I think that what Paul was saying. Scripts that have run no longer do.
> >>>
> >>> I don't think they are scripts written only in 4.3 environments either but I
> could be wrong.
> >>>
> >>>
> >>> Regards
> >>>
> >>> Alex Hitchins
> >>>
> >>> D: +44 1892 523 587 | S: +44 20 3603 0540 | M: +44 7788 423 969
> >>>
> >>> alex.hitchins@shapeblue.com
> >>>
> >>> -----Original Message-----
> >>> From: Chip Childers [mailto:chipchilders@apache.org]
> >>> Sent: 12 February 2014 14:13
> >>> To: dev@cloudstack.apache.org
> >>> Subject: Re: API Calls with key value pairs (Details)
> >>>
> >>>> On Wed, Feb 12, 2014 at 8:24 AM, Devdeep Singh
> <de...@citrix.com> wrote:
> >>>> The user name and password were never there in the key value pair
> for creating storage pool. This was done for adding smb as a primary storage
> and was done in 4.3 (adding smb as a pool type wasn't available in earlier
> release).
> >>>>
> >>>> Initially user details were passed in the url query string (for smb).
> However, it would mean adding a password with special characters could fail
> if the password wasn't encoded and then the entire url encoded again. So I
> updated it to pass smb user information in details. This is required only if a
> storage pool being added is of type smb.
> >>>>
> >>>> Regards,
> >>>> Devdeep
> >>>
> >>> Except it breaks backward compat, right?
> >>> Need Enterprise Grade Support for Apache CloudStack?
> >>> Our CloudStack Infrastructure
> Support<http://shapeblue.com/cloudstack-infrastructure-support/> offers
> the best 24/7 SLA for CloudStack Environments.
> >>>
> >>> Apache CloudStack Bootcamp training courses
> >>>
> >>> **NEW!** CloudStack 4.2.1
> >>> training<http://shapeblue.com/cloudstack-training/>
> >>> 18th-19th February 2014, Brazil.
> >>> Classroom<http://shapeblue.com/cloudstack-training/>
> >>> 17th-23rd March 2014, Region A. Instructor led,
> >>> On-line<http://shapeblue.com/cloudstack-training/>
> >>> 24th-28th March 2014, Region B. Instructor led,
> >>> On-line<http://shapeblue.com/cloudstack-training/>
> >>> 16th-20th June 2014, Region A. Instructor led,
> >>> On-line<http://shapeblue.com/cloudstack-training/>
> >>> 23rd-27th June 2014, Region B. Instructor led,
> >>> On-line<http://shapeblue.com/cloudstack-training/>
> >>>
> >>> This email and any attachments to it may be confidential and are
> intended solely for the use of the individual to whom it is addressed. Any
> views or opinions expressed are solely those of the author and do not
> necessarily represent those of Shape Blue Ltd or related companies. If you
> are not the intended recipient of this email, you must neither take any action
> based upon its contents, nor copy or show it to anyone. Please contact the
> sender if you believe you have received this email in error. Shape Blue Ltd is
> a company incorporated in England & Wales. ShapeBlue Services India LLP is a
> company incorporated in India and is operated under license from Shape
> Blue Ltd. Shape Blue Brasil Consultoria Ltda is a company incorporated in
> Brasil and is operated under license from Shape Blue Ltd. ShapeBlue is a
> registered trademark.

Re: API Calls with key value pairs (Details)

Posted by Daan Hoogland <da...@gmail.com>.
concerning api breakage please see my remarks on creating a vpc with
private gateway.

On Wed, Feb 12, 2014 at 8:25 PM, Marcus <sh...@gmail.com> wrote:
> If I'm not mistaken, I think the primary concern wasn't about breaking
> compatibility, but simply this:
>
> "The format seems very cumbersome compared to accesskey=<value>
> secretkey=<value> - has this been a community decision to move in this
> direction that I've missed?"
>
> I'd say yes, it was a community decision, and out of necessity,
> because various storage types are going to require various data. We
> can't (easily) hack on a table column/api param every time a new
> storage type needs a custom piece of data, so the 'details' abstracts
> that. This allows even third party vendors who simply ship a plugin,
> with no community involvment, to have custom parameters that don't
> need to be api params.
>
> That said, we could probably add optional API params for a common
> subset of community maintained storage types, as a convenience, but
> whether to use the details parameter or create new ones is up to the
> API designer(s).
>
> On Wed, Feb 12, 2014 at 10:44 AM, Min Chen <mi...@citrix.com> wrote:
>> AddImageStore has no such issues of breaking existing scripts at all. There has no change on that API in 4.3.
>>
>> Thanks
>> -min
>>
>> Sent from my iPhone
>>
>>> On Feb 12, 2014, at 9:36 AM, "Animesh Chaturvedi" <an...@citrix.com> wrote:
>>>
>>> Can you call out which scripts in particular? Copying min for S3 comment. May be i am missing something but i dont think Devdeep's change breaks  compatibility. If we do not specify password in details  not sure how else the password special characters can be handled without double encoding of the URL ( first just the password and then the URL). But double encoding means server implementation is leaking into API. The API caller would have to encode the password first if it is in URL and then encode the URL.
>>>
>>>
>>> Thanks
>>> Animesh
>>>
>>>> On Feb 12, 2014, at 6:19 AM, "Alex Hitchins" <al...@shapeblue.com> wrote:
>>>>
>>>> I think that what Paul was saying. Scripts that have run no longer do.
>>>>
>>>> I don't think they are scripts written only in 4.3 environments either but I could be wrong.
>>>>
>>>>
>>>> Regards
>>>>
>>>> Alex Hitchins
>>>>
>>>> D: +44 1892 523 587 | S: +44 20 3603 0540 | M: +44 7788 423 969
>>>>
>>>> alex.hitchins@shapeblue.com
>>>>
>>>> -----Original Message-----
>>>> From: Chip Childers [mailto:chipchilders@apache.org]
>>>> Sent: 12 February 2014 14:13
>>>> To: dev@cloudstack.apache.org
>>>> Subject: Re: API Calls with key value pairs (Details)
>>>>
>>>>> On Wed, Feb 12, 2014 at 8:24 AM, Devdeep Singh <de...@citrix.com> wrote:
>>>>> The user name and password were never there in the key value pair for creating storage pool. This was done for adding smb as a primary storage and was done in 4.3 (adding smb as a pool type wasn't available in earlier release).
>>>>>
>>>>> Initially user details were passed in the url query string (for smb). However, it would mean adding a password with special characters could fail if the password wasn't encoded and then the entire url encoded again. So I updated it to pass smb user information in details. This is required only if a storage pool being added is of type smb.
>>>>>
>>>>> Regards,
>>>>> Devdeep
>>>>
>>>> Except it breaks backward compat, right?
>>>> Need Enterprise Grade Support for Apache CloudStack?
>>>> Our CloudStack Infrastructure Support<http://shapeblue.com/cloudstack-infrastructure-support/> offers the best 24/7 SLA for CloudStack Environments.
>>>>
>>>> Apache CloudStack Bootcamp training courses
>>>>
>>>> **NEW!** CloudStack 4.2.1 training<http://shapeblue.com/cloudstack-training/>
>>>> 18th-19th February 2014, Brazil. Classroom<http://shapeblue.com/cloudstack-training/>
>>>> 17th-23rd March 2014, Region A. Instructor led, On-line<http://shapeblue.com/cloudstack-training/>
>>>> 24th-28th March 2014, Region B. Instructor led, On-line<http://shapeblue.com/cloudstack-training/>
>>>> 16th-20th June 2014, Region A. Instructor led, On-line<http://shapeblue.com/cloudstack-training/>
>>>> 23rd-27th June 2014, Region B. Instructor led, On-line<http://shapeblue.com/cloudstack-training/>
>>>>
>>>> This email and any attachments to it may be confidential and are intended solely for the use of the individual to whom it is addressed. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Shape Blue Ltd or related companies. If you are not the intended recipient of this email, you must neither take any action based upon its contents, nor copy or show it to anyone. Please contact the sender if you believe you have received this email in error. Shape Blue Ltd is a company incorporated in England & Wales. ShapeBlue Services India LLP is a company incorporated in India and is operated under license from Shape Blue Ltd. Shape Blue Brasil Consultoria Ltda is a company incorporated in Brasil and is operated under license from Shape Blue Ltd. ShapeBlue is a registered trademark.



-- 
Daan

Re: API Calls with key value pairs (Details)

Posted by Marcus <sh...@gmail.com>.
If I'm not mistaken, I think the primary concern wasn't about breaking
compatibility, but simply this:

"The format seems very cumbersome compared to accesskey=<value>
secretkey=<value> - has this been a community decision to move in this
direction that I've missed?"

I'd say yes, it was a community decision, and out of necessity,
because various storage types are going to require various data. We
can't (easily) hack on a table column/api param every time a new
storage type needs a custom piece of data, so the 'details' abstracts
that. This allows even third party vendors who simply ship a plugin,
with no community involvment, to have custom parameters that don't
need to be api params.

That said, we could probably add optional API params for a common
subset of community maintained storage types, as a convenience, but
whether to use the details parameter or create new ones is up to the
API designer(s).

On Wed, Feb 12, 2014 at 10:44 AM, Min Chen <mi...@citrix.com> wrote:
> AddImageStore has no such issues of breaking existing scripts at all. There has no change on that API in 4.3.
>
> Thanks
> -min
>
> Sent from my iPhone
>
>> On Feb 12, 2014, at 9:36 AM, "Animesh Chaturvedi" <an...@citrix.com> wrote:
>>
>> Can you call out which scripts in particular? Copying min for S3 comment. May be i am missing something but i dont think Devdeep's change breaks  compatibility. If we do not specify password in details  not sure how else the password special characters can be handled without double encoding of the URL ( first just the password and then the URL). But double encoding means server implementation is leaking into API. The API caller would have to encode the password first if it is in URL and then encode the URL.
>>
>>
>> Thanks
>> Animesh
>>
>>> On Feb 12, 2014, at 6:19 AM, "Alex Hitchins" <al...@shapeblue.com> wrote:
>>>
>>> I think that what Paul was saying. Scripts that have run no longer do.
>>>
>>> I don't think they are scripts written only in 4.3 environments either but I could be wrong.
>>>
>>>
>>> Regards
>>>
>>> Alex Hitchins
>>>
>>> D: +44 1892 523 587 | S: +44 20 3603 0540 | M: +44 7788 423 969
>>>
>>> alex.hitchins@shapeblue.com
>>>
>>> -----Original Message-----
>>> From: Chip Childers [mailto:chipchilders@apache.org]
>>> Sent: 12 February 2014 14:13
>>> To: dev@cloudstack.apache.org
>>> Subject: Re: API Calls with key value pairs (Details)
>>>
>>>> On Wed, Feb 12, 2014 at 8:24 AM, Devdeep Singh <de...@citrix.com> wrote:
>>>> The user name and password were never there in the key value pair for creating storage pool. This was done for adding smb as a primary storage and was done in 4.3 (adding smb as a pool type wasn't available in earlier release).
>>>>
>>>> Initially user details were passed in the url query string (for smb). However, it would mean adding a password with special characters could fail if the password wasn't encoded and then the entire url encoded again. So I updated it to pass smb user information in details. This is required only if a storage pool being added is of type smb.
>>>>
>>>> Regards,
>>>> Devdeep
>>>
>>> Except it breaks backward compat, right?
>>> Need Enterprise Grade Support for Apache CloudStack?
>>> Our CloudStack Infrastructure Support<http://shapeblue.com/cloudstack-infrastructure-support/> offers the best 24/7 SLA for CloudStack Environments.
>>>
>>> Apache CloudStack Bootcamp training courses
>>>
>>> **NEW!** CloudStack 4.2.1 training<http://shapeblue.com/cloudstack-training/>
>>> 18th-19th February 2014, Brazil. Classroom<http://shapeblue.com/cloudstack-training/>
>>> 17th-23rd March 2014, Region A. Instructor led, On-line<http://shapeblue.com/cloudstack-training/>
>>> 24th-28th March 2014, Region B. Instructor led, On-line<http://shapeblue.com/cloudstack-training/>
>>> 16th-20th June 2014, Region A. Instructor led, On-line<http://shapeblue.com/cloudstack-training/>
>>> 23rd-27th June 2014, Region B. Instructor led, On-line<http://shapeblue.com/cloudstack-training/>
>>>
>>> This email and any attachments to it may be confidential and are intended solely for the use of the individual to whom it is addressed. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Shape Blue Ltd or related companies. If you are not the intended recipient of this email, you must neither take any action based upon its contents, nor copy or show it to anyone. Please contact the sender if you believe you have received this email in error. Shape Blue Ltd is a company incorporated in England & Wales. ShapeBlue Services India LLP is a company incorporated in India and is operated under license from Shape Blue Ltd. Shape Blue Brasil Consultoria Ltda is a company incorporated in Brasil and is operated under license from Shape Blue Ltd. ShapeBlue is a registered trademark.

Re: API Calls with key value pairs (Details)

Posted by Min Chen <mi...@citrix.com>.
AddImageStore has no such issues of breaking existing scripts at all. There has no change on that API in 4.3.

Thanks
-min

Sent from my iPhone

> On Feb 12, 2014, at 9:36 AM, "Animesh Chaturvedi" <an...@citrix.com> wrote:
> 
> Can you call out which scripts in particular? Copying min for S3 comment. May be i am missing something but i dont think Devdeep's change breaks  compatibility. If we do not specify password in details  not sure how else the password special characters can be handled without double encoding of the URL ( first just the password and then the URL). But double encoding means server implementation is leaking into API. The API caller would have to encode the password first if it is in URL and then encode the URL. 
> 
> 
> Thanks
> Animesh
> 
>> On Feb 12, 2014, at 6:19 AM, "Alex Hitchins" <al...@shapeblue.com> wrote:
>> 
>> I think that what Paul was saying. Scripts that have run no longer do.
>> 
>> I don't think they are scripts written only in 4.3 environments either but I could be wrong.
>> 
>> 
>> Regards
>> 
>> Alex Hitchins
>> 
>> D: +44 1892 523 587 | S: +44 20 3603 0540 | M: +44 7788 423 969
>> 
>> alex.hitchins@shapeblue.com
>> 
>> -----Original Message-----
>> From: Chip Childers [mailto:chipchilders@apache.org]
>> Sent: 12 February 2014 14:13
>> To: dev@cloudstack.apache.org
>> Subject: Re: API Calls with key value pairs (Details)
>> 
>>> On Wed, Feb 12, 2014 at 8:24 AM, Devdeep Singh <de...@citrix.com> wrote:
>>> The user name and password were never there in the key value pair for creating storage pool. This was done for adding smb as a primary storage and was done in 4.3 (adding smb as a pool type wasn't available in earlier release).
>>> 
>>> Initially user details were passed in the url query string (for smb). However, it would mean adding a password with special characters could fail if the password wasn't encoded and then the entire url encoded again. So I updated it to pass smb user information in details. This is required only if a storage pool being added is of type smb.
>>> 
>>> Regards,
>>> Devdeep
>> 
>> Except it breaks backward compat, right?
>> Need Enterprise Grade Support for Apache CloudStack?
>> Our CloudStack Infrastructure Support<http://shapeblue.com/cloudstack-infrastructure-support/> offers the best 24/7 SLA for CloudStack Environments.
>> 
>> Apache CloudStack Bootcamp training courses
>> 
>> **NEW!** CloudStack 4.2.1 training<http://shapeblue.com/cloudstack-training/>
>> 18th-19th February 2014, Brazil. Classroom<http://shapeblue.com/cloudstack-training/>
>> 17th-23rd March 2014, Region A. Instructor led, On-line<http://shapeblue.com/cloudstack-training/>
>> 24th-28th March 2014, Region B. Instructor led, On-line<http://shapeblue.com/cloudstack-training/>
>> 16th-20th June 2014, Region A. Instructor led, On-line<http://shapeblue.com/cloudstack-training/>
>> 23rd-27th June 2014, Region B. Instructor led, On-line<http://shapeblue.com/cloudstack-training/>
>> 
>> This email and any attachments to it may be confidential and are intended solely for the use of the individual to whom it is addressed. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Shape Blue Ltd or related companies. If you are not the intended recipient of this email, you must neither take any action based upon its contents, nor copy or show it to anyone. Please contact the sender if you believe you have received this email in error. Shape Blue Ltd is a company incorporated in England & Wales. ShapeBlue Services India LLP is a company incorporated in India and is operated under license from Shape Blue Ltd. Shape Blue Brasil Consultoria Ltda is a company incorporated in Brasil and is operated under license from Shape Blue Ltd. ShapeBlue is a registered trademark.

Re: API Calls with key value pairs (Details)

Posted by Animesh Chaturvedi <an...@citrix.com>.
Can you call out which scripts in particular? Copying min for S3 comment. May be i am missing something but i dont think Devdeep's change breaks  compatibility. If we do not specify password in details  not sure how else the password special characters can be handled without double encoding of the URL ( first just the password and then the URL). But double encoding means server implementation is leaking into API. The API caller would have to encode the password first if it is in URL and then encode the URL. 


Thanks
Animesh

On Feb 12, 2014, at 6:19 AM, "Alex Hitchins" <al...@shapeblue.com> wrote:

> I think that what Paul was saying. Scripts that have run no longer do.
> 
> I don't think they are scripts written only in 4.3 environments either but I could be wrong.
> 
> 
> Regards
> 
> Alex Hitchins
> 
> D: +44 1892 523 587 | S: +44 20 3603 0540 | M: +44 7788 423 969
> 
> alex.hitchins@shapeblue.com
> 
> -----Original Message-----
> From: Chip Childers [mailto:chipchilders@apache.org]
> Sent: 12 February 2014 14:13
> To: dev@cloudstack.apache.org
> Subject: Re: API Calls with key value pairs (Details)
> 
> On Wed, Feb 12, 2014 at 8:24 AM, Devdeep Singh <de...@citrix.com> wrote:
>> The user name and password were never there in the key value pair for creating storage pool. This was done for adding smb as a primary storage and was done in 4.3 (adding smb as a pool type wasn't available in earlier release).
>> 
>> Initially user details were passed in the url query string (for smb). However, it would mean adding a password with special characters could fail if the password wasn't encoded and then the entire url encoded again. So I updated it to pass smb user information in details. This is required only if a storage pool being added is of type smb.
>> 
>> Regards,
>> Devdeep
> 
> Except it breaks backward compat, right?
> Need Enterprise Grade Support for Apache CloudStack?
> Our CloudStack Infrastructure Support<http://shapeblue.com/cloudstack-infrastructure-support/> offers the best 24/7 SLA for CloudStack Environments.
> 
> Apache CloudStack Bootcamp training courses
> 
> **NEW!** CloudStack 4.2.1 training<http://shapeblue.com/cloudstack-training/>
> 18th-19th February 2014, Brazil. Classroom<http://shapeblue.com/cloudstack-training/>
> 17th-23rd March 2014, Region A. Instructor led, On-line<http://shapeblue.com/cloudstack-training/>
> 24th-28th March 2014, Region B. Instructor led, On-line<http://shapeblue.com/cloudstack-training/>
> 16th-20th June 2014, Region A. Instructor led, On-line<http://shapeblue.com/cloudstack-training/>
> 23rd-27th June 2014, Region B. Instructor led, On-line<http://shapeblue.com/cloudstack-training/>
> 
> This email and any attachments to it may be confidential and are intended solely for the use of the individual to whom it is addressed. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Shape Blue Ltd or related companies. If you are not the intended recipient of this email, you must neither take any action based upon its contents, nor copy or show it to anyone. Please contact the sender if you believe you have received this email in error. Shape Blue Ltd is a company incorporated in England & Wales. ShapeBlue Services India LLP is a company incorporated in India and is operated under license from Shape Blue Ltd. Shape Blue Brasil Consultoria Ltda is a company incorporated in Brasil and is operated under license from Shape Blue Ltd. ShapeBlue is a registered trademark.

Re: API Calls with key value pairs (Details)

Posted by John Burwell <jb...@basho.com>.
All,

If the API is backwards compatible, any scripts using 4.2 APIs should work
without modification on 4.3.  If they don't, then we either have a bug or
API breakage that requires a bump to 5.0.  Put another way, if we had an
API test suite, the 4.2 tagged version should completely pass on 4.3 though
it wouldn't exercise all of the API features.

Thanks,
-John


On Wed, Feb 12, 2014 at 9:36 AM, Paul Angus <pa...@shapeblue.com>wrote:

> In the case of hyper-v - technically no, as it's a new feature to 4.3 it
> only breaks 'beta' versiosn of 4.3
>
> In the case of addimagestore - I'm not sure how long that's been there, I
> came across it because I've just recently been testing S3 as secondary
> storage.
>
>
> My initial query was around whether this use of 'details' with key/value
> pairs is a community decision that we're going to start seeing more of and
> that I/we end users need to understand and adapt to.
>
>
> Regards,
>
> Paul Angus
> Cloud Architect
> S: +44 20 3603 0540 | M: +447711418784 | T: @CloudyAngus
> paul.angus@shapeblue.com
>
> -----Original Message-----
> From: Alex Hitchins [mailto:alex.hitchins@shapeblue.com]
> Sent: 12 February 2014 14:19
> To: dev@cloudstack.apache.org
> Subject: RE: API Calls with key value pairs (Details)
>
> I think that what Paul was saying. Scripts that have run no longer do.
>
> I don't think they are scripts written only in 4.3 environments either but
> I could be wrong.
>
>
> Regards
>
> Alex Hitchins
>
> D: +44 1892 523 587 | S: +44 20 3603 0540 | M: +44 7788 423 969
>
> alex.hitchins@shapeblue.com
>
> -----Original Message-----
> From: Chip Childers [mailto:chipchilders@apache.org]
> Sent: 12 February 2014 14:13
> To: dev@cloudstack.apache.org
> Subject: Re: API Calls with key value pairs (Details)
>
> On Wed, Feb 12, 2014 at 8:24 AM, Devdeep Singh <de...@citrix.com>
> wrote:
> > The user name and password were never there in the key value pair for
> creating storage pool. This was done for adding smb as a primary storage
> and was done in 4.3 (adding smb as a pool type wasn't available in earlier
> release).
> >
> > Initially user details were passed in the url query string (for smb).
> However, it would mean adding a password with special characters could fail
> if the password wasn't encoded and then the entire url encoded again. So I
> updated it to pass smb user information in details. This is required only
> if a storage pool being added is of type smb.
> >
> > Regards,
> > Devdeep
>
> Except it breaks backward compat, right?
> Need Enterprise Grade Support for Apache CloudStack?
> Our CloudStack Infrastructure Support<
> http://shapeblue.com/cloudstack-infrastructure-support/> offers the best
> 24/7 SLA for CloudStack Environments.
>
> Apache CloudStack Bootcamp training courses
>
> **NEW!** CloudStack 4.2.1 training<
> http://shapeblue.com/cloudstack-training/>
> 18th-19th February 2014, Brazil. Classroom<
> http://shapeblue.com/cloudstack-training/>
> 17th-23rd March 2014, Region A. Instructor led, On-line<
> http://shapeblue.com/cloudstack-training/>
> 24th-28th March 2014, Region B. Instructor led, On-line<
> http://shapeblue.com/cloudstack-training/>
> 16th-20th June 2014, Region A. Instructor led, On-line<
> http://shapeblue.com/cloudstack-training/>
> 23rd-27th June 2014, Region B. Instructor led, On-line<
> http://shapeblue.com/cloudstack-training/>
>
> This email and any attachments to it may be confidential and are intended
> solely for the use of the individual to whom it is addressed. Any views or
> opinions expressed are solely those of the author and do not necessarily
> represent those of Shape Blue Ltd or related companies. If you are not the
> intended recipient of this email, you must neither take any action based
> upon its contents, nor copy or show it to anyone. Please contact the sender
> if you believe you have received this email in error. Shape Blue Ltd is a
> company incorporated in England & Wales. ShapeBlue Services India LLP is a
> company incorporated in India and is operated under license from Shape Blue
> Ltd. Shape Blue Brasil Consultoria Ltda is a company incorporated in Brasil
> and is operated under license from Shape Blue Ltd. ShapeBlue is a
> registered trademark.
> This email and any attachments to it may be confidential and are intended
> solely for the use of the individual to whom it is addressed. Any views or
> opinions expressed are solely those of the author and do not necessarily
> represent those of Shape Blue Ltd or related companies. If you are not the
> intended recipient of this email, you must neither take any action based
> upon its contents, nor copy or show it to anyone. Please contact the sender
> if you believe you have received this email in error. Shape Blue Ltd is a
> company incorporated in England & Wales. ShapeBlue Services India LLP is a
> company incorporated in India and is operated under license from Shape Blue
> Ltd. Shape Blue Brasil Consultoria Ltda is a company incorporated in Brasil
> and is operated under license from Shape Blue Ltd. ShapeBlue is a
> registered trademark.
>

Re: API Calls with key value pairs (Details)

Posted by Min Chen <mi...@citrix.com>.
Paul, 

  AddImageStore is a new API added in 4.2, it has been designed like that to handle different meta information required by different image store provider. This API does not have any backwards compatibility issue.  I was never aware of any community consensus to pass extra detail information for our API. Actually I followed the pattern used in existing APIs. I agee with you that This way to pass hash like detail information is indeed cumbersome, the better way is to use JSON body instead of putting everything as query parameters for such varying detail information.

Thanks
-min

Sent from my iPhone

> On Feb 12, 2014, at 6:37 AM, "Paul Angus" <pa...@shapeblue.com> wrote:
> 
> In the case of hyper-v - technically no, as it's a new feature to 4.3 it only breaks 'beta' versiosn of 4.3
> 
> In the case of addimagestore - I'm not sure how long that's been there, I came across it because I've just recently been testing S3 as secondary storage.
> 
> 
> My initial query was around whether this use of 'details' with key/value pairs is a community decision that we're going to start seeing more of and that I/we end users need to understand and adapt to.
> 
> 
> Regards,
> 
> Paul Angus
> Cloud Architect
> S: +44 20 3603 0540 | M: +447711418784 | T: @CloudyAngus
> paul.angus@shapeblue.com
> 
> -----Original Message-----
> From: Alex Hitchins [mailto:alex.hitchins@shapeblue.com]
> Sent: 12 February 2014 14:19
> To: dev@cloudstack.apache.org
> Subject: RE: API Calls with key value pairs (Details)
> 
> I think that what Paul was saying. Scripts that have run no longer do.
> 
> I don't think they are scripts written only in 4.3 environments either but I could be wrong.
> 
> 
> Regards
> 
> Alex Hitchins
> 
> D: +44 1892 523 587 | S: +44 20 3603 0540 | M: +44 7788 423 969
> 
> alex.hitchins@shapeblue.com
> 
> -----Original Message-----
> From: Chip Childers [mailto:chipchilders@apache.org]
> Sent: 12 February 2014 14:13
> To: dev@cloudstack.apache.org
> Subject: Re: API Calls with key value pairs (Details)
> 
>> On Wed, Feb 12, 2014 at 8:24 AM, Devdeep Singh <de...@citrix.com> wrote:
>> The user name and password were never there in the key value pair for creating storage pool. This was done for adding smb as a primary storage and was done in 4.3 (adding smb as a pool type wasn't available in earlier release).
>> 
>> Initially user details were passed in the url query string (for smb). However, it would mean adding a password with special characters could fail if the password wasn't encoded and then the entire url encoded again. So I updated it to pass smb user information in details. This is required only if a storage pool being added is of type smb.
>> 
>> Regards,
>> Devdeep
> 
> Except it breaks backward compat, right?
> Need Enterprise Grade Support for Apache CloudStack?
> Our CloudStack Infrastructure Support<http://shapeblue.com/cloudstack-infrastructure-support/> offers the best 24/7 SLA for CloudStack Environments.
> 
> Apache CloudStack Bootcamp training courses
> 
> **NEW!** CloudStack 4.2.1 training<http://shapeblue.com/cloudstack-training/>
> 18th-19th February 2014, Brazil. Classroom<http://shapeblue.com/cloudstack-training/>
> 17th-23rd March 2014, Region A. Instructor led, On-line<http://shapeblue.com/cloudstack-training/>
> 24th-28th March 2014, Region B. Instructor led, On-line<http://shapeblue.com/cloudstack-training/>
> 16th-20th June 2014, Region A. Instructor led, On-line<http://shapeblue.com/cloudstack-training/>
> 23rd-27th June 2014, Region B. Instructor led, On-line<http://shapeblue.com/cloudstack-training/>
> 
> This email and any attachments to it may be confidential and are intended solely for the use of the individual to whom it is addressed. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Shape Blue Ltd or related companies. If you are not the intended recipient of this email, you must neither take any action based upon its contents, nor copy or show it to anyone. Please contact the sender if you believe you have received this email in error. Shape Blue Ltd is a company incorporated in England & Wales. ShapeBlue Services India LLP is a company incorporated in India and is operated under license from Shape Blue Ltd. Shape Blue Brasil Consultoria Ltda is a company incorporated in Brasil and is operated under license from Shape Blue Ltd. ShapeBlue is a registered trademark.
> This email and any attachments to it may be confidential and are intended solely for the use of the individual to whom it is addressed. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Shape Blue Ltd or related companies. If you are not the intended recipient of this email, you must neither take any action based upon its contents, nor copy or show it to anyone. Please contact the sender if you believe you have received this email in error. Shape Blue Ltd is a company incorporated in England & Wales. ShapeBlue Services India LLP is a company incorporated in India and is operated under license from Shape Blue Ltd. Shape Blue Brasil Consultoria Ltda is a company incorporated in Brasil and is operated under license from Shape Blue Ltd. ShapeBlue is a registered trademark.

RE: API Calls with key value pairs (Details)

Posted by Paul Angus <pa...@shapeblue.com>.
In the case of hyper-v - technically no, as it's a new feature to 4.3 it only breaks 'beta' versiosn of 4.3

In the case of addimagestore - I'm not sure how long that's been there, I came across it because I've just recently been testing S3 as secondary storage.


My initial query was around whether this use of 'details' with key/value pairs is a community decision that we're going to start seeing more of and that I/we end users need to understand and adapt to.


Regards,

Paul Angus
Cloud Architect
S: +44 20 3603 0540 | M: +447711418784 | T: @CloudyAngus
paul.angus@shapeblue.com

-----Original Message-----
From: Alex Hitchins [mailto:alex.hitchins@shapeblue.com]
Sent: 12 February 2014 14:19
To: dev@cloudstack.apache.org
Subject: RE: API Calls with key value pairs (Details)

I think that what Paul was saying. Scripts that have run no longer do.

I don't think they are scripts written only in 4.3 environments either but I could be wrong.


Regards

Alex Hitchins

D: +44 1892 523 587 | S: +44 20 3603 0540 | M: +44 7788 423 969

alex.hitchins@shapeblue.com

-----Original Message-----
From: Chip Childers [mailto:chipchilders@apache.org]
Sent: 12 February 2014 14:13
To: dev@cloudstack.apache.org
Subject: Re: API Calls with key value pairs (Details)

On Wed, Feb 12, 2014 at 8:24 AM, Devdeep Singh <de...@citrix.com> wrote:
> The user name and password were never there in the key value pair for creating storage pool. This was done for adding smb as a primary storage and was done in 4.3 (adding smb as a pool type wasn't available in earlier release).
>
> Initially user details were passed in the url query string (for smb). However, it would mean adding a password with special characters could fail if the password wasn't encoded and then the entire url encoded again. So I updated it to pass smb user information in details. This is required only if a storage pool being added is of type smb.
>
> Regards,
> Devdeep

Except it breaks backward compat, right?
Need Enterprise Grade Support for Apache CloudStack?
Our CloudStack Infrastructure Support<http://shapeblue.com/cloudstack-infrastructure-support/> offers the best 24/7 SLA for CloudStack Environments.

Apache CloudStack Bootcamp training courses

**NEW!** CloudStack 4.2.1 training<http://shapeblue.com/cloudstack-training/>
18th-19th February 2014, Brazil. Classroom<http://shapeblue.com/cloudstack-training/>
17th-23rd March 2014, Region A. Instructor led, On-line<http://shapeblue.com/cloudstack-training/>
24th-28th March 2014, Region B. Instructor led, On-line<http://shapeblue.com/cloudstack-training/>
16th-20th June 2014, Region A. Instructor led, On-line<http://shapeblue.com/cloudstack-training/>
23rd-27th June 2014, Region B. Instructor led, On-line<http://shapeblue.com/cloudstack-training/>

This email and any attachments to it may be confidential and are intended solely for the use of the individual to whom it is addressed. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Shape Blue Ltd or related companies. If you are not the intended recipient of this email, you must neither take any action based upon its contents, nor copy or show it to anyone. Please contact the sender if you believe you have received this email in error. Shape Blue Ltd is a company incorporated in England & Wales. ShapeBlue Services India LLP is a company incorporated in India and is operated under license from Shape Blue Ltd. Shape Blue Brasil Consultoria Ltda is a company incorporated in Brasil and is operated under license from Shape Blue Ltd. ShapeBlue is a registered trademark.
This email and any attachments to it may be confidential and are intended solely for the use of the individual to whom it is addressed. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Shape Blue Ltd or related companies. If you are not the intended recipient of this email, you must neither take any action based upon its contents, nor copy or show it to anyone. Please contact the sender if you believe you have received this email in error. Shape Blue Ltd is a company incorporated in England & Wales. ShapeBlue Services India LLP is a company incorporated in India and is operated under license from Shape Blue Ltd. Shape Blue Brasil Consultoria Ltda is a company incorporated in Brasil and is operated under license from Shape Blue Ltd. ShapeBlue is a registered trademark.

RE: API Calls with key value pairs (Details)

Posted by Alex Hitchins <al...@shapeblue.com>.
I think that what Paul was saying. Scripts that have run no longer do.

I don't think they are scripts written only in 4.3 environments either but I could be wrong.


Regards

Alex Hitchins

D: +44 1892 523 587 | S: +44 20 3603 0540 | M: +44 7788 423 969

alex.hitchins@shapeblue.com

-----Original Message-----
From: Chip Childers [mailto:chipchilders@apache.org]
Sent: 12 February 2014 14:13
To: dev@cloudstack.apache.org
Subject: Re: API Calls with key value pairs (Details)

On Wed, Feb 12, 2014 at 8:24 AM, Devdeep Singh <de...@citrix.com> wrote:
> The user name and password were never there in the key value pair for creating storage pool. This was done for adding smb as a primary storage and was done in 4.3 (adding smb as a pool type wasn't available in earlier release).
>
> Initially user details were passed in the url query string (for smb). However, it would mean adding a password with special characters could fail if the password wasn't encoded and then the entire url encoded again. So I updated it to pass smb user information in details. This is required only if a storage pool being added is of type smb.
>
> Regards,
> Devdeep

Except it breaks backward compat, right?
Need Enterprise Grade Support for Apache CloudStack?
Our CloudStack Infrastructure Support<http://shapeblue.com/cloudstack-infrastructure-support/> offers the best 24/7 SLA for CloudStack Environments.

Apache CloudStack Bootcamp training courses

**NEW!** CloudStack 4.2.1 training<http://shapeblue.com/cloudstack-training/>
18th-19th February 2014, Brazil. Classroom<http://shapeblue.com/cloudstack-training/>
17th-23rd March 2014, Region A. Instructor led, On-line<http://shapeblue.com/cloudstack-training/>
24th-28th March 2014, Region B. Instructor led, On-line<http://shapeblue.com/cloudstack-training/>
16th-20th June 2014, Region A. Instructor led, On-line<http://shapeblue.com/cloudstack-training/>
23rd-27th June 2014, Region B. Instructor led, On-line<http://shapeblue.com/cloudstack-training/>

This email and any attachments to it may be confidential and are intended solely for the use of the individual to whom it is addressed. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Shape Blue Ltd or related companies. If you are not the intended recipient of this email, you must neither take any action based upon its contents, nor copy or show it to anyone. Please contact the sender if you believe you have received this email in error. Shape Blue Ltd is a company incorporated in England & Wales. ShapeBlue Services India LLP is a company incorporated in India and is operated under license from Shape Blue Ltd. Shape Blue Brasil Consultoria Ltda is a company incorporated in Brasil and is operated under license from Shape Blue Ltd. ShapeBlue is a registered trademark.

Re: API Calls with key value pairs (Details)

Posted by Chip Childers <ch...@apache.org>.
On Wed, Feb 12, 2014 at 8:24 AM, Devdeep Singh <de...@citrix.com> wrote:
> The user name and password were never there in the key value pair for creating storage pool. This was done for adding smb as a primary storage and was done in 4.3 (adding smb as a pool type wasn't available in earlier release).
>
> Initially user details were passed in the url query string (for smb). However, it would mean adding a password with special characters could fail if the password wasn't encoded and then the entire url encoded again. So I updated it to pass smb user information in details. This is required only if a storage pool being added is of type smb.
>
> Regards,
> Devdeep

Except it breaks backward compat, right?

RE: API Calls with key value pairs (Details)

Posted by Devdeep Singh <de...@citrix.com>.
The user name and password were never there in the key value pair for creating storage pool. This was done for adding smb as a primary storage and was done in 4.3 (adding smb as a pool type wasn't available in earlier release).

Initially user details were passed in the url query string (for smb). However, it would mean adding a password with special characters could fail if the password wasn't encoded and then the entire url encoded again. So I updated it to pass smb user information in details. This is required only if a storage pool being added is of type smb.

Regards,
Devdeep

-----Original Message-----
From: sebgoa [mailto:runseb@gmail.com] 
Sent: Wednesday, February 12, 2014 5:56 PM
To: Paul Angus
Cc: dev@cloudstack.apache.org
Subject: Re: API Calls with key value pairs (Details)


On Feb 12, 2014, at 11:25 AM, Paul Angus <pa...@shapeblue.com> wrote:

> Hi Devs,
>  
> I've noticed that a few newer API commands are requiring a slightly different format, which is to require a details parameter.
>  
> # cloudmonkey create storagepool scope=cluster clusterid=$CLUSTERID name=Pri1 podid=$POD1ID zoneid=$ZONEID provider=smb url='"cifs://10.0.1.27/hypervPri/stor/Primary?user=hyperv&password=hyperv13!&domain=angusnet.local"'
>  
> : Failed to add data store: Missing cifs user and password details. Add them as details parameter.
>  

Can you set the user and password as regular key value pair, or does it need to be in a detail dict ? 
How did it work with 4.2.x ?
Can you identify a commit that changed the behavior ?

> And from my S3 testing yesterday:
>  
> addImageStore&response=json&sessionkey=sctphRL69EJ5RZdAWIrzfZH7jIo%3D&
> name=S3Storage&provider=S3&details%5B0%5D.key=accesskey&details%5B0%5D
> .value=AKIAJBYAOXAE7JJYBKEQ&details%5B1%5D.key=secretkey&details%5B1%5
> D.value=3F76mmMubsZohZAnPutLkxK9adA1XQNBQAMUdv%2FO&details%5B2%5D.key=
> bucket&details%5B2%5D.value=cloudstack-sec-stor&details%5B3%5D.key=use
> https&details%5B3%5D.value=true&details%5B4%5D.key=endpoint&details%5B
> 4%5D.value=s3.amazonaws.com&_=1392125369653
> 
> API Docs:
> addImageStoreExample: 
> details[0].key=accesskey&details[0].value=s389ddssaa&details[1].key=se
> cretkey&details[1].value=8dshfsss
>  
> The format seems very cumbersome compared to accesskey=<value> secretkey=<value> - has this been a community decision to move in this direction that I've missed?
>  

First time that I see this, and yes it seems cumbersome and against prior design.

-sebastien


> Regards
>  
> Paul Angus
> Senior Consultant / Cloud Architect
>  
> <image001.png>
>  
> S: +44 20 3603 0540 | M: +447711418784 | T: @CloudyAngus 
> paul.angus@shapeblue.com | www.shapeblue.com | Twitter:@shapeblue 
> ShapeBlue Ltd, 53 Chandos Place, Covent Garden, London, WC2N 4HS
>  
> Need Enterprise Grade Support for Apache CloudStack?
> Our CloudStack Infrastructure Support offers the best 24/7 SLA for CloudStack Environments.
> 
> Apache CloudStack Bootcamp training courses
> 
> **NEW!** CloudStack 4.2.1 training
> 18th-19th February 2014, Brazil. Classroom 17th-23rd March 2014, 
> Region A. Instructor led, On-line 24th-28th March 2014, Region B. 
> Instructor led, On-line 16th-20th June 2014, Region A. Instructor led, 
> On-line 23rd-27th June 2014, Region B. Instructor led, On-line
> 
> This email and any attachments to it may be confidential and are intended solely for the use of the individual to whom it is addressed. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Shape Blue Ltd or related companies. If you are not the intended recipient of this email, you must neither take any action based upon its contents, nor copy or show it to anyone. Please contact the sender if you believe you have received this email in error. Shape Blue Ltd is a company incorporated in England & Wales. ShapeBlue Services India LLP is a company incorporated in India and is operated under license from Shape Blue Ltd. Shape Blue Brasil Consultoria Ltda is a company incorporated in Brasil and is operated under license from Shape Blue Ltd. ShapeBlue is a registered trademark.


Re: API Calls with key value pairs (Details)

Posted by sebgoa <ru...@gmail.com>.
On Feb 12, 2014, at 11:25 AM, Paul Angus <pa...@shapeblue.com> wrote:

> Hi Devs,
>  
> I’ve noticed that a few newer API commands are requiring a slightly different format, which is to require a details parameter.
>  
> # cloudmonkey create storagepool scope=cluster clusterid=$CLUSTERID name=Pri1 podid=$POD1ID zoneid=$ZONEID provider=smb url='"cifs://10.0.1.27/hypervPri/stor/Primary?user=hyperv&password=hyperv13!&domain=angusnet.local"'
>  
> : Failed to add data store: Missing cifs user and password details. Add them as details parameter.
>  

Can you set the user and password as regular key value pair, or does it need to be in a detail dict ? 
How did it work with 4.2.x ?
Can you identify a commit that changed the behavior ?

> And from my S3 testing yesterday:
>  
> addImageStore&response=json&sessionkey=sctphRL69EJ5RZdAWIrzfZH7jIo%3D&name=S3Storage&provider=S3&details%5B0%5D.key=accesskey&details%5B0%5D.value=AKIAJBYAOXAE7JJYBKEQ&details%5B1%5D.key=secretkey&details%5B1%5D.value=3F76mmMubsZohZAnPutLkxK9adA1XQNBQAMUdv%2FO&details%5B2%5D.key=bucket&details%5B2%5D.value=cloudstack-sec-stor&details%5B3%5D.key=usehttps&details%5B3%5D.value=true&details%5B4%5D.key=endpoint&details%5B4%5D.value=s3.amazonaws.com&_=1392125369653
> 
> API Docs:
> addImageStoreExample: details[0].key=accesskey&details[0].value=s389ddssaa&details[1].key=secretkey&details[1].value=8dshfsss
>  
> The format seems very cumbersome compared to accesskey=<value> secretkey=<value> – has this been a community decision to move in this direction that I’ve missed?
>  

First time that I see this, and yes it seems cumbersome and against prior design.

-sebastien


> Regards
>  
> Paul Angus
> Senior Consultant / Cloud Architect
>  
> <image001.png>
>  
> S: +44 20 3603 0540 | M: +447711418784 | T: @CloudyAngus
> paul.angus@shapeblue.com | www.shapeblue.com | Twitter:@shapeblue
> ShapeBlue Ltd, 53 Chandos Place, Covent Garden, London, WC2N 4HS
>  
> Need Enterprise Grade Support for Apache CloudStack?
> Our CloudStack Infrastructure Support offers the best 24/7 SLA for CloudStack Environments.
> 
> Apache CloudStack Bootcamp training courses
> 
> **NEW!** CloudStack 4.2.1 training
> 18th-19th February 2014, Brazil. Classroom
> 17th-23rd March 2014, Region A. Instructor led, On-line
> 24th-28th March 2014, Region B. Instructor led, On-line
> 16th-20th June 2014, Region A. Instructor led, On-line
> 23rd-27th June 2014, Region B. Instructor led, On-line
> 
> This email and any attachments to it may be confidential and are intended solely for the use of the individual to whom it is addressed. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Shape Blue Ltd or related companies. If you are not the intended recipient of this email, you must neither take any action based upon its contents, nor copy or show it to anyone. Please contact the sender if you believe you have received this email in error. Shape Blue Ltd is a company incorporated in England & Wales. ShapeBlue Services India LLP is a company incorporated in India and is operated under license from Shape Blue Ltd. Shape Blue Brasil Consultoria Ltda is a company incorporated in Brasil and is operated under license from Shape Blue Ltd. ShapeBlue is a registered trademark.