gophercloud: github.com/rackspace/gophercloud/openstack/compute/v2/images Index | Files

package images

import "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

Package Files

doc.go requests.go results.go urls.go

func ExtractImages Uses

func ExtractImages(page pagination.Page) ([]Image, error)

ExtractImages converts a page of List results into a slice of usable Image structs.

func IDFromName Uses

func IDFromName(client *gophercloud.ServiceClient, name string) (string, error)

IDFromName is a convienience function that returns an image's ID given its name.

func ListDetail Uses

func ListDetail(client *gophercloud.ServiceClient, opts ListOptsBuilder) pagination.Pager

ListDetail enumerates the available images.

type DeleteResult Uses

type DeleteResult struct {
    gophercloud.ErrResult
}

DeleteResult represents the result of an image.Delete operation.

func Delete Uses

func Delete(client *gophercloud.ServiceClient, id string) DeleteResult

Delete deletes the specified image ID.

type GetResult Uses

type GetResult struct {
    gophercloud.Result
}

GetResult temporarily stores a Get response.

func Get Uses

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 Uses

func (gr GetResult) Extract() (*Image, error)

Extract interprets a GetResult as an Image.

type Image Uses

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

    Metadata map[string]string
}

Image is used for JSON (un)marshalling. It provides a description of an OS image.

type ImagePage Uses

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 Uses

func (page ImagePage) IsEmpty() (bool, error)

IsEmpty returns true if a page contains no Image results.

func (ImagePage) NextPageURL Uses

func (page ImagePage) NextPageURL() (string, error)

NextPageURL uses the response's embedded link reference to navigate to the next page of results.

type ListOpts Uses

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 Uses

func (opts ListOpts) ToImageListQuery() (string, error)

ToImageListQuery formats a ListOpts into a query string.

type ListOptsBuilder Uses

type ListOptsBuilder interface {
    ToImageListQuery() (string, error)
}

ListOptsBuilder allows extensions to add additional parameters to the List request.

Package images imports 4 packages (graph) and is imported by 100 packages. Updated 2016-07-18. Refresh now. Tools for package owners.