cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Koushik Das <koushik....@citrix.com>
Subject RE: API naming conventions
Date Tue, 16 Apr 2013 12:22:14 GMT
A fixed naming pattern with verb followed by noun looks good. If required the verbs can be
categorized further like lifecycle verbs - create, delete etc.

> -----Original Message-----
> From: prasanna [mailto:srivatsav.prasanna@gmail.com] On Behalf Of
> Prasanna Santhanam
> Sent: Tuesday, April 16, 2013 4:34 PM
> To: dev@cloudstack.apache.org
> Subject: Re: API naming conventions
> 
> Oh that's more than I intend to chew :)
> 
> I only want the APIs to have some defined pattern - naming and semantics.
> This if from a integration perspective than from the perspective of a
> developer of cloudstack.
> 
> There is currently no documentation on what I should name my API and how
> I choose b/w overloading an API vs creating a new API:
> 
> 1. ldapConfig or configLdap?
> 2. addToLoadBalancerRule/removeFromLoadBalancerRule or simply
> addLoadBalancerRule and removeLoadBalancerRule with overloaded
> arguments for specifying the rule itself.
> 
> --
> Prasanna.,
> 
> On Tue, Apr 16, 2013 at 10:40:44AM +0000, Nitin Mehta wrote:
> > +1 to this, but I guess this should be a subsection of a wiki called
> > "Adding a new api in Cloudstack - What all should I do ?"
> >
> > Some of the subsections in it should be like (each with an example) :-
> >
> > API naming conventions
> > Should the api be sync, async or asynccreate and what class should it
> > extend
> >
> > API annotations and what they mean. Discuss ACL and parameters. Events
> > to write.
> > What to put in the API layer, manager layer, hypervisor layer API
> > Response - should I create a view (in case its a list command) Testing
> > expectations - Adding marvin tests
> >
> > I guess this would be very useful to the devs, guys trying to
> > understand the flow. So lets create one consolidated wiki and add these
> subsections.
> >
> > Thanks,
> > -Nitin
> >
> > On 16/04/13 1:31 PM, "Prasanna Santhanam" <tsp@apache.org> wrote:
> >
> > >Is there a formal document somewhere describing the naming
> > >conventions for our APIs? If not is it worthwhile starting one?
> > >
> > >The document should describe:
> > >1. valid action (verbs) to operate on an entity 2. entity being the
> > >desired resource, physical device, cloudstack account etc.
> > >3. what semantics an update API can take and what a configure API can
> > >take etc.
> > >
> > >Thanks,
> > >
> > >--
> > >Prasanna.,


Mime
View raw message