In some cases the API returns simply a boolean-equivalent result. Openstack seems to be trying to return meaningful object results more often than not, though.
But yes, outside of the exceptions mentioned in 691, we should be moving away (and refactoring away) from 404 fallbacks in PUT and POST. In this specific case, as seen here http://developer.openstack.org/api-ref-database-v1.html ; It seem changing the method to void makes sense in this case? ________________________________________ From: Ignasi Barrera <n...@apache.org> Sent: Thursday, January 21, 2016 6:05 AM To: dev@jclouds.apache.org Subject: Re: JCLOUDS-691: Removing 404 fallbacks from OpenStack APIs I'd change the return type to void in those cases. We want to fix the semantics of those methods, and returning a boolean in those create operations makes little sense. They should be changed to the type of the created object (if returned by the API, @zacksh?), otherwise to void. On 21 January 2016 at 12:24, Reijhanniel Jearl Campos <devc...@gmail.com> wrote: > Hi! > > About to address the ticket[1], but need to verify something first. The > description indicates that: >> *..should not use the 404 fallbacks that silently return null*..* The > fallbacks should be removed*.. > > Some OpenStack API, for instance Trove[2], uses `FalseOnNotFoundOr404`, > thus returning false on 404. I can't exactly change the interface right > away (i.e.: change boolean to void, and remove fallback), can I? If not, > will removing 404 fallbacks for void-returning types (if there's still any) > suffice to close the ticket? > > [1] https://issues.apache.org/jira/browse/JCLOUDS-691 > [2] > https://github.com/jclouds/jclouds/blob/master/apis/openstack-trove/src/main/java/org/jclouds/openstack/trove/v1/features/DatabaseApi.java#L74