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:run...@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 <paul.an...@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.an...@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.

Reply via email to