stack

package
v1.8.3 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GetLogicalCoresCountRequest added in v1.8.0

type GetLogicalCoresCountRequest struct {
	// Stack ID
	// Required: true
	StackId uint64 `url:"stackId" json:"stackId" validate:"required"`
}

GetLogicalCoresCountRequest struct to get logical cores count by stack

type GetRequest

type GetRequest struct {
	// Find by ID
	// Required: true
	StackId uint64 `url:"stackId" json:"stackId" validate:"required"`
}

GetRequest struct to get list of stacks

type InfoStack

type InfoStack struct {
	// CKey
	Ckey string `json:"_ckey"`

	// Meta
	Meta []interface{} `json:"_meta"`

	//API URL
	APIURL string `json:"apiUrl"`

	//API key
	Apikey string `json:"apikey"`

	// App ID
	AppID string `json:"appId"`

	// CPU allocation ratio
	CPUAllocationRatio float64 `json:"cpu_allocation_ratio"`

	// Description
	Description string `json:"desc"`

	// Descr
	Descr string `json:"descr"`

	// Drivers
	Drivers []string `json:"drivers"`

	// Eco
	Eco interface{} `json:"eco"`

	// Error
	Error uint64 `json:"error"`

	// Grid ID
	GID uint64 `json:"gid"`

	// GID
	GUID uint64 `json:"guid"`

	// ID
	ID uint64 `json:"id"`

	// List image IDs
	Images []uint64 `json:"images"`

	// Login
	Login string `json:"login"`

	// Mem allocation ratio
	MemAllocationRatio float64 `json:"mem_allocation_ratio"`

	// Name
	Name string `json:"name"`

	// Packegas
	Packages Packages `json:"packages"`

	//Password
	Password string `json:"passwd"`

	// Reference ID
	ReferenceID string `json:"referenceId"`

	// Status
	Status string `json:"status"`

	// Type
	Type string `json:"type"`
}

Main information about stack

type LibvirtBin

type LibvirtBin struct {
	// InstalledSize
	InstalledSize string `json:"installed_size"`

	// Version
	Ver string `json:"ver"`
}

LibvirtBin

type LibvirtDaemon added in v1.6.5

type LibvirtDaemon struct {
	// InstalledSize
	InstalledSize string `json:"installed_size"`

	// Version
	Ver string `json:"ver"`
}

type ListRequest

type ListRequest struct {
	// Find by ID
	// Required: false
	ByID uint64 `url:"by_id,omitempty" json:"by_id,omitempty"`

	// Find by name
	// Required: false
	Name string `url:"name,omitempty" json:"name,omitempty"`

	// Find by type
	// Required: false
	Type string `url:"type,omitempty" json:"type,omitempty"`

	// Find by status
	// Required: false
	Status string `url:"status,omitempty" json:"status,omitempty"`

	// Sort by one of supported fields, format +|-(field)
	// Required: false
	SortBy string `url:"sortBy,omitempty" json:"sortBy,omitempty" validate:"omitempty,sortBy"`

	// Page number
	// Required: false
	Page uint64 `url:"page,omitempty" json:"page,omitempty"`

	// Page size
	// Required: false
	Size uint64 `url:"size,omitempty" json:"size,omitempty"`
}

ListRequest struct to get list of stacks

type ListStacks

type ListStacks struct {
	//List
	Data []InfoStack `json:"data"`

	//Entry count
	EntryCount uint64 `json:"entryCount"`
}

List of stacks

func (ListStacks) IDs added in v1.6.8

func (ls ListStacks) IDs() []uint64

IDs gets array of StackIDs from ListStacks struct

type Lvm2Lockd

type Lvm2Lockd struct {
	// InstalledSize
	InstalledSize string `json:"installed_size"`

	// Version
	Ver string `json:"ver"`
}

Lvm2Lockd

type OpenvswitchCommon

type OpenvswitchCommon struct {
	// InstalledSize
	InstalledSize string `json:"installed_size"`

	// Version
	Ver string `json:"ver"`
}

