Re: [Discuss] API name alias

2013-04-15 Thread Nitin Mehta
t String[]. >@APICommand(name={'Foo', 'Bar', 'FooBar'}, preferred='Foo', >deprecated={'Bar','FooBar'}) > > >> -Original Message- >> From: Chiradeep Vittal [mailto:chiradeep.vit...@citrix.com] >> Sent: Tuesday, 9

Re: [Discuss] API name alias

2013-04-09 Thread Rohit Yadav
On Tue, Apr 9, 2013 at 11:34 PM, Chiradeep Vittal < chiradeep.vit...@citrix.com> wrote: > In Kishan's case he is adding a better, accurate name for the API. The API > was misnamed in the previous version (ACL = Access Control List, but ACL > was referring to an individual item within the list). Si

Re: [Discuss] API name alias

2013-04-09 Thread Chiradeep Vittal
In Kishan's case he is adding a better, accurate name for the API. The API was misnamed in the previous version (ACL = Access Control List, but ACL was referring to an individual item within the list). Similarly, there are other poorly worded APIs (createIpForwardingRule instead of createStaticNat

Re: [Discuss] API name alias

2013-04-09 Thread Rohit Yadav
On Tue, Apr 9, 2013 at 12:04 PM, Chiradeep Vittal < chiradeep.vit...@citrix.com> wrote: > Rohit, that's like saying we won't fix a leaky faucet today because we're > moving in a couple of years anyway. It isn't a big deal to add this and it > clarifies to the end user what is the correct alias to

RE: [Discuss] API name alias

2013-04-09 Thread Kishan Kavala
t; From: Chiradeep Vittal [mailto:chiradeep.vit...@citrix.com] > Sent: Tuesday, 9 April 2013 12:05 PM > To: dev@cloudstack.apache.org > Subject: Re: [Discuss] API name alias > > Rohit, that's like saying we won't fix a leaky faucet today because we're > moving i

Re: [Discuss] API name alias

2013-04-08 Thread Chiradeep Vittal
Rohit, that's like saying we won't fix a leaky faucet today because we're moving in a couple of years anyway. It isn't a big deal to add this and it clarifies to the end user what is the correct alias to use. On 4/8/13 9:52 PM, "Rohit Yadav" wrote: >If we are still on our previously discussed pl

Re: [Discuss] API name alias

2013-04-08 Thread Rohit Yadav
If we are still on our previously discussed plan (search a wiki shared by Min) on deprecating the whole query based API (Server), it's just unnecessary work on present APIs. I think for now just changing the name attribute type from String to String[] would just work, as John suggested. Adding oth

RE: [Discuss] API name alias

2013-04-08 Thread Koushik Das
Kavala [mailto:kishan.kav...@citrix.com] > Sent: Monday, April 08, 2013 6:34 PM > To: dev@cloudstack.apache.org > Subject: [Discuss] API name alias > > APICommand annotation in API Cmd object has a name parameter. Currently > name parameter takes only one value. I plan to enhance this to support

RE: [Discuss] API name alias

2013-04-08 Thread Rajesh Battala
> -Original Message- > From: Chiradeep Vittal [mailto:chiradeep.vit...@citrix.com] > Sent: Tuesday, April 9, 2013 3:19 AM > To: dev@cloudstack.apache.org > Subject: Re: [Discuss] API name alias > > > > On 4/8/13 11:18 AM, "Rohit Yadav" wrote:

Re: [Discuss] API name alias

2013-04-08 Thread Chiradeep Vittal
On 4/8/13 11:18 AM, "Rohit Yadav" wrote: >On Mon, Apr 8, 2013 at 7:10 PM, John Burwell wrote: > >> Rohit, >> >> Why would we need to rewrite any Java code to switch to an array? As I >> mentioned, array annotation values are treated as varargs. Therefore, >> annotations with single values ca

Re: [Discuss] API name alias

2013-04-08 Thread Rohit Yadav
On Mon, Apr 8, 2013 at 7:10 PM, John Burwell wrote: > Rohit, > > Why would we need to rewrite any Java code to switch to an array? As I > mentioned, array annotation values are treated as varargs. Therefore, > annotations with single values can be left alone. Only cases where > multiple values

Re: [Discuss] API name alias

2013-04-08 Thread John Burwell
Rohit, Why would we need to rewrite any Java code to switch to an array? As I mentioned, array annotation values are treated as varargs. Therefore, annotations with single values can be left alone. Only cases where multiple values are required would require the addition of curly braces. For

Re: [Discuss] API name alias

2013-04-08 Thread Rohit Yadav
On Mon, Apr 8, 2013 at 6:33 PM, Kishan Kavala wrote: > APICommand annotation in API Cmd object has a name parameter. Currently > name parameter takes only one value. I plan to enhance this to support > comma separated values. This will allow multiple API names for the same API > Cmd object. > > Cu

Re: [Discuss] API name alias

2013-04-08 Thread John Burwell
Kishan, Annotations support the specification of arrays as annotation values which allows the compiler to verify the form of the value (avoiding a potential runtime exception due to a typo) and a more expressive value. Annotation array values are treated as a varargs -- therefore, single names

[Discuss] API name alias

2013-04-08 Thread Kishan Kavala
APICommand annotation in API Cmd object has a name parameter. Currently name parameter takes only one value. I plan to enhance this to support comma separated values. This will allow multiple API names for the same API Cmd object. Current: @APICommand(name = "apiName1", .. Proposed: @APIComman