You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jclouds.apache.org by "Everett Toews (JIRA)" <ji...@apache.org> on 2014/04/28 15:52:16 UTC

[jira] [Updated] (JCLOUDS-545) SwiftApi and related Apis improvements

     [ https://issues.apache.org/jira/browse/JCLOUDS-545?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Everett Toews updated JCLOUDS-545:
----------------------------------

    Description: 
So far there are a number of issue with the Beta SwiftApi and related Apis.

# All of the methods in SwiftApi are misnamed. Every single other top-level OpenStack API in jclouds is of the form *get* WhateverApi *For* Zone/RegionAndSomething.
## The methods to get the second-level APIs need to follow this form: get, and For must be used to be consistent with all of the other OpenStack APIs.
## configuredRegions() should be getConfiguredRegions()
## These name changes should be *added* to SwiftApi. The old methods deprecated (to be removed in 1.8) and point users to the new methods.
# ObjectApi.replace() is not a good name. I understand the reasoning behind it but it's not intuitive for users looking to put/upload something. The semantics of put already say "If the URI refers to an already existing resource, it is modified". This method should be renamed put().
## This name change should be *added* to ObjectApi. The old method deprecated (to be removed in 1.8) and point users to the new method.
# ObjectApi.replace() forces users to include metadata as the last parameter. This must be optional.
# ContainerApi.list() needs a comment that metadata is not returned and head() must be called to get metadata
# In all of the Swift domain objects toStringHelper("") is called with an empty String so no class name is given. This is inconsistent with the usage of toStringHelper("") everywhere else and doesn't provide as much information. It needs to be changed to toStringHelper().

  was:
So far there are a number of issue with the Beta SwiftApi and related Apis.

# All of the methods in SwiftApi are misnamed. Every single other top-level OpenStack API in jclouds is of the form *get* WhateverApi *For* Zone/RegionAndSomething.
## The methods to get the second-level APIs need to follow this form: get, and For must be used to be consistent with all of the other OpenStack APIs.
## configuredRegions() should be getConfiguredRegions()
# ObjectApi.replace() is not a good name. I understand the reasoning behind it but it's not intuitive for users looking to put/upload something. The semantics of put already say "If the URI refers to an already existing resource, it is modified". This method should be renamed put().
# ObjectApi.replace() forces users to include metadata as the last parameter. This must be optional.
# ContainerApi.list() needs a comment that metadata is not returned and head() must be called to get metadata
# In all of the Swift domain objects toStringHelper("") is called with an empty String so no class name is given. This is inconsistent with the usage of toStringHelper("") everywhere else and doesn't provide as much information. It needs to be changed to toStringHelper().


> SwiftApi and related Apis improvements
> --------------------------------------
>
>                 Key: JCLOUDS-545
>                 URL: https://issues.apache.org/jira/browse/JCLOUDS-545
>             Project: jclouds
>          Issue Type: Bug
>          Components: jclouds-labs-openstack
>    Affects Versions: 1.7.2
>            Reporter: Everett Toews
>            Assignee: Jeremy Daggett
>             Fix For: 1.8.0, 1.7.3
>
>
> So far there are a number of issue with the Beta SwiftApi and related Apis.
> # All of the methods in SwiftApi are misnamed. Every single other top-level OpenStack API in jclouds is of the form *get* WhateverApi *For* Zone/RegionAndSomething.
> ## The methods to get the second-level APIs need to follow this form: get, and For must be used to be consistent with all of the other OpenStack APIs.
> ## configuredRegions() should be getConfiguredRegions()
> ## These name changes should be *added* to SwiftApi. The old methods deprecated (to be removed in 1.8) and point users to the new methods.
> # ObjectApi.replace() is not a good name. I understand the reasoning behind it but it's not intuitive for users looking to put/upload something. The semantics of put already say "If the URI refers to an already existing resource, it is modified". This method should be renamed put().
> ## This name change should be *added* to ObjectApi. The old method deprecated (to be removed in 1.8) and point users to the new method.
> # ObjectApi.replace() forces users to include metadata as the last parameter. This must be optional.
> # ContainerApi.list() needs a comment that metadata is not returned and head() must be called to get metadata
> # In all of the Swift domain objects toStringHelper("") is called with an empty String so no class name is given. This is inconsistent with the usage of toStringHelper("") everywhere else and doesn't provide as much information. It needs to be changed to toStringHelper().



--
This message was sent by Atlassian JIRA
(v6.2#6252)