Hi Christian, The output shared is expected and validates that I am looking at the right code. Note, "zoneId" is not a valid parameter and has no impact. The API call defaults to "NULL" for datacenter ID and "Region" for scope.
For what I understood from the code, the following API call should work: update cloudtouseobjectstore name=Secondary url=https://my.s3.storage details[0].key=accesskey details[0].value=XXXXX details[1].key=secretkey details[1].value=XXXXX details[2].key=bucket details[2].value=secondary details[3].key=endpoint details[3].value=my.s3.storage details[4].key=usehttps details[4].value=true provider=S3 You may validfate if the key,values provided in the details parameter are being processed correctly by looking up the entries for the image store in the table image_store_details (select * from image_store_details where store_id=<img_stor_id>;) Regards, Somesh -----Original Message----- From: christian.kir...@zv.fraunhofer.de [mailto:christian.kir...@zv.fraunhofer.de] Sent: Monday, August 17, 2015 8:24 AM To: users@cloudstack.apache.org Subject: Re: updatecloudtouseobjectstore options Hi Somesh, here is the log file message: INFO [o.a.c.s.d.l.S3ImageStoreLifeCycleImpl] (catalina-exec-13:ctx-ffeee088 ctx-4f217213 ctx-3cc33cae) (logid:053d3 c2a) Trying to add a S3 store in data center null And here the db output: image_provider_name: S3 data_center_id: NULL scope: REGION role: Image The data_center_id is also set to NULL in the database. Kind regards Christian > On 14 Aug 2015, at 19:36, Somesh Naidu <somesh.na...@citrix.com> wrote: > > Christian, can you try to find the following log message and paste it here, > "Trying to add a S3 store in data center" > > In addition, can you tell me what values are being set in the DB for "scope", > "role" and "image_provider_name"? > > Regards, > Somesh > > > -----Original Message----- > From: Somesh Naidu [mailto:somesh.na...@citrix.com] > Sent: Friday, August 14, 2015 12:22 PM > To: users@cloudstack.apache.org > Subject: RE: updatecloudtouseobjectstore options > > Hi Christian, > >> details[4].key=usehttps details[4].value=true > > I would have thought the above should have worked. Let me have a second look > at this and get back to you. > > Regards, > Somesh > > > -----Original Message----- > From: christian.kir...@zv.fraunhofer.de > [mailto:christian.kir...@zv.fraunhofer.de] > Sent: Friday, August 14, 2015 10:45 AM > To: users@cloudstack.apache.org > Subject: Re: updatecloudtouseobjectstore options > > Hi Somesh, > > thanks for diving through the code. > > I gave it some new tries but unfortunately the protocol is still set to http. > Here are the combinations I already used: > > details[4].key=S3_HTTPS_FLAG details[4].value=usehttps > details[4].key=S3_HTTPS_FLAG details[4].value=true > details[4].key=usehttps details[4].value=true > details[4].key=useHttps details[4].value=true > details[4].key=useHttps details[4].value=usehttps > > Did I miss the right one? > > Kind Regards > Christian > >> On 11 Aug 2015, at 22:43, Somesh Naidu <somesh.na...@citrix.com> wrote: >> >> I did some digging and think you need to add another key,value - >> usehttps,useHttps in the details param to make it work. >> >> My reference has been following code snippets: >> --- >> String useHttps = details.get(ApiConstants.S3_HTTPS_FLAG); >> if (useHttps != null && Boolean.parseBoolean(useHttps)) { >> protocol = "https"; >> } >> --- >> public static final String S3_HTTPS_FLAG = "usehttps"; >> --- >> >> Regards, >> Somesh >> >> >> -----Original Message----- >> From: christian.kir...@zv.fraunhofer.de >> [mailto:christian.kir...@zv.fraunhofer.de] >> Sent: Tuesday, August 11, 2015 3:31 PM >> To: users@cloudstack.apache.org >> Subject: Re: updatecloudtouseobjectstore options >> >> Hi Somesh, >> >> thanks for your quick response. >> >> That was also my hope but the protocol in the url seems to be ignored. >> In the database is a attribute called protocol which was set to http in all >> my tries. >> It seems to be the default if you not explicitly set the protocol. >> >> I tried to set the protocol via a key value pair in the details part of the >> api call and via a separate option which I named protocol. >> There was never an error but it hasn't worked either. >> >> Here is the last call I tried: >> update cloudtouseobjectstore name=Secondary >> zoneId=01b01ed7-ed98-4908-93a3-8729ef0db427 url=https://my.s3.storage >> details[0].key=accesskey details[0].value=XXXXX details[1].key=secretkey >> details[1].value=XXXXX details[2].key=bucket details[2].value=secondary >> details[3].key=endpoint details[3].value=my.s3.storage >> details[4].key=protocol details[4].value=https provider=S3 >> >> Kind regards >> Christian >> >>> Am 11.08.2015 um 18:36 schrieb Somesh Naidu <somesh.na...@citrix.com>: >>> >>> Christian, >>> >>> I am not 100% as I haven’t tried this before but I was thinking the >>> parameter "URL" would affect this? >>> >>> Regards, >>> Somesh >>> >>> >>> -----Original Message----- >>> From: christian.kir...@zv.fraunhofer.de >>> [mailto:christian.kir...@zv.fraunhofer.de] >>> Sent: Tuesday, August 11, 2015 11:22 AM >>> To: users@cloudstack.apache.org >>> Subject: updatecloudtouseobjectstore options >>> >>> Hi all, >>> >>> we are fairly new to all the cloudstack stuff, so excuse me if I ask kinda >>> stupid questions. >>> >>> We had set up our cloudstack with nfs as secondary storage, now we like to >>> use our s3 storage. >>> I read through many threads how to add my own certificates, root ca and >>> intermediate ca, now I am at the point where I need to test all the fancy >>> stuff I configured. >>> Therefore I need to switch from nfs secondary to s3. >>> I found the updatecloudtouseobjectstore api call and gave it a couple of >>> tries with cloudmonkey. >>> On the first glance it seems to do what it should do, but I wasn’t able to >>> figure out the right argument to tell the api call to set the protocol to >>> https. >>> >>> Any suggestions? >>> >>> Kind Regards >>> Christian >