> + /** > + * Creates an image resource in the specified project from the provided > persistent disk. > + * > + * @param imageName the name of the created image > + * @param sourceDisk fully qualified URL for the persistent disk to > create the image from > + * @return an Operation resource. To check on the status of an operation, > poll the Operations resource returned to > + * you, and look for the status field. > + */ > + @Named("Images:insert") > + @POST > + @Consumes(MediaType.APPLICATION_JSON) > + @Produces(MediaType.APPLICATION_JSON) > + @Path("/global/images") > + @OAuthScopes(COMPUTE_SCOPE) > + @MapBinder(BindToJsonPayload.class) > + @Fallback(NullOnNotFoundOr404.class)
Sounds good to me. I was wondering how to handle these responses, I noticed that some similar methods did not have a fallback such as Disk:insert but then others did such as Disks:createSnapshot. I see that is addressed in PR#40. I will remove the @Fallback(NullOnNotFoundOr404.class) line and the corresponding expect test testCreateImageFromPdResponseIs4xx(). --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs-google/pull/59/files#r18929730