jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ignasi Barrera <notificati...@github.com>
Subject Re: [jclouds-labs] [JCLOUDS-1010] use a lightweight image as a base for Docker build test (#208)
Date Wed, 21 Oct 2015 09:12:15 GMT
> +    * Tag the image name into a repository.
> +    *
> +    * @param name
> +    *           the name of the image to be tagged
> +    * @param repoName
> +    *           the repository to tag in
> +    * @param tag
> +    *           the new tag name
> +    * @param force
> +    *           force create if tag already exists
> +    * @return true if tag is created, false when image is not found.
> +    */
> +   @Named("image:tag")
> +   @POST
> +   @Path("/images/{name}/tag")
> +   @Fallback(FalseOnNotFoundOr404.class)

In general we try to avoid using 404 fallbacks in POST/PUT methods, as often they don't provide
the right feedback to the user. Operations done on objects that are supposed to exist will
already [throw a ResourceNotFoundException](https://github.com/jclouds/jclouds-labs/blob/master/docker/src/main/java/org/jclouds/docker/handlers/DockerErrorHandler.java#L71-L75).
I'd change this method to return `void` and remove the fallback.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/208/files#r42600002
Mime
View raw message