Uploaded image for project: 'jclouds'
  1. jclouds
  2. JCLOUDS-384

Trove and Autoscale method names need to be consistent

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.7.0
    • jclouds-labs-openstack
    • None

    Description

      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.

      Attachments

        Activity

          People

            zack-s Zack Shoylev
            zack-s Zack Shoylev
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: