Re: [PROPOSAL][QUESTION] Map parameters in API Commands

2014-03-10 Thread Antonio Fornié Casarrubios
chyk < >> alena.prokharc...@citrix.com>: >> >>>>>>> >> >>>>>>> Antonio, sure I will review the patch. But please make sure that >> API >> >>>>>>> backwards compatibly is intact, otherwise the fix won¹t be >> acce

Re: [PROPOSAL][QUESTION] Map parameters in API Commands

2014-03-10 Thread Mike Tutkowski
te: > >>>>>>> > >>>>>>> Hi Alena, > >>>>>>> > >>>>>>> The reasons for this strange format? I don't know. There doesn't > seem to > >>>>>>> be > >>>>&

Re: [PROPOSAL][QUESTION] Map parameters in API Commands

2014-03-10 Thread Marcus
>>>>>>> one. After asking on my team and in the dev list I thought perhaps you >>>>>>> could know. It seems we all see it strange and nobody knows why. But of >>>>>>> course, if it is for reasons I will stop the change. >>>>>>

Re: [PROPOSAL][QUESTION] Map parameters in API Commands

2014-03-10 Thread Marcus
ange. >>>>>> >>>>>> >>>>>> >>>>>> And about the DB, you are right, in the DB is not like I said. But you >>>>>> can >>>>>> have this in a table row field: >>>>>> {0={value=Toronto,

Re: [PROPOSAL][QUESTION] Map parameters in API Commands

2014-03-10 Thread Marcus
map on the fly are copies of each other: instead of fixing the >>>> structure in one method, the are plenty of methods almost identical >>>> copying >>>> and pasting the same lines. Some times the same method twice in the same >>>> cmd class for two Map par

Re: [PROPOSAL][QUESTION] Map parameters in API Commands

2014-03-10 Thread Bharat Kumar
1- params in wich the get method fixes the params on the fly. In these of >>>>> course the strange format is not propagated anymore. But this is still >>>>> wrong: the format itself before the get is invoked, the time spent on >>>>> fixing something th

Re: [PROPOSAL][QUESTION] Map parameters in API Commands

2014-03-10 Thread Marcus
instead of fixing the >>>> structure in one method, the are plenty of methods almost identical >>>> copying >>>> and pasting the same lines. Some times the same method twice in the same >>>> cmd class for two Map params (look CreateNetworkOfferingCmd &g

Re: [PROPOSAL][QUESTION] Map parameters in API Commands

2014-03-10 Thread Jayapal Reddy Uradi
methods almost identical >>>> copying >>>> and pasting the same lines. Some times the same method twice in the same >>>> cmd class for two Map params (look CreateNetworkOfferingCmd >>>> #getServiceCapabilities and #getServiceProviders). >>>&

Re: [PROPOSAL][QUESTION] Map parameters in API Commands

2014-03-10 Thread Bharat Kumar
. For example, >>> Cloudmonkey command >>> create networkoffering ... tags[0].key="City" tags[0].value="Toronto" >>> >>> You store in the table network_offeringstags, field tags, the String: >>> {0={value=Toronto,key=City}} >>> (i

Re: [PROPOSAL][QUESTION] Map parameters in API Commands

2014-03-07 Thread Marcus
lue="Toronto" >> >> You store in the table network_offeringstags, field tags, the String: >> {0={value=Toronto,key=City}} >> (including brackets and all) >> >> So knowing all this I guess you agree this should be refactored... unless >> at some point th

Re: [PROPOSAL][QUESTION] Map parameters in API Commands

2014-03-04 Thread Marcus
t of the cases and it all seems to work. > > > It would be great if once I upload the patch somebody could help me double > check that it doesn't brake anything, not only reviewing to code. I did > plenty of tests of many kinds, but I cannot be sure that I am covering > eno

Re: [PROPOSAL][QUESTION] Map parameters in API Commands

2014-03-04 Thread Bharat Kumar
pects the strange format. ->ConfigurationManagerImpl line 1545 Thanks. Cheers Antonio 2014-02-28 18:44 GMT+01:00 Alena Prokharchyk mailto:alena.prokharc...@citrix.com>>: From: Antonio Fornié Casarrubios mailto:antonio.for...@gmail.com>> Date: Friday, February 28, 2014 at 2:09 AM To: Rohi

Re: [PROPOSAL][QUESTION] Map parameters in API Commands

2014-03-03 Thread Marcus
u store in the table network_offeringstags, field tags, the String: >>>> >{0={value=Toronto,key=City}} >>>> >(including brackets and all) >>>> > >>>> >So knowing all this I guess you agree this should be refactored... >>>>unless &g

Re: [PROPOSAL][QUESTION] Map parameters in API Commands

2014-03-03 Thread Antonio Fornié Casarrubios
ook CreateNetworkOfferingCmd > >>>> >#getServiceCapabilities and #getServiceProviders). > >>>> > > >>>> >2- params in which the get method returns the map as it is. With the > >>>> >strange format. For example, > >>

Re: [PROPOSAL][QUESTION] Map parameters in API Commands

2014-03-03 Thread Marcus
>>> >You store in the table network_offeringstags, field tags, the String: >>>> >{0={value=Toronto,key=City}} >>>> >(including brackets and all) >>>> > >>>> >So knowing all this I guess you agree this should be refactored... >>&

Re: [PROPOSAL][QUESTION] Map parameters in API Commands

2014-03-03 Thread Alena Prokharchyk
>>> >at some point the strange format is needed. But after looking for it >>> >everywhere I didn't find any place where it was. I already did the >>>change >>> >and tested most of the cases and it all seems to work. >>> > >>> > >

Re: [PROPOSAL][QUESTION] Map parameters in API Commands

2014-03-03 Thread Marcus
;> >and tested most of the cases and it all seems to work. >> > >> > >> >It would be great if once I upload the patch somebody could help me double >> >check that it doesn't brake anything, not only reviewing to code. I did >> >plenty of tests of

Re: [PROPOSAL][QUESTION] Map parameters in API Commands

2014-03-03 Thread Antonio Fornié Casarrubios
strange format. > >->ConfigurationManagerImpl line 1545 > > > > > >Thanks. Cheers > >Antonio > > > > > >2014-02-28 18:44 GMT+01:00 Alena Prokharchyk > >: > > > >> > >> > >> From: Antonio Fornié Casarrubios

Re: [PROPOSAL][QUESTION] Map parameters in API Commands

2014-03-03 Thread Alena Prokharchyk
> From: Antonio Fornié Casarrubios >> Date: Friday, February 28, 2014 at 2:09 AM >> To: Rohit Yadav , cloudstack < >> dev@cloudstack.apache.org>, Alena Prokharchyk < >> alena.prokharc...@citrix.com> >> Subject: Re: [PROPOSAL][QUESTION] Map parameters

Re: [PROPOSAL][QUESTION] Map parameters in API Commands

2014-03-02 Thread Antonio Fornié Casarrubios
, Alena Prokharchyk < > alena.prokharc...@citrix.com> > Subject: Re: [PROPOSAL][QUESTION] Map parameters in API Commands > > Hi Alena, > > I would like to know your opinion on this change. Mainly consists on: > 1- Change the way we store the Map params after unpackParams in

Re: [PROPOSAL][QUESTION] Map parameters in API Commands

2014-02-28 Thread Alena Prokharchyk
; Subject: Re: [PROPOSAL][QUESTION] Map parameters in API Commands Hi Alena, I would like to know your opinion on this change. Mainly consists on: 1- Change the way we store the Map params after unpackParams in order to have, for each Map param, a Map instead of Map>. -Antonio, what was the reason f

Re: [PROPOSAL][QUESTION] Map parameters in API Commands

2014-02-28 Thread Antonio Fornié Casarrubios
Hi Alena, I would like to know your opinion on this change. Mainly consists on: 1- Change the way we store the Map params after unpackParams in order to have, for each Map param, a Map instead of Map>. 2- There are many commands that fix this strange format on demand on their getters, so they do

Re: [PROPOSAL][QUESTION] Map parameters in API Commands

2014-02-12 Thread Rohit Yadav
On Wed, Feb 12, 2014 at 9:52 PM, Antonio Fornié Casarrubios wrote: > Hi Rohit, > > I didn't mean changing the format of the HTTP request, but only changing the > intermediate format in which we keep it in the property of the Command > class. I mentioned the format in the request just to explain wh

Re: [PROPOSAL][QUESTION] Map parameters in API Commands

2014-02-12 Thread Antonio Fornié Casarrubios
Hi Rohit, I didn't mean changing the format of the HTTP request, but only changing the intermediate format in which we keep it in the property of the Command class. I mentioned the format in the request just to explain what I meant. My proposal is to leave the request format as it is, but then wh

Re: [PROPOSAL][QUESTION] Map parameters in API Commands

2014-02-11 Thread Rohit Yadav
Hi Antonio, On Tue, Feb 11, 2014 at 9:57 PM, Antonio Fornié Casarrubios wrote: > Hi all, > > When invoking a CS API command that has parameters of type Map, the request > will be something like this: > URL/api?command=createTags&tags[0].key=region&tags[0].value=canada&tags[1].key=name&tags[1].val

[PROPOSAL][QUESTION] Map parameters in API Commands

2014-02-11 Thread Antonio Fornié Casarrubios
Hi all, When invoking a CS API command that has parameters of type Map, the request will be something like this: URL/api?command=createTags&tags[0].key=region&tags[0].value=canada&tags[1].key=name&tags[1].value=bob in order to send a Map with the pairs: tags{ region : "canada", name : "bob