flipgroup

package
v1.10.1 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

API to manage FLIPGroup instances

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ComputeAddRequest

type ComputeAddRequest struct {
	// ID of the Floating IP group to add compute instance to
	// Required: true
	FLIPGroupID uint64 `url:"flipgroupId" json:"flipgroupId" validate:"required"`

	// ID of the compute instance to add to this group
	// Required: true
	ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"`
}

ComputeAddRequest struct to add compute instance

type ComputeRemoveRequest

type ComputeRemoveRequest struct {
	// ID of the Floating IP group to remove compute instance from
	// Required: true
	FLIPGroupID uint64 `url:"flipgroupId" json:"flipgroupId" validate:"required"`

	// ID of the compute instance to remove
	// Required: true
	ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"`
}

ComputeRemoveRequest struct to remove compute instance

type CreateRequest

type CreateRequest struct {
	// Account ID
	// Required: true
	AccountID uint64 `url:"accountId" json:"accountId" validate:"required"`

	// FLIPGroup name
	// Required: true
	Name string `url:"name" json:"name" validate:"required"`

	// Network type
	// Should be one of:
	//	- EXTNET
	//	- VINS
	// Required: true
	NetType string `url:"netType" json:"netType" validate:"computeNetType"`

	// ID of external network or VINS
	// Required: true
	NetID uint64 `url:"netId" json:"netId" validate:"required"`

	// Type of client
	//	- 'compute'
	//	- 'vins' (will be later)
	// Required: true
	ClientType string `url:"clientType" json:"clientType" validate:"flipgroupClientType"`

	// IP address to associate with this group. If empty, the platform will autoselect IP address
	// Required: false
	IP string `url:"ip,omitempty" json:"ip,omitempty"`

	// Text description of this FLIPGorup instance
	// Required: false
	Description string `url:"desc,omitempty" json:"desc,omitempty"`
}

CreateRequest struct to create FLIPGroup

type DeleteRequest

type DeleteRequest struct {
	// FLIPGroup ID
	// Required: true
	FLIPGroupID uint64 `url:"flipgroupId" json:"flipgroupId" validate:"required"`
}

DeleteRequest struct to delete FLIPGroup

type EditRequest

type EditRequest struct {
	// FLIPGroup ID
	// Required: true
	FLIPGroupID uint64 `url:"flipgroupId" json:"flipgroupId" validate:"required"`

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

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

EditRequest struct to edit FLIPGroup

type FLIPGroup

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

Structure for creating request to FLIPGroup

func New

func New(client interfaces.Caller) *FLIPGroup

Builder for FLIPGroup endpoints

func (FLIPGroup) ComputeAdd

func (f FLIPGroup) ComputeAdd(ctx context.Context, req ComputeAddRequest) (bool, error)

ComputeAdd adds compute instance to the Floating IP group

func (FLIPGroup) ComputeRemove

func (f FLIPGroup) ComputeRemove(ctx context.Context, req ComputeRemoveRequest) (bool, error)

ComputeRemove removes compute instance from the Floating IP group

func (FLIPGroup) Create

Create method will create a new FLIPGorup in the specified Account

func (FLIPGroup) Delete

func (f FLIPGroup) Delete(ctx context.Context, req DeleteRequest) (bool, error)

Delete method wil delete Floating IP group

func (FLIPGroup) Edit

func (f FLIPGroup) Edit(ctx context.Context, req EditRequest) (bool, error)

Edit edits FLIPGroup fields

func (FLIPGroup) Get

Get gets details of the specified Floating IP group as a RecordFLIPGroup struct

func (FLIPGroup) GetRaw added in v1.6.6

func (f FLIPGroup) GetRaw(ctx context.Context, req GetRequest) ([]byte, error)

GetRaw gets details of the specified Floating IP group as an array of bytes

func (FLIPGroup) List

List gets list of FLIPGroup managed cluster instances available to the current user as a ListFLIPGroups struct

func (FLIPGroup) ListRaw added in v1.6.6

func (f FLIPGroup) ListRaw(ctx context.Context, req ListRequest) ([]byte, error)

ListRaw gets list of FLIPGroup managed cluster instances available to the current user as an array of bytes

type GetRequest

type GetRequest struct {
	// FLIPGroup ID
	// Required: true
	FLIPGroupID uint64 `url:"flipgroupId" json:"flipgroupId" validate:"required"`
}

GetRequest struct to get information about FLIPGroup

type ItemFLIPGroup

type ItemFLIPGroup struct {
	// CKey
	CKey string `json:"_ckey"`

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

	// Account ID
	AccountID uint64 `json:"accountId"`

	// List of client IDs
	ClientIDs []uint64 `json:"clientIds"`

	// Client type
	ClientType string `json:"clientType"`

	// Connection ID
	ConnID uint64 `json:"connId"`

	// Connection type
	ConnType string `json:"connType"`

	// Default GW
	DefaultGW string `json:"defaultGW"`

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

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

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

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

	// IP
	IP string `json:"ip"`

	// Milestones
	Milestones uint64 `json:"milestones"`

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

	// Network ID
	NetID uint64 `json:"netId"`

	// Network type
	NetType string `json:"netType"`

	// NetMask
	NetMask uint64 `json:"netmask"`

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

Detailed information about FLIPGroup

func (ItemFLIPGroup) Serialize

func (ifg ItemFLIPGroup) 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 ListFLIPGroups

type ListFLIPGroups struct {
	Data []ItemFLIPGroup `json:"data"`

	EntryCount uint64 `json:"entryCount"`
}

List of FLIPGroup

func (ListFLIPGroups) IDs added in v1.6.8

func (le ListFLIPGroups) IDs() []uint64

IDs gets array of FLIPGroupIDs from ListFLIPGroups struct

func (ListFLIPGroups) Serialize

func (lfg ListFLIPGroups) 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 name
	// Required: false
	Name string `url:"name,omitempty" json:"name,omitempty"`

	// Find by vinsId
	// Required: false
	VINSID uint64 `url:"vinsId,omitempty" json:"vinsId,omitempty"`

	// Find by VINS name
	// Required: false
	VINSName string `url:"vinsName,omitempty" json:"vinsName,omitempty"`

	// Find by extnetId
	// Required: false
	ExtNetID uint64 `url:"extnetId,omitempty" json:"extnetId,omitempty"`

	// Find by IP
	// Required: false
	ByIP string `url:"byIp,omitempty" json:"byIp,omitempty"`

	// Find by accountId
	// Required: false
	AccountId uint64 `url:"accountId,omitempty" json:"accountId,omitempty"`

	// Find by resource group ID
	// Required: false
	RGID uint64 `url:"rgId,omitempty" json:"rgId,omitempty"`

	// Find by id
	// Required: false
	ByID uint64 `url:"by_id,omitempty" json:"by_id,omitempty"`

	// Find by list of clientIds
	// Required: false
	ClientIDs []uint64 `url:"clientIds,omitempty" json:"clientIds,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"`

	// Find by connId
	// Required: false
	ConnId uint64 `url:"connId,omitempty" json:"connId,omitempty"`

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

ListRequest struct to get list of FLIPGroup available to the current user

type RecordFLIPGroup

type RecordFLIPGroup struct {
	// Account ID
	AccountID uint64 `json:"accountId"`

	// Account name
	AccountName string `json:"accountName"`

	// List of client IDs
	ClientIDs []uint64 `json:"clientIds"`

	// Client names
	ClientNames []string `json:"clientNames"`

	// Client type
	ClientType string `json:"clientType"`

	// Connection ID
	ConnID uint64 `json:"connId"`

	// Connection type
	ConnType string `json:"connType"`

	// Created by
	CreatedBy string `json:"createdBy"`

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

	// Default GW
	DefaultGW string `json:"defaultGW"`

	// Deleted by
	DeletedBy string `json:"deletedBy"`

	// Deleted time
	DeletedTime uint64 `json:"deletedTime"`

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

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

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

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

	// IP
	IP string `json:"ip"`

	// Milestones
	Milestones uint64 `json:"milestones"`

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

	// Network ID
	NetID uint64 `json:"netId"`

	// Network type
	NetType string `json:"netType"`

	// Network
	Network string `json:"network"`

	// Resource group ID
	RGID uint64 `json:"rgId"`

	// Resource group name
	RGName string `json:"rgName"`

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

	// Updated by
	UpdatedBy string `json:"updatedBy"`

	// Updated time
	UpdatedTime uint64 `json:"updatedTime"`
}

type RecordFLIPGroupCreated

type RecordFLIPGroupCreated struct {
	// Default GW
	DefaultGW string `json:"defaultGW"`

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

	// IP
	IP string `json:"ip"`

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

	// Network mask
	NetMask uint64 `json:"netmask"`
}

Main information about FLIPGroup

Jump to

Keyboard shortcuts

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