image

package
v0.0.0-...-8fc61e2 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(restClient *client.RestClient, templateId string, requestOpts *client.RequestOpts) error

func List

func List(restClient *client.RestClient, requestOpts *client.RequestOpts) (*[]ImageInfo, error)

Types

type ImageInfo

type ImageInfo struct {
	ID            string
	TenantID      string
	ClusterID     string
	ClusterName   string
	Size          int
	RealSize      int
	RefCount      int
	Name          string
	CreatedAt     string
	Ownership     string // 테넌트 소유, 개인 소유
	TemplateType  string
	State         string
	Protection    int
	OS            string
	Arch          string // Architecture
	Format        string
	Enabled       int
	Description   string
	PoolID        string
	PoolName      string
	SnapshotID    string
	Creator       string
	VolumeID      string
	Url           string
	Pause         int
	SourceType    string
	MinKvmVersion int
}

func Create

func Create(restClient *client.RestClient, requestOpts *client.RequestOpts) (*ImageInfo, error)

func Get

func Get(restClient *client.RestClient, templateId string, requestOpts *client.RequestOpts) (*ImageInfo, error)

type ImageReqInfo

type ImageReqInfo struct {
	Name         string `json:"name" required:"true"`
	VolumeId     string `json:"volumeId" required:"true"`   // 정지된 서버 볼륨을 기준으로 이미지 템플릿 생성
	SnapshotId   string `json:"snapshotId" required:"true"` // 서버 스냅샷을 기준으로 이미지 템플릿 생성
	Ownership    string `json:"ownership" required:"true"`  // TENANT, PRIVATE
	Format       string `json:"format" required:"true"`     // raw, vdi, vmdk, vpc, qcow2
	SourceType   string `json:"sourceType" required:"true"` // server, snapshot
	TemplateType string `json:"templateType" required:"true"`
	Size         int    `json:"size" required:"false"`
	PoolId       string `json:"poolId" required:"false"`
	Protection   int    `json:"protection" required:"false"`
}

Jump to

Keyboard shortcuts

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