vfpool

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

API Actor for managing vfpool device

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Node ID
	// Required: true
	NodeID uint64 `url:"nodeId" json:"nodeId" validation:"required"`

	// NicName
	// Required: true
	NicName string `url:"nicName" json:"nicName" validation:"required"`

	// VF IDs
	// Required: true
	VFIDs []uint64 `url:"vfIds" json:"vfIds" validation:"required"`
}

Config struct for CreateRequest

type CreateRequest

type CreateRequest struct {
	// Name of device
	// Required: true
	Name string `url:"name" json:"name" validate:"required"`

	// Description
	// Required: false
	Description string `url:"description,omitempty" json:"description,omitempty"`

	// Name of device
	// Required: false
	Config []Config `url:"-" json:"config,omitempty" validate:"omitempty,dive"`

	// List of Account IDs
	// Required: false
	AccountAccess []uint64 `url:"accountAccess,omitempty" json:"accountAccess,omitempty"`

	// List of RG IDs
	// Required: false
	RGAccess []uint64 `url:"rgAccess,omitempty" json:"rgAccess,omitempty"`
}

CreateRequest struct to create vfpool device

type DeleteRequest

type DeleteRequest struct {
	// VFPool device ID
	// Required: true
	VFPoolID uint64 `url:"id" json:"id" validate:"required"`
}

DeleteRequest struct to delete vfpool device

type DisableRequest

type DisableRequest struct {
	// VFPool device ID
	// Required: true
	VFPoolID uint64 `url:"id" json:"id" validate:"required"`
}

DisableRequest struct to disable vfpool device

type EnableRequest

type EnableRequest struct {
	// VFPool device ID
	// Required: true
	VFPoolID uint64 `url:"id" json:"id" validate:"required"`
}

EnableRequest struct to enable vfpool device

type GetRequest

type GetRequest struct {
	// ID of vfpool device
	// Required: true
	VFPoolID uint64 `url:"id" json:"id" validate:"required"`
}

GetRequest struct to get detailed information about vfpool device

type ItemVFPool

type ItemVFPool struct {
	// AccountAccess
	AccountAccess []uint64 `json:"accountAccess"`

	// CreatedTime
	CreatedTime uint64 `json:"createdTime"`

	// Description
	Description string `json:"description"`

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

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

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

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

	// RGAccess
	RGAccess []uint64 `json:"rgAccess"`

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

	// UpdatedTime
	UpdatedTime uint64 `json:"updatedTime"`

	// VFS
	VFS []VFS `json:"vfs"`
}

Main information about vfpool device

func (ItemVFPool) Serialize

func (ivfpool ItemVFPool) Serialize(params ...string) (serialization.Serialized, error)

Serialize returns JSON-serialized []byte. Used as a wrapper over json.Marshal and json.MarshalIndent functions.

In order to serialize with indent make sure to follow these guidelines:

  • First argument -> prefix
  • Second argument -> indent

type ListRequest

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

	// Find by Grid ID
	// Required: false
	GID uint64 `url:"gid,omitempty" json:"gid,omitempty"`

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

	// Find by description
	// Required: false
	Description string `url:"description,omitempty" json:"description,omitempty"`

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

	// Find by account Access
	// Required: false
	AccountAccess uint64 `url:"accountAccess,omitempty" json:"accountAccess,omitempty"`

	// Find by resource group Access
	// Required: false
	RGAccess uint64 `url:"rgAccess,omitempty" json:"rgAccess,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 vfpool devices

type ListVFPool

type ListVFPool struct {
	Data []ItemVFPool `json:"data"`

	EntryCount uint64 `json:"entryCount"`
}

List of information about vfpool devices

func (ListVFPool) FilterByAccountAccess

func (lvfp ListVFPool) FilterByAccountAccess(accountAccess uint64) ListVFPool

FilterByAccountAccess returns ListVFPool with specified AccountAccess.

func (ListVFPool) FilterByDescription

func (lvfp ListVFPool) FilterByDescription(description string) ListVFPool

FilterByDescription returns ListVFPool with specified Description.

func (ListVFPool) FilterByGID

func (lvfp ListVFPool) FilterByGID(gid uint64) ListVFPool

FilterByGID returns ListVFPool with specified GID.

func (ListVFPool) FilterByID

func (lvfp ListVFPool) FilterByID(id uint64) ListVFPool

FilterByID returns ListVFPool with specified ID.

func (ListVFPool) FilterByName

func (lvfp ListVFPool) FilterByName(name string) ListVFPool

FilterByName returns ListVFPool with specified Name.

func (ListVFPool) FilterByRGAccess

func (lvfp ListVFPool) FilterByRGAccess(rgAccess uint64) ListVFPool

FilterByRGAccess returns ListVFPool with specified RGAccess.

func (ListVFPool) FilterByStatus

func (lvfp ListVFPool) FilterByStatus(status string) ListVFPool

FilterByStatus returns ListVFPool with specified Status.

func (ListVFPool) FilterFunc

func (lvfp ListVFPool) FilterFunc(predicate func(ItemVFPool) bool) ListVFPool

FilterFunc allows filtering ListVFPool based on a user-specified predicate.

func (ListVFPool) FindOne

func (lvfp ListVFPool) FindOne() ItemVFPool

FindOne returns first found ItemVFPool If none was found, returns an empty struct.

func (ListVFPool) IDs

func (lv ListVFPool) IDs() []uint64

IDs gets array of VFPool IDs from ListVFPool struct

func (ListVFPool) Serialize

func (lvfpool ListVFPool) Serialize(params ...string) (serialization.Serialized, error)

Serialize returns JSON-serialized []byte. Used as a wrapper over json.Marshal and json.MarshalIndent functions.

In order to serialize with indent make sure to follow these guidelines:

  • First argument -> prefix
  • Second argument -> indent

type RecordVFPool

type RecordVFPool struct {
	// AccountAccess
	AccountAccess []uint64 `json:"accountAccess"`

	// CreatedTime
	CreatedTime uint64 `json:"createdTime"`

	// Description
	Description string `json:"description"`

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

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

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

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

	// RGAccess
	RGAccess []uint64 `json:"rgAccess"`

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

	// UpdatedTime
	UpdatedTime uint64 `json:"updatedTime"`

	// VFS
	VFS []VFS `json:"vfs"`
}

Detailed information about vfpool device

func (RecordVFPool) Serialize

func (rvfpool RecordVFPool) Serialize(params ...string) (serialization.Serialized, error)

Serialize returns JSON-serialized []byte. Used as a wrapper over json.Marshal and json.MarshalIndent functions.

In order to serialize with indent make sure to follow these guidelines:

  • First argument -> prefix
  • Second argument -> indent

type UpdateRequest

type UpdateRequest struct {
	// VFPool device ID
	// Required: true
	VFPoolID uint64 `url:"id" json:"id" validate:"required"`

	// Name of vfpool device
	// Required: false
	Name string `url:"name,omitempty" json:"name,omitempty"`

	// Description
	// Required: false
	Description string `url:"description,omitempty" json:"description,omitempty"`

	// Name of device
	// Required: false
	Config []Config `url:"-" json:"config,omitempty" validation:"omitempty,dive"`

	// List of Account IDs
	// Required: false
	AccountAccess []uint64 `url:"accountAccess,omitempty" json:"accountAccess,omitempty"`

	// List of RG IDs
	// Required: false
	RGAccess []uint64 `url:"rgAccess,omitempty" json:"rgAccess,omitempty"`
}

UpdateRequest struct to update vfpool device

type VFItem

type VFItem struct {
	// NicName
	NicName string `json:"nicName"`

	// VFSInfo list
	VFSInfo VFSInfoList `json:"vfsInfo"`
}

VFItem struct

type VFList

type VFList []VFItem

VFList struct

type VFPool

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

Structure for creating request to vfpool

func New

func New(client interfaces.Caller) *VFPool

Builder for vfpool endpoints

func (VFPool) Create

func (v VFPool) Create(ctx context.Context, req CreateRequest) (uint64, error)

Create creates vfpool device

func (VFPool) Delete

func (v VFPool) Delete(ctx context.Context, req DeleteRequest) (bool, error)

Delete deletes vfpool device

func (VFPool) Disable

func (v VFPool) Disable(ctx context.Context, req DisableRequest) (bool, error)

Disable disables vfpool device

func (VFPool) Enable

func (v VFPool) Enable(ctx context.Context, req EnableRequest) (bool, error)

Enable enables vfpool device

func (VFPool) Get

func (v VFPool) Get(ctx context.Context, req GetRequest) (*RecordVFPool, error)

Get gets detailed information about vfpool device as a RecordVFPool struct

func (VFPool) GetRaw

func (v VFPool) GetRaw(ctx context.Context, req GetRequest) ([]byte, error)

GetRaw gets detailed information about vfpool device as an array of bytes

func (VFPool) List

func (v VFPool) List(ctx context.Context, req ListRequest) (*ListVFPool, error)

List gets list of all available vfpool devices as a ListVFPool struct

func (VFPool) ListRaw

func (v VFPool) ListRaw(ctx context.Context, req ListRequest) ([]byte, error)

ListRaw gets list of all available vfpool devices as an array of bytes

func (VFPool) Update

func (v VFPool) Update(ctx context.Context, req UpdateRequest) (bool, error)

Update updates vfpool device

type VFS

type VFS struct {
	// NodeID
	NodeID uint64 `json:"nodeId"`

	// UpdatedTime
	VFList VFList `json:"vfList"`
}

VFS struct

type VFSInfoItem

type VFSInfoItem struct {
	// ID
	ID uint64 `json:"id"`

	// Claimed
	Claimed bool `json:"claimed"`

	// VM ID
	VMID uint64 `json:"vmId"`
}

VFSInfoItem struct

type VFSInfoList

type VFSInfoList []VFSInfoItem

VFSInfoList struct

func (VFSInfoList) IDs

func (lv VFSInfoList) IDs() []uint64

IDs gets array of VF IDs from VFSInfoList struct

Jump to

Keyboard shortcuts

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