glance

package
v2.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 1, 2020 License: LGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client provides a means to access the OpenStack Image Service.

func New

func New(client client.Client) *Client

New creates a new Client.

func (*Client) GetImageDetail

func (c *Client) GetImageDetail(imageId string) (*ImageDetail, error)

GetImageDetail lists details of the specified image.

func (*Client) GetImageDetailV2

func (c *Client) GetImageDetailV2(imageId string) (*ImageDetailV2, error)

GetImageDetailV2 lists details of the specified image, uses API v2.0

func (*Client) ListImages

func (c *Client) ListImages() ([]Image, error)

ListImages lists IDs, names, and links for available images.

func (*Client) ListImagesDetail

func (c *Client) ListImagesDetail() ([]ImageDetail, error)

ListImageDetails lists all details for available images.

func (*Client) ListImagesV2

func (c *Client) ListImagesV2() ([]ImageDetailV2, error)

ListImagesV2 lists all details for available image, uses API v2.0.

type Image

type Image struct {
	Id    string
	Name  string
	Links []Link
}

Image describes an OpenStack image.

type ImageDetail

type ImageDetail struct {
	Id          string
	Name        string
	Created     string
	Updated     string
	Progress    int
	Status      string
	MinimumRAM  int `json:"minRam"`
	MinimumDisk int `json:"minDisk"`
	Links       []Link
	Metadata    ImageMetadata
}

ImageDetail describes extended information about an image.

type ImageDetailV2

type ImageDetailV2 struct {
	Architecture    string `json:",omitempty"`
	Checksum        string
	ContainerFormat string `json:"container_format"`
	CreatedAt       string `json:"created_at"`
	DirectUrl       string
	DiskFormat      string `json:"disk_format"`
	File            string
	Id              string
	HwVifModel      string      `json:"hw_vif_model,omitempty"`
	HwDiskModel     string      `json:"hw_disk_bus,omitempty"`
	Locations       interface{} `json:",omitempty"`
	MinimumDisk     int         `json:"min_disk"`
	MinimumRAM      int         `json:"min_ram"`
	Name            string
	Owner           string
	OsType          string `json:"os_type"`
	Protected       bool
	Schema          string
	Self            string
	Size            int
	Status          string
	Tags            []string
	UpdatedAt       string `json:"updated_at"`
	VirtualSize     string `json:"virtual_size"`
	Visibility      string
}

ImageDetailV2 describes extended information about an image for API v2.0.

type ImageMetadata

type ImageMetadata struct {
	Architecture string
	State        string      `json:"image_state"`
	Location     string      `json:"image_location"`
	KernelId     interface{} `json:"kernel_id"`
	ProjectId    interface{} `json:"project_id"`
	RAMDiskId    interface{} `json:"ramdisk_id"`
	OwnerId      interface{} `json:"owner_id"`
}

ImageMetadata describes metadata of an image

type Link struct {
	Href string
	Rel  string
	Type string
}

Link describes a link to an image in OpenStack.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL