package images
import "k8s.io/kubernetes/Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/compute/v2/images"
Package images provides information and interaction with the image API resource in the OpenStack Compute service.
An image is a collection of files used to create or rebuild a server. Operators provide a number of pre-built OS images by default. You may also create custom images from cloud servers you have launched.
Index ¶
- func ListDetail(client *gophercloud.ServiceClient, opts ListOptsBuilder) pagination.Pager
- type DeleteResult
- type GetResult
- func Get(client *gophercloud.ServiceClient, id string) GetResult
- func (gr GetResult) Extract() (*Image, error)
- type Image
- type ImagePage
- type ListOpts
- type ListOptsBuilder
Functions ¶
func ListDetail ¶
func ListDetail(client *gophercloud.ServiceClient, opts ListOptsBuilder) pagination.Pager
ListDetail enumerates the available images.
Types ¶
type DeleteResult ¶
type DeleteResult struct { gophercloud.ErrResult }
DeleteResult represents the result of an image.Delete operation.
func Delete ¶
func Delete(client *gophercloud.ServiceClient, id string) DeleteResult
Delete deletes the specified image ID.
type GetResult ¶
type GetResult struct { gophercloud.Result }
GetResult temporarily stores a Get response.
func Get ¶
func Get(client *gophercloud.ServiceClient, id string) GetResult
Get acquires additional detail about a specific image by ID. Use ExtractImage() to interpret the result as an openstack Image.
func (GetResult) Extract ¶
Extract interprets a GetResult as an Image.
type Image ¶
type Image struct { // ID contains the image's unique identifier. ID string Created string // MinDisk and MinRAM specify the minimum resources a server must provide to be able to install the image. MinDisk int MinRAM int // Name provides a human-readable moniker for the OS image. Name string // The Progress and Status fields indicate image-creation status. // Any usable image will have 100% progress. Progress int Status string Updated string }
Image is used for JSON (un)marshalling. It provides a description of an OS image.
func ExtractImages ¶
func ExtractImages(page pagination.Page) ([]Image, error)
ExtractImages converts a page of List results into a slice of usable Image structs.
type ImagePage ¶
type ImagePage struct { pagination.LinkedPageBase }
ImagePage contains a single page of results from a List operation. Use ExtractImages to convert it into a slice of usable structs.
func (ImagePage) IsEmpty ¶
IsEmpty returns true if a page contains no Image results.
func (ImagePage) NextPageURL ¶
NextPageURL uses the response's embedded link reference to navigate to the next page of results.
type ListOpts ¶
type ListOpts struct { // When the image last changed status (in date-time format). ChangesSince string `q:"changes-since"` // The number of Images to return. Limit int `q:"limit"` // UUID of the Image at which to set a marker. Marker string `q:"marker"` // The name of the Image. Name string `q:"name"` // The name of the Server (in URL format). Server string `q:"server"` // The current status of the Image. Status string `q:"status"` // The value of the type of image (e.g. BASE, SERVER, ALL) Type string `q:"type"` }
ListOpts contain options for limiting the number of Images returned from a call to ListDetail.
func (ListOpts) ToImageListQuery ¶
ToImageListQuery formats a ListOpts into a query string.
type ListOptsBuilder ¶
ListOptsBuilder allows extensions to add additional parameters to the List request.
Source Files ¶
doc.go requests.go results.go urls.go
- Version
- v0.19.0
- Published
- Jun 10, 2015
- Platform
- linux/amd64
- Imports
- 3 packages
- Last checked
- 2 minutes ago –
Tools for package owners.