OpenvswitchCommon

type OpenvswitchSwitch

type OpenvswitchSwitch struct {
	// InstalledSize
	InstalledSize string `json:"installed_size"`

	// Version
	Ver string `json:"ver"`
}

OpenvswitchSwitch

type Packages

type Packages struct {
	// LibvirtBin
	LibvirtBin LibvirtBin `json:"libvirt-bin"`

	// LibvirtDaemon
	LibvirtDaemon LibvirtDaemon `json:"libvirt-daemon"`

	// Lvm2Lockd
	Lvm2Lockd Lvm2Lockd `json:"lvm2-lockd"`

	// OpenvswitchCommon
	OpenvswitchCommon OpenvswitchCommon `json:"openvswitch-common"`

	// OpenvswitchSwitch
	OpenvswitchSwitch OpenvswitchSwitch `json:"openvswitch-switch"`

	// QemuSystemX86
	QemuSystemX86 QemuSystemX86 `json:"qemu-system-x86"`

	// Sanlock
	Sanlock Sanlock `json:"sanlock"`
}

Package

type QemuSystemX86

type QemuSystemX86 struct {
	// InstalledSize
	InstalledSize string `json:"installed_size"`

	// Version
	Ver string `json:"ver"`
}

QemuSystemX86

type Sanlock

type Sanlock struct {
	// InstalledSize
	InstalledSize string `json:"installed_size"`

	// Version
	Ver string `json:"ver"`
}

Sanlock

type SetCpuAllocationRatioRequest added in v1.8.0

type SetCpuAllocationRatioRequest struct {
	// Stack ID
	// Required: true
	StackId uint64 `url:"stackId" json:"stackId" validate:"required"`

	// Allocation ratio (zero or positive value)
	// Required: true
	Ratio float64 `url:"ratio" json:"ratio"`
}

SetCpuAllocationRatioRequest struct to set CPU allocation ratio

type SetMemAllocationRatioRequest added in v1.8.0

type SetMemAllocationRatioRequest struct {
	// Stack ID
	// Required: true
	StackId uint64 `url:"stackId" json:"stackId" validate:"required"`

	// Allocation ratio (zero or positive value)
	// Required: true
	Ratio float64 `url:"ratio" json:"ratio"`
}

SetMemAllocationRatioRequest struct to set memory allocation ratio

type Stack

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

Structure for creating request to stack

func New

func New(client interfaces.Caller) *Stack

Builder for stack endpoint

func (Stack) Get

func (i Stack) Get(ctx context.Context, req GetRequest) (*InfoStack, error)

Get gets stack details by ID as an InfoStack struct

func (Stack) GetLogicalCoresCount added in v1.8.0

func (i Stack) GetLogicalCoresCount(ctx context.Context, req GetLogicalCoresCountRequest) (uint64, error)

GetLogicalCoresCount get logical cores count by stack

func (Stack) GetRaw added in v1.6.6

func (i Stack) GetRaw(ctx context.Context, req GetRequest) ([]byte, error)

GetRaw gets stack details by ID as an array of bytes

func (Stack) List

func (i Stack) List(ctx context.Context, req ListRequest) (*ListStacks, error)

List gets list of stacks as a ListStacks struct

func (Stack) ListRaw added in v1.6.6

func (i Stack) ListRaw(ctx context.Context, req ListRequest) ([]byte, error)

ListRaw gets list of stacks as an array of bytes

func (Stack) SetCpuAllocationRatio added in v1.8.0

func (i Stack) SetCpuAllocationRatio(ctx context.Context, req SetCpuAllocationRatioRequest) (*InfoStack, error)

SetCpuAllocationRatio set CPU allocation ratio

func (Stack) SetMemAllocationRatio added in v1.8.0

func (i Stack) SetMemAllocationRatio(ctx context.Context, req SetMemAllocationRatioRequest) (*InfoStack, error)

SetMemAllocationRatio set memory allocation ratio

Jump to

Keyboard shortcuts

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