cephutils

package
v0.3.10-0-alpha2 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const DEFAULT_TIMTOUT_SECOND = 15

Variables

This section is empty.

Functions

This section is empty.

Types

type CephClient

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

func NewClient

func NewClient(monHost, key, pool string) (*CephClient, error)

func (*CephClient) Close

func (self *CephClient) Close() error

func (*CephClient) CreateImage

func (self *CephClient) CreateImage(name string, sizeMb int64) (*SImage, error)

func (*CephClient) GetCapacity

func (self *CephClient) GetCapacity() (*SCapacity, error)

func (*CephClient) GetImage

func (self *CephClient) GetImage(name string) (*SImage, error)

func (*CephClient) ListImages

func (self *CephClient) ListImages() ([]string, error)

func (*CephClient) Output

func (self *CephClient) Output(name string, opts []string) (jsonutils.JSONObject, error)

func (*CephClient) SetPool

func (self *CephClient) SetPool(pool string)

func (*CephClient) SetTimeout

func (cli *CephClient) SetTimeout(timeout int)

func (*CephClient) ShowConf

func (cli *CephClient) ShowConf() error

type SCapacity

type SCapacity struct {
	CapacitySizeKb     int64
	UsedCapacitySizeKb int64
}

type SChildren

type SChildren struct {
	Pool          string
	PoolNamespace string
	Image         string
}

type SImage

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

func (*SImage) Clone

func (self *SImage) Clone(ctx context.Context, pool, name string) error

func (*SImage) CreateSnapshot

func (self *SImage) CreateSnapshot(name string) (*SSnapshot, error)

func (*SImage) Delete

func (self *SImage) Delete() error

func (*SImage) Flatten

func (self *SImage) Flatten() error

func (*SImage) GetInfo

func (self *SImage) GetInfo() (*SImageInfo, error)

func (*SImage) GetName

func (self *SImage) GetName() string

func (*SImage) GetSnapshot

func (self *SImage) GetSnapshot(name string) (*SSnapshot, error)

func (*SImage) IsSnapshotExist

func (self *SImage) IsSnapshotExist(name string) (bool, error)

func (*SImage) ListSnapshots

func (self *SImage) ListSnapshots() ([]SSnapshot, error)

func (*SImage) Remove

func (self *SImage) Remove() error

func (*SImage) Rename

func (self *SImage) Rename(name string) error

func (*SImage) Resize

func (self *SImage) Resize(sizeMb int64) error

type SImageInfo

type SImageInfo struct {
	Name            string        `json:"name"`
	ID              string        `json:"id"`
	SizeByte        int64         `json:"size"`
	Objects         int           `json:"objects"`
	Order           int           `json:"order"`
	ObjectSize      int           `json:"object_size"`
	SnapshotCount   int           `json:"snapshot_count"`
	BlockNamePrefix string        `json:"block_name_prefix"`
	Format          int           `json:"format"`
	Features        []string      `json:"features"`
	OpFeatures      []interface{} `json:"op_features"`
	Flags           []interface{} `json:"flags"`
	CreateTimestamp string        `json:"create_timestamp"`
	AccessTimestamp string        `json:"access_timestamp"`
	ModifyTimestamp string        `json:"modify_timestamp"`
}

type SSnapshot

type SSnapshot struct {
	Name      string
	Id        string
	Size      int64
	Protected bool
	Timestamp string
	// contains filtered or unexported fields
}

func (*SSnapshot) Clone

func (self *SSnapshot) Clone(pool, name string) error

func (*SSnapshot) Delete

func (self *SSnapshot) Delete() error

func (*SSnapshot) GetName

func (self *SSnapshot) GetName() string

func (*SSnapshot) ListChildren

func (self *SSnapshot) ListChildren() ([]SChildren, error)

func (*SSnapshot) Protect

func (self *SSnapshot) Protect() error

func (*SSnapshot) Remove

func (self *SSnapshot) Remove() error

func (*SSnapshot) Rollback

func (self *SSnapshot) Rollback() error

func (*SSnapshot) Unprotect

func (self *SSnapshot) Unprotect() error

Jump to

Keyboard shortcuts

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