org.jclouds.openstack.glance.v1_0.features
Interface ImageApi


public interface ImageApi

Image Services

Author:
Adrian Cole, Adam Lowe
See Also:
api doc, api src

Method Summary
 ImageDetails create(String name, org.jclouds.io.Payload payload, CreateImageOptions... options)
          Create a new image
 boolean delete(String id)
          Delete the image with the specified id
 ImageDetails get(String id)
          Return metadata about an image with id
 InputStream getAsStream(String id)
          Return image data for image with id
 org.jclouds.collect.PagedIterable<? extends Image> list()
          List all images (IDs, names, links)
 org.jclouds.openstack.keystone.v2_0.domain.PaginatedCollection<? extends Image> list(ListImageOptions options)
           
 org.jclouds.collect.PagedIterable<? extends ImageDetails> listInDetail()
          List all images (all details)
 org.jclouds.openstack.keystone.v2_0.domain.PaginatedCollection<? extends ImageDetails> listInDetail(ListImageOptions options)
           
 ImageDetails reserve(String name, CreateImageOptions... options)
          Reserve a new image to be uploaded later
 ImageDetails update(String id, UpdateImageOptions... options)
          Adjust the metadata stored for an existing image
 ImageDetails upload(String id, org.jclouds.io.Payload imageData, UpdateImageOptions... options)
          Upload image data for a previously-reserved image

If an image was previously reserved, and thus is in the queued state, then image data can be added using this method.

 

Method Detail

list

org.jclouds.collect.PagedIterable<? extends Image> list()
List all images (IDs, names, links)

Returns:
all images (IDs, names, links)

list

org.jclouds.openstack.keystone.v2_0.domain.PaginatedCollection<? extends Image> list(ListImageOptions options)

listInDetail

org.jclouds.collect.PagedIterable<? extends ImageDetails> listInDetail()
List all images (all details)

Returns:
all images (all details)

listInDetail

org.jclouds.openstack.keystone.v2_0.domain.PaginatedCollection<? extends ImageDetails> listInDetail(ListImageOptions options)

get

@Nullable
ImageDetails get(String id)
Return metadata about an image with id


getAsStream

@Nullable
InputStream getAsStream(String id)
Return image data for image with id


create

ImageDetails create(@HeaderParam(value="x-image-meta-name")
                    String name,
                    org.jclouds.io.Payload payload,
                    CreateImageOptions... options)
Create a new image

Returns:
detailed metadata about the newly stored image

reserve

ImageDetails reserve(@HeaderParam(value="x-image-meta-name")
                     String name,
                     CreateImageOptions... options)
Reserve a new image to be uploaded later

Returns:
detailed metadata about the newly stored image
See Also:
upload(java.lang.String, org.jclouds.io.Payload, org.jclouds.openstack.glance.v1_0.options.UpdateImageOptions...)

upload

ImageDetails upload(String id,
                    org.jclouds.io.Payload imageData,
                    UpdateImageOptions... options)
Upload image data for a previously-reserved image

If an image was previously reserved, and thus is in the queued state, then image data can be added using this method. If the image already as data associated with it (e.g. not in the queued state), then you will receive a 409 Conflict exception.

Parameters:
imageData - the new image to upload
options - can be used to adjust the metadata stored for the image in the same call
Returns:
detailed metadata about the updated image
See Also:
reserve(java.lang.String, org.jclouds.openstack.glance.v1_0.options.CreateImageOptions...)

update

ImageDetails update(String id,
                    UpdateImageOptions... options)
Adjust the metadata stored for an existing image

Returns:
detailed metadata about the updated image

delete

boolean delete(String id)
Delete the image with the specified id

Returns:
true if successful


Copyright © 2009-2013 The Apache Software Foundation. All Rights Reserved.