jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (JCLOUDS-384) Trove and Autoscale method names need to be consistent
Date Wed, 20 Nov 2013 21:48:35 GMT

    [ https://issues.apache.org/jira/browse/JCLOUDS-384?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13828174#comment-13828174
] 

ASF subversion and git services commented on JCLOUDS-384:
---------------------------------------------------------

Commit 70e9ce8c1c5d2c0438a6d063316989859265dd34 in branch refs/heads/master from [~zack-s]
[ https://git-wip-us.apache.org/repos/asf?p=jclouds-labs-openstack.git;h=70e9ce8 ]

JCLOUDS-384 This makes autoscale and trove be consistent with other jclouds APIs by renaming
get*ApiFor* calls.


> Trove and Autoscale method names need to be consistent
> ------------------------------------------------------
>
>                 Key: JCLOUDS-384
>                 URL: https://issues.apache.org/jira/browse/JCLOUDS-384
>             Project: jclouds
>          Issue Type: Bug
>          Components: jclouds-labs-openstack
>            Reporter: Zack Shoylev
>            Assignee: Zack Shoylev
>             Fix For: 1.7.0
>
>
> As Everett pointed out:
> In TroveApi you have the methods:
>    FlavorApi getFlavorApiForZone(
>          @EndpointParam(parser = ZoneToEndpoint.class) @Nullable String zone);
>    
>    InstanceApi getInstanceApiForZone(
>          @EndpointParam(parser = ZoneToEndpoint.class) @Nullable String zone);
>    
>    @Path("/instances/{instanceId}")
>    UserApi getUserApiForInstanceInZone(@PathParam("instanceId") String instanceId, 
>          @EndpointParam(parser = ZoneToEndpoint.class) @Nullable String zone);
>    
>    @Path("/instances/{instanceId}")
>    DatabaseApi getDatabaseApiForInstanceInZone(@PathParam("instanceId") String instanceId,

>          @EndpointParam(parser = ZoneToEndpoint.class) @Nullable String zone);
> Then look at the methods where there is a similar second param like MarconiApi or CloudLoadBalancersApi.
> The methods are always named with For in the name (e.g. getWhateverApiForZoneAndSomething()).

> Also the zone param always comes first. This is common practice when writing method signatures
that have the same param in a lot of methods, that param should appear in the same position.
> --
> Note: backwards incompatible change.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message