model

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2025 License: Apache-2.0 Imports: 4 Imported by: 9

Documentation

Overview

Package model is to handle object of CB-Tumblebug

Package model is to handle object of CB-Tumblebug

Package model is to handle object of CB-Tumblebug

Package model is to handle object of CB-Tumblebug

Package model is to handle object of CB-Tumblebug

Package model is to handle object of CB-Tumblebug

Package model is to handle object of CB-Tumblebug

Package model is to handle object of CB-Tumblebug

Package model is to handle object of CB-Tumblebug

Package model is to handle object of CB-Tumblebug

Package model is to handle object of CB-Tumblebug

Package mci is to handle REST API for mci

Package model is to handle object of CB-Tumblebug

Package model is to handle object of CB-Tumblebug

Package mci is to handle REST API for mci

Package model is to handle object of CB-Tumblebug

Package model is to handle object of CB-Tumblebug

Package model is to handle object of CB-Tumblebug

Package mci is to handle REST API for mci

Index

Constants

View Source
const (
	StrManager               string = "cb-tumblebug"
	StrSpiderRestUrl         string = "TB_SPIDER_REST_URL"
	StrDragonflyRestUrl      string = "TB_DRAGONFLY_REST_URL"
	StrTerrariumRestUrl      string = "TB_TERRARIUM_REST_URL"
	StrDBUrl                 string = "TB_POSTGRES_ENDPOINT"
	StrDBDatabase            string = "TB_POSTGRES_DATABASE"
	StrDBUser                string = "TB_POSTGRES_USER"
	StrDBPassword            string = "TB_POSTGRES_PASSWORD"
	StrAutocontrolDurationMs string = "TB_AUTOCONTROL_DURATION_MS"
	StrEtcdEndpoints         string = "TB_ETCD_ENDPOINTS"
	StrFromAssets            string = "from-assets"
	ErrStrKeyNotFound        string = "key not found"
	StrAdd                   string = "add"
	StrDelete                string = "delete"
	StrSSHKey                string = "sshKey"
	StrKeyPair               string = "keypair"
	StrImage                 string = "image"
	StrCustomImage           string = "customImage"
	StrSecurityGroup         string = "securityGroup"
	StrSG                    string = "sg"
	StrSpec                  string = "spec"
	StrVNet                  string = "vNet"
	StrSubnet                string = "subnet"
	StrVPC                   string = "vpc"
	StrVPN                   string = "vpn"
	StrSqlDB                 string = "sqlDb"
	StrObjectStorage         string = "objectStorage"
	StrDataDisk              string = "dataDisk"
	StrDisk                  string = "disk"
	StrNLB                   string = "nlb"
	StrVM                    string = "vm"
	StrMCI                   string = "mci"
	StrSubGroup              string = "subGroup"
	StrK8s                   string = "k8s"
	StrKubernetes            string = "kubernetes"
	StrNodeGroup             string = "nodegroup"
	StrCluster               string = "cluster"
	StrContainer             string = "container"
	StrNamespace             string = "ns"
	StrCommon                string = "common"
	StrEmpty                 string = "empty"
	StrSharedResourceName    string = "-shared-"

	// SystemCommonNs is const for SystemCommon NameSpace ID
	SystemCommonNs string = "system"
)
View Source
const (
	AttachDataDisk    string = "attach"
	DetachDataDisk    string = "detach"
	AvailableDataDisk string = "available"
)

type DataDiskCmd string

View Source
const (
	LabelManager         string = "sys.manager"
	LabelNamespace       string = "sys.namespace"
	LabelLabelType       string = "sys.labelType"
	LabelId              string = "sys.id"
	LabelName            string = "sys.name"
	LabelUid             string = "sys.uid"
	LabelCspResourceId   string = "sys.cspResourceId"
	LabelCspResourceName string = "sys.cspResourceName"
	LabelMciId           string = "sys.mciId"
	LabelMciName         string = "sys.mciName"
	LabelMciUid          string = "sys.mciUid"
	LabelMciDescription  string = "sys.mciDescription"
	LabelSubGroupId      string = "sys.subGroupId"
	LabelCreatedTime     string = "sys.createdTime"
	LabelConnectionName  string = "sys.connectionName"
	LabelDescription     string = "sys.description"
	LabelRegistered      string = "sys.registered"
	LabelPurpose         string = "sys.purpose"
	LabelDeploymentType  string = "sys.deploymentType"
	LabelDiskType        string = "sys.diskType"
	LabelDiskSize        string = "sys.diskSize"
	LabelVersion         string = "sys.version"
	LabelVNetId          string = "sys.vNetId"
	LabelIpv4_CIDR       string = "sys.ipv4_CIDR"
	LabelZone            string = "sys.zone"
	LabelStatus          string = "sys.status"
	LabelCspVNetId       string = "sys.cspVNetId"
	LabelCspVNetName     string = "sys.cspVNetName"
	LabelCidr            string = "sys.cidr"
)
View Source
const (
	// ActionCreate is const for Create
	ActionCreate string = "Create"

	// ActionTerminate is const for Terminate
	ActionTerminate string = "Terminate"

	// ActionSuspend is const for Suspend
	ActionSuspend string = "Suspend"

	// ActionResume is const for Resume
	ActionResume string = "Resume"

	// ActionReboot is const for Reboot
	ActionReboot string = "Reboot"

	// ActionRefine is const for Refine
	ActionRefine string = "Refine"

	// ActionComplete is const for Complete
	ActionComplete string = "None"
)
View Source
const (
	// StatusRunning is const for Running
	StatusRunning string = "Running"

	// StatusSuspended is const for Suspended
	StatusSuspended string = "Suspended"

	// StatusFailed is const for Failed
	StatusFailed string = "Failed"

	// StatusTerminated is const for Terminated
	StatusTerminated string = "Terminated"

	// StatusCreating is const for Creating
	StatusCreating string = "Creating"

	// StatusSuspending is const for Suspending
	StatusSuspending string = "Suspending"

	// StatusResuming is const for Resuming
	StatusResuming string = "Resuming"

	// StatusRebooting is const for Rebooting
	StatusRebooting string = "Rebooting"

	// StatusTerminating is const for Terminating
	StatusTerminating string = "Terminating"

	// StatusUndefined is const for Undefined
	StatusUndefined string = "Undefined"

	// StatusComplete is const for Complete
	StatusComplete string = "None"
)
View Source
const (
	// AutoStatusReady is const for "Ready" status.
	AutoStatusReady string = "Ready"

	// AutoStatusChecking is const for "Checking" status.
	AutoStatusChecking string = "Checking"

	// AutoStatusDetected is const for "Detected" status.
	AutoStatusDetected string = "Detected"

	// AutoStatusOperating is const for "Operating" status.
	AutoStatusOperating string = "Operating"

	// AutoStatusStabilizing is const for "Stabilizing" status.
	AutoStatusStabilizing string = "Stabilizing"

	// AutoStatusTimeout is const for "Timeout" status.
	AutoStatusTimeout string = "Timeout"

	// AutoStatusError is const for "Failed" status.
	AutoStatusError string = "Failed"

	// AutoStatusSuspended is const for "Suspended" status.
	AutoStatusSuspended string = "Suspended"
)

Status for mci automation

View Source
const (
	// AutoActionScaleOut is const for "ScaleOut" action.
	AutoActionScaleOut string = "ScaleOut"

	// AutoActionScaleIn is const for "ScaleIn" action.
	AutoActionScaleIn string = "ScaleIn"
)

Action for mci automation

View Source
const (
	MonMetricAll     string = "all"
	MonMetricCpu     string = "cpu"
	MonMetricCpufreq string = "cpufreq"
	MonMetricMem     string = "mem"
	MonMetricNet     string = "net"
	MonMetricSwap    string = "swap"
	MonMetricDisk    string = "disk"
	MonMetricDiskio  string = "diskio"
)
View Source
const DefaultSystemLabel string = "Managed by CB-Tumblebug"

DefaultSystemLabel is const for string to specify the Default System Label

View Source
const MilkywayPort string = ":1324/milkyway/"

MilkywayPort is const for MilkywayPort

View Source
const StrAutoGen string = "autogen"

Variables

View Source
var AutocontrolDurationMs string
View Source
var DBDatabase string
View Source
var DBPassword string
View Source
var DBUrl string
View Source
var DBUser string
View Source
var DefaultCredentialHolder string
View Source
var DefaultNamespace string
View Source
var DragonflyRestUrl string
View Source
var EtcdEndpoints string
View Source
var MyDB *sql.DB
View Source
var ORM *gorm.DB

var ORM *xorm.Engine

View Source
var ResourceTypeRegistry = map[string]func() interface{}{
	StrSSHKey:        func() interface{} { return &TbSshKeyInfo{} },
	StrImage:         func() interface{} { return &TbImageInfo{} },
	StrCustomImage:   func() interface{} { return &TbCustomImageInfo{} },
	StrSecurityGroup: func() interface{} { return &TbSecurityGroupInfo{} },
	StrSpec:          func() interface{} { return &TbSpecInfo{} },
	StrVNet:          func() interface{} { return &TbVNetInfo{} },
	StrSubnet:        func() interface{} { return &TbSubnetInfo{} },
	StrDataDisk:      func() interface{} { return &TbDataDiskInfo{} },
	StrNLB:           func() interface{} { return &TbNLBInfo{} },
	StrVM:            func() interface{} { return &TbVmInfo{} },
	StrMCI:           func() interface{} { return &TbMciInfo{} },
	StrK8s:           func() interface{} { return &TbK8sClusterInfo{} },
	StrNamespace:     func() interface{} { return &NsInfo{} },
	StrVPN:           func() interface{} { return &VpnInfo{} },
}

ResourceTypeRegistry is map for Resource type

View Source
var SelfEndpoint string
View Source
var SpiderRestUrl string
View Source
var SshDefaultUserName = []string{"cb-user", "ubuntu", "root", "ec2-user"}

SshDefaultUserName is array for temporal constants

View Source
var StartTime string
View Source
var SystemReady bool

SystemReady is global variable for checking SystemReady status

View Source
var TerrariumRestUrl string

Functions

func GetLabelConstantsMap added in v0.9.12

func GetLabelConstantsMap() map[string]string

GetLabelConstantsMap returns a map with label-related system constants as keys and their example values.

func GetLabelTypes added in v0.9.12

func GetLabelTypes() []string

GetLabelTypes returns a list of label types.

Types

type AgentInstallContent

type AgentInstallContent struct {
	MciId  string `json:"mciId"`
	VmId   string `json:"vmId"`
	VmIp   string `json:"vmIp"`
	Result string `json:"result"`
}

AgentInstallContent ...

type AgentInstallContentWrapper

type AgentInstallContentWrapper struct {
	ResultArray []AgentInstallContent `json:"resultArray"`
}

AgentInstallContentWrapper ...

type AlibabaSpecificProperty added in v0.10.7

type AlibabaSpecificProperty struct {
	BgpAsn string `json:"bgpAsn,omitempty" default:"65532" example:"65532"`
}

type AutoAction

type AutoAction struct {
	ActionType   string         `json:"actionType" example:"ScaleOut" enums:"ScaleOut,ScaleIn"`
	VmDynamicReq TbVmDynamicReq `json:"vmDynamicReq"`

	// PostCommand is field for providing command to VMs after its creation. example:"wget https://raw.githubusercontent.com/cloud-barista/cb-tumblebug/main/scripts/setweb.sh -O ~/setweb.sh; chmod +x ~/setweb.sh; sudo ~/setweb.sh"
	PostCommand   MciCmdReq `json:"postCommand"`
	PlacementAlgo string    `json:"placementAlgo" example:"random"`
}

AutoAction is struct for MCI auto-control action.

type AutoCondition

type AutoCondition struct {
	Metric           string   `json:"metric" example:"cpu"`
	Operator         string   `json:"operator" example:">=" enums:"<,<=,>,>="`
	Operand          string   `json:"operand" example:"80"`
	EvaluationPeriod string   `json:"evaluationPeriod" example:"10"`
	EvaluationValue  []string `json:"evaluationValue"`
}

AutoCondition is struct for MCI auto-control condition.

type AwsSpecificProperty added in v0.10.7

type AwsSpecificProperty struct {
	BgpAsn string `json:"bgpAsn,omitempty" default:"64512" example:"64512"`
}

type AzureSpecificProperty added in v0.10.7

type AzureSpecificProperty struct {
	GatewaySubnetCidr string `json:"gatewaySubnetCidr,omitempty" default:"" example:"xxx.xxx.xxx.xxx/xx"`
	BgpAsn            string `json:"bgpAsn,omitempty" default:"65531" example:"65531"`
	VpnSku            string `json:"vpnSku,omitempty" default:"VpnGw1AZ" example:"VpnGw1AZ"`
}

type BastionInfo

type BastionInfo struct {
	VmId []string `json:"vmId"`
}

BastionInfo is struct for bastion info

type BastionNode

type BastionNode struct {
	MciId string `json:"mciId"`
	VmId  string `json:"vmId"`
}

BastionNode is a struct that represents TB BastionNode object.

type BenchmarkInfo

type BenchmarkInfo struct {
	Result      string          `json:"result"`
	Unit        string          `json:"unit"`
	Desc        string          `json:"desc"`
	Elapsed     string          `json:"elapsed"`
	SpecId      string          `json:"specid"`
	RegionName  string          `json:"regionName"`
	ResultArray []BenchmarkInfo `json:"resultarray"` // struct-element cycle ?
}

BenchmarkInfo is struct for BenchmarkInfo

type BenchmarkInfoArray

type BenchmarkInfoArray struct {
	ResultArray []BenchmarkInfo `json:"resultarray"`
}

BenchmarkInfoArray is struct for BenchmarkInfoArray

type BenchmarkReq

type BenchmarkReq struct {
	Host string `json:"host"`
	Spec string `json:"spec"`
}

BenchmarkReq is struct for BenchmarkReq

type CIDRBlockDetail added in v0.10.7

type CIDRBlockDetail struct {
	CIDRBlock   string `mapstructure:"cidr-block" json:"cidrBlock"`
	Description string `mapstructure:"description" json:"description"`
}

CIDRBlockDetail is structure for IP range information

type CSPDetail

type CSPDetail struct {
	Description string                  `mapstructure:"description" json:"description"`
	Driver      string                  `mapstructure:"driver" json:"driver"`
	Links       []string                `mapstructure:"link" json:"links,omitempty"`
	Regions     map[string]RegionDetail `mapstructure:"region" json:"regions"`
}

CSPDetail is structure for CSP information

type CSPNetworkDetail added in v0.10.7

type CSPNetworkDetail struct {
	Description         string            `mapstructure:"description" json:"description"`
	Links               []string          `mapstructure:"link" json:"links,omitempty"`
	AvailableCIDRBlocks []CIDRBlockDetail `mapstructure:"available-cidr-blocks" json:"availableCidrBlocks"`
	ReservedCIDRBlocks  []CIDRBlockDetail `mapstructure:"reserved-cidr-blocks" json:"reservedCidrBlocks,omitempty"`
	VNet                *VNetDetail       `mapstructure:"vnet" json:"vnet,omitempty"`
	Subnet              *SubnetDetail     `mapstructure:"subnet" json:"subnet,omitempty"`
	VPN                 *VPNDetail        `mapstructure:"vpn" json:"vpn,omitempty"`
}

CSPNetworkDetail is structure for CSP network information

type CheckK8sClusterDynamicReqInfo added in v0.10.0

type CheckK8sClusterDynamicReqInfo struct {
	ReqCheck []CheckNodeDynamicReqInfo `json:"reqCheck" validate:"required"`
}

CheckK8sClusterDynamicReqInfo is struct to check requirements to create a new K8sCluster instance dynamically (with default resource option)

type CheckMciDynamicReqInfo

type CheckMciDynamicReqInfo struct {
	ReqCheck []CheckVmDynamicReqInfo `json:"reqCheck" validate:"required"`
}

CheckMciDynamicReqInfo is struct to check requirements to create a new MCI instance dynamically (with default resource option)

type CheckNodeDynamicReqInfo added in v0.10.0

type CheckNodeDynamicReqInfo struct {

	// ConnectionConfigCandidates will provide ConnectionConfig options
	ConnectionConfigCandidates []string `json:"connectionConfigCandidates" default:""`

	Spec   TbSpecInfo    `json:"spec" default:""`
	Image  []TbImageInfo `json:"image" default:""`
	Region RegionDetail  `json:"region" default:""`

	// Latest system message such as error message
	SystemMessage string `json:"systemMessage" example:"Failed because ..." default:""` // systeam-given string message

}

CheckNodeDynamicReqInfo is struct to check requirements to create a new server instance dynamically (with default resource option)

type CheckVmDynamicReqInfo

type CheckVmDynamicReqInfo struct {

	// ConnectionConfigCandidates will provide ConnectionConfig options
	ConnectionConfigCandidates []string `json:"connectionConfigCandidates" default:""`

	Spec   TbSpecInfo    `json:"spec" default:""`
	Image  []TbImageInfo `json:"image" default:""`
	Region RegionDetail  `json:"region" default:""`

	// Latest system message such as error message
	SystemMessage string `json:"systemMessage" example:"Failed because ..." default:""` // systeam-given string message

}

CheckVmDynamicReqInfo is struct to check requirements to create a new server instance dynamically (with default resource option)

type Cloud

type Cloud struct {
	Common    CloudSetting `yaml:"common"`
	Aws       CloudSetting `yaml:"aws"`
	Azure     CloudSetting `yaml:"azure"`
	Gcp       CloudSetting `yaml:"gcp"`
	Alibaba   CloudSetting `yaml:"alibaba"`
	Tencent   CloudSetting `yaml:"tencent"`
	Ibm       CloudSetting `yaml:"ibm"`
	Nhncloud  CloudSetting `yaml:"nhncloud"`
	Openstack CloudSetting `yaml:"openstack"`
	Cloudit   CloudSetting `yaml:"cloudit"`
}

Cloud is structure for cloud settings per CSP

type CloudDriverInfo

type CloudDriverInfo struct {
	DriverName        string
	ProviderName      string
	DriverLibFileName string
}

CloudDriverInfo is struct for containing a CB-Spider struct for cloud driver info

type CloudInfo

type CloudInfo struct {
	CSPs map[string]CSPDetail `mapstructure:"cloud" json:"csps"`
}

CloudInfo is structure for cloud information

type CloudNetworkInfo added in v0.10.7

type CloudNetworkInfo struct {
	CSPs map[string]CSPNetworkDetail `mapstructure:"network" json:"csps"`
}

NetworkInfo is structure for network information

type CloudSetting

type CloudSetting struct {
	Enable     string            `yaml:"enable"`
	Nlb        NlbSetting        `yaml:"nlb"`
	K8sCluster K8sClusterSetting `yaml:"k8scluster"`
}

CloudSetting is structure for cloud settings per CSP in details

type ConfigInfo

type ConfigInfo struct {
	Id    string `json:"id" example:"TB_SPIDER_REST_URL"`
	Name  string `json:"name" example:"TB_SPIDER_REST_URL"`
	Value string `json:"value" example:"http://localhost:1024/spider"`
}

swagger:response ConfigInfo

type ConfigReq

type ConfigReq struct {
	Name  string `json:"name" example:"TB_SPIDER_REST_URL"`
	Value string `json:"value" example:"http://localhost:1024/spider"`
}

swagger:request ConfigReq

type ConnConfig

type ConnConfig struct {
	ConfigName           string         `json:"configName"`
	ProviderName         string         `json:"providerName"`
	DriverName           string         `json:"driverName"`
	CredentialName       string         `json:"credentialName"`
	CredentialHolder     string         `json:"credentialHolder"`
	RegionZoneInfoName   string         `json:"regionZoneInfoName"`
	RegionZoneInfo       RegionZoneInfo `json:"regionZoneInfo" gorm:"type:text;serializer:json"`
	RegionDetail         RegionDetail   `json:"regionDetail" gorm:"type:text;serializer:json"`
	RegionRepresentative bool           `json:"regionRepresentative"`
	Verified             bool           `json:"verified"`
}

ConnConfig is struct for containing modified CB-Spider struct for connection config

type ConnConfigList

type ConnConfigList struct {
	Connectionconfig []ConnConfig `json:"connectionconfig"`
}

ConnConfigList is struct for containing a CB-Spider struct for connection config list

type ControlVmResult

type ControlVmResult struct {
	VmId   string `json:"vmId"`
	Status string `json:"Status"`
	Error  error  `json:"Error"`
}

ControlVmResult is struct for result of VM control

type ControlVmResultWrapper

type ControlVmResultWrapper struct {
	ResultArray []ControlVmResult `json:"resultarray"`
}

ControlVmResultWrapper is struct for array of results of VM control

type Credential

type Credential struct {
	Credentialholder map[string]map[string]map[string]string `yaml:"credentialholder"`
}

type CredentialInfo

type CredentialInfo struct {
	CredentialName   string         `json:"credentialName"`
	CredentialHolder string         `json:"credentialHolder"`
	ProviderName     string         `json:"providerName"`
	KeyValueInfoList []KeyValue     `json:"keyValueInfoList"`
	AllConnections   ConnConfigList `json:"allConnections"`
}

CredentialInfo is struct for containing a struct for credential info

type CredentialReq

type CredentialReq struct {

	// ProviderName specifies the cloud provider associated with the credential (e.g., AWS, GCP).
	ProviderName string `json:"providerName" example:"aws"`

	// CredentialHolder is the entity or user that holds the credential.
	CredentialHolder string `json:"credentialHolder" example:"admin"`

	// PublicKeyTokenId is the unique token ID used to retrieve the corresponding private key for decryption.
	PublicKeyTokenId string `json:"publicKeyTokenId" example:"cr31av30uphc738d7h0g"`

	// EncryptedClientAesKeyByPublicKey is the client temporary AES key encrypted with the RSA public key.
	EncryptedClientAesKeyByPublicKey string `` /* 138-byte string literal not displayed */

	// CredentialKeyValueList contains key-(encrypted)value pairs that include the sensitive credential data.
	CredentialKeyValueList []KeyWithEncryptedValue `json:"credentialKeyValueList"`
}

CredentialReq is struct for containing a struct for credential request @Description CredentialReq contains the necessary information to register a credential. @Description This includes the AES key encrypted with the RSA public key, which is then used to decrypt the AES key on the server side.

type CspSpecificProperty added in v0.10.7

type CspSpecificProperty struct {
	Aws     *AwsSpecificProperty     `json:"aws,omitempty"`
	Azure   *AzureSpecificProperty   `json:"azure,omitempty"`
	Gcp     *GcpSpecificProperty     `json:"gcp,omitempty"`
	Alibaba *AlibabaSpecificProperty `json:"alibaba,omitempty"`
}

type CustomImageStatus

type CustomImageStatus string
const (
	MyImageAvailable   CustomImageStatus = "Available"
	MyImageUnavailable CustomImageStatus = "Unavailable"
)

type DeploymentPlan

type DeploymentPlan struct {
	Filter   FilterInfo   `json:"filter"`
	Priority PriorityInfo `json:"priority"`
	Limit    string       `json:"limit" example:"5" enums:"1,2,30"`
}

DeploymentPlan is struct for .

type DfAgentInstallReq

type DfAgentInstallReq struct {
	NsId        string `json:"ns_id"`
	MciId       string `json:"mci_id"`
	VmId        string `json:"vm_id"`
	PublicIp    string `json:"public_ip"`
	UserName    string `json:"user_name"`
	SshKey      string `json:"ssh_key"`
	CspType     string `json:"cspType"`
	ServiceType string `json:"service_type"`
	Port        string `json:"port"`
}

DfAgentInstallReq is struct for CB-Dragonfly monitoring agent installation request

type DiskStatus

type DiskStatus string
const (
	DiskCreating  DiskStatus = "Creating"
	DiskAvailable DiskStatus = "Available"
	DiskAttached  DiskStatus = "Attached"
	DiskDeleting  DiskStatus = "Deleting"
	DiskError     DiskStatus = "Error"
)

type ExtractPatterns added in v0.10.7

type ExtractPatterns struct {
	OSType      map[string]OSTypeDetail `mapstructure:"osType" json:"os_type"`
	GPUPatterns []string                `mapstructure:"gpuPatterns" json:"gpu_patterns"`
	K8sPatterns []string                `mapstructure:"k8sPatterns" json:"k8s_patterns"`
}

ExtractPatterns is structure for extraction patterns

type ExtractPatternsInfo added in v0.10.7

type ExtractPatternsInfo struct {
	ExtractPatterns ExtractPatterns `mapstructure:"extractionPatterns" json:"extraction_patterns"`
}

ExtractPatternsInfo is structure for extraction patterns information

type FilterCondition

type FilterCondition struct {
	Metric    string      `json:"metric" example:"vCPU" enums:"vCPU,memoryGiB,costPerHour"`
	Condition []Operation `json:"condition"`
}

FilterCondition is struct for .

type FilterInfo

type FilterInfo struct {
	Policy []FilterCondition `json:"policy"`
}

FilterInfo is struct for .

type FilterSpecsByRangeRequest

type FilterSpecsByRangeRequest struct {
	Id                  string `json:"id"`
	Name                string `json:"name"`
	ConnectionName      string `json:"connectionName"`
	ProviderName        string `json:"providerName"`
	RegionName          string `json:"regionName"`
	CspSpecName         string `json:"cspSpecName"`
	InfraType           string `json:"infraType"`
	Architecture        string `json:"architecture"`
	OsType              string `json:"osType"`
	VCPU                Range  `json:"vCPU"`
	MemoryGiB           Range  `json:"memoryGiB"`
	DiskSizeGB          Range  `json:"diskSizeGB"`
	MaxTotalStorageTiB  Range  `json:"maxTotalStorageTiB"`
	NetBwGbps           Range  `json:"netBwGbps"`
	AcceleratorModel    string `json:"acceleratorModel"`
	AcceleratorCount    Range  `json:"acceleratorCount"`
	AcceleratorMemoryGB Range  `json:"acceleratorMemoryGB"`
	AcceleratorType     string `json:"acceleratorType"`
	CostPerHour         Range  `json:"costPerHour"`
	Description         string `json:"description"`
	EvaluationStatus    string `json:"evaluationStatus"`
	EvaluationScore01   Range  `json:"evaluationScore01"`
	EvaluationScore02   Range  `json:"evaluationScore02"`
	EvaluationScore03   Range  `json:"evaluationScore03"`
	EvaluationScore04   Range  `json:"evaluationScore04"`
	EvaluationScore05   Range  `json:"evaluationScore05"`
	EvaluationScore06   Range  `json:"evaluationScore06"`
	EvaluationScore07   Range  `json:"evaluationScore07"`
	EvaluationScore08   Range  `json:"evaluationScore08"`
	EvaluationScore09   Range  `json:"evaluationScore09"`
	EvaluationScore10   Range  `json:"evaluationScore10"`
}

FilterSpecsByRangeRequest is for 'FilterSpecsByRange'

type GatewaySubnetDetail added in v0.10.7

type GatewaySubnetDetail struct {
	Required     bool               `mapstructure:"required" json:"required"`
	Name         string             `mapstructure:"name" json:"name"`
	Description  string             `mapstructure:"description" json:"description"`
	PrefixLength PrefixLengthDetail `mapstructure:"prefix-length" json:"prefixLength"`
}

GatewaySubnetDetail is structure for gateway subnet configuration

type GcpSpecificProperty added in v0.10.7

type GcpSpecificProperty struct {
	BgpAsn string `json:"bgpAsn,omitempty" default:"65530" example:"65530"`
}

type IID

type IID struct {
	NameId   string `json:"NameId" validate:"required" example:"user-defined-name"`
	SystemId string `json:"SystemId" validate:"required" example:"csp-defined-id"`
}

Spider 2024-10-05 https://github.com/cloud-barista/cb-spider/blob/master/cloud-control-manager/cloud-driver/interfaces/resources/IId.go

type IbmSpecificProperty added in v0.10.7

type IbmSpecificProperty struct {
}

* Note: nothing is needed for IBM currently.

type IdList

type IdList struct {
	IdList []string `json:"output"`
	// contains filtered or unexported fields
}

func (*IdList) AddItem

func (list *IdList) AddItem(id string)

AddItem adds a new item to the model.IdList

type ImageFetchOption added in v0.10.7

type ImageFetchOption struct {
	// providers need to be excluded from the image fetching operation (ex: ["azure"])
	ExcludedProviders []string `json:"excludedProviders,omitempty" example:"azure" description:"Providers to be excluded from the image fetching operation."`

	// providers that are not region-specific (ex: ["gcp"])
	RegionAgnosticProviders []string `json:"regionAgnosticProviders,omitempty" example:"gcp,tencent" description:"Providers that are not region-specific."`
}

ImageFetchOption is struct for Image Fetch Options

type ImageStatus added in v0.10.7

type ImageStatus string
const (
	ImageAvailable   ImageStatus = "Available"
	ImageUnavailable ImageStatus = "Unavailable"
	ImageDeprecated  ImageStatus = "Deprecated"
	ImageNA          ImageStatus = "NA"
)

type InspectResource

type InspectResource struct {
	ConnectionName   string                `json:"connectionName"`
	ResourceType     string                `json:"resourceType"`
	SystemMessage    string                `json:"systemMessage"`
	ResourceOverview ResourceCountOverview `json:"resourceOverview"`
	Resources        ResourcesByManageType `json:"resources"`
}

InspectResource is struct for InspectResource per Cloud Connection

type InspectResourceAllResult

type InspectResourceAllResult struct {
	ElapsedTime          int                     `json:"elapsedTime"`
	RegisteredConnection int                     `json:"registeredConnection"`
	AvailableConnection  int                     `json:"availableConnection"`
	TumblebugOverview    inspectOverview         `json:"tumblebugOverview"`
	CspOnlyOverview      inspectOverview         `json:"cspOnlyOverview"`
	InspectResult        []InspectResourceResult `json:"inspectResult"`
}

InspectResourceAllResult is struct for Inspect Resource Result for All Clouds

type InspectResourceResult

type InspectResourceResult struct {
	ConnectionName    string          `json:"connectionName"`
	SystemMessage     string          `json:"systemMessage"`
	ElapsedTime       int             `json:"elapsedTime"`
	TumblebugOverview inspectOverview `json:"tumblebugOverview"`
	CspOnlyOverview   inspectOverview `json:"cspOnlyOverview"`
}

InspectResourceResult is struct for Inspect Resource Result

type K8sClusterConnectionConfigCandidatesReq added in v0.10.0

type K8sClusterConnectionConfigCandidatesReq struct {
	// CommonSpec is field for id of a spec in common namespace
	CommonSpecs []string `json:"commonSpec" validate:"required" example:"tencent+ap-seoul+S2.MEDIUM4"`
}

K8sClusterConnectionConfigCandidatesReq is struct for a request to check requirements to create a new K8sCluster instance dynamically (with default resource option)

type K8sClusterDetail

type K8sClusterDetail struct {
	NodeGroupsOnCreation bool                        `mapstructure:"nodeGroupsOnCreation" json:"nodegroups_on_creation"`
	NodeImageDesignation bool                        `mapstructure:"nodeImageDesignation" json:"node_image_designation"`
	RequiredSubnetCount  int                         `mapstructure:"requiredSubnetCount" json:"required_subnet_count"`
	NodeGroupNamingRule  string                      `mapstructure:"nodeGroupNamingRule" json:"nodegroup_naming_rule"`
	Version              []K8sClusterVersionDetail   `mapstructure:"version" json:"versions"`
	NodeImage            []K8sClusterNodeImageDetail `mapstructure:"nodeImage" json:"node_images"`
	RootDisk             []K8sClusterRootDiskDetail  `mapstructure:"rootDisk" json:"root_disks"`
}

K8sClusterDetail is structure for kubernetes cluster detail information

type K8sClusterInfo

type K8sClusterInfo struct {
	CSPs map[string]K8sClusterDetail `mapstructure:"k8scluster" json:"k8s_cluster"`
}

K8sClusterInfo is structure for kubernetes cluster information

type K8sClusterNodeGroupsOnCreation

type K8sClusterNodeGroupsOnCreation struct {
	Result string `json:"result" example:"true"`
}

type K8sClusterNodeImageDesignation added in v0.10.0

type K8sClusterNodeImageDesignation struct {
	Result string `json:"result" example:"true"`
}

type K8sClusterNodeImageDetail

type K8sClusterNodeImageDetail struct {
	Region    []string                             `mapstructure:"region" json:"region"`
	Available []K8sClusterNodeImageDetailAvailable `mapstructure:"available" json:"availables"`
}

K8sClusterNodeImageDetail is structure for kubernetes cluster node image detail information

type K8sClusterNodeImageDetailAvailable

type K8sClusterNodeImageDetailAvailable struct {
	Name string `mapstructure:"name" json:"name"`
	Id   string `mapstructure:"id" json:"id"`
}

K8sClusterNodeImageDetailAvailable is structure for kubernetes cluster node image detail's available information

type K8sClusterRequiredSubnetCount added in v0.10.0

type K8sClusterRequiredSubnetCount struct {
	Result string `json:"result" example:"1"`
}

type K8sClusterRootDiskDetail

type K8sClusterRootDiskDetail struct {
	Region []string                       `mapstructure:"region" json:"region"`
	Type   []K8sClusterRootDiskDetailType `mapstructure:"type" json:"type"`
	Size   K8sClusterRootDiskDetailSize   `mapstructure:"size" json:"size"`
}

K8sClusterRootDiskDetail is structure for kubernetes cluster root disk detail information

type K8sClusterRootDiskDetailSize

type K8sClusterRootDiskDetailSize struct {
	Min uint `mapstructure:"min" json:"min"`
	Max uint `mapstructure:"max" json:"max"`
}

K8sClusterRootDiskDetailSize is structure for kubernetes cluster root disk detail's size information

type K8sClusterRootDiskDetailType

type K8sClusterRootDiskDetailType struct {
	Name string `mapstructure:"name" json:"name"`
	Id   string `mapstructure:"id" json:"id"`
}

K8sClusterRootDiskDetailType is structure for kubernetes cluster root disk detail's type information

type K8sClusterSetting

type K8sClusterSetting struct {
	Enable string `yaml:"enable"`
}

K8sClusterSetting is structure for K8sCluster setting

type K8sClusterVersionDetail

type K8sClusterVersionDetail struct {
	Region    []string                           `mapstructure:"region" json:"region"`
	Available []K8sClusterVersionDetailAvailable `mapstructure:"available" json:"availables"`
}

K8sClusterVersionDetail is structure for kubernetes cluster version detail information

type K8sClusterVersionDetailAvailable

type K8sClusterVersionDetailAvailable struct {
	Name string `mapstructure:"name" json:"name" example:"1.30"`
	Id   string `mapstructure:"id" json:"id" example:"1.30.1-aliyun.1"`
}

K8sClusterVersionDetailAvailable is structure for kubernetes cluster version detail's available information

type KeyValue

type KeyValue struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

KeyValue is struct for key-value pair

type KeyWithEncryptedValue

type KeyWithEncryptedValue struct {
	// Key for the value
	Key string `json:"key"`

	// Should be encrypted by the public key issued by GET /credential/publicKey
	Value string `json:"value"`
}

KeyWithEncryptedValue is struct for key-(encrypted)value pair

type Label added in v0.9.10

type Label struct {
	Labels map[string]string `json:"labels"`
}

Label is a struct to handle labels

type LabelInfo

type LabelInfo struct {
	ResourceKey string            `json:"resourceKey"`
	Labels      map[string]string `json:"labels"`
}

LabelInfo represents the label-related information for a resource.

type LabelableResource

type LabelableResource interface {
	GetLabels() map[string]string
	SetLabels(labels map[string]string)
}

LabelableResource is an interface for resources that support labels.

type Location

type Location struct {
	Display   string  `mapstructure:"display" json:"display"`
	Latitude  float64 `mapstructure:"latitude" json:"latitude"`
	Longitude float64 `mapstructure:"longitude" json:"longitude"`
}

Location is structure for location information

type McNetConfigurationDetails added in v0.9.18

type McNetConfigurationDetails struct {
	Csp     string          `json:"csp"`
	Regions []RegionDetails `json:"regions"`
}

type McNlbInfo

type McNlbInfo struct {
	MciAccessInfo *MciAccessInfo  `json:"mciAccessInfo"`
	McNlbHostInfo *TbMciInfo      `json:"mcNlbHostInfo"`
	DeploymentLog MciSshCmdResult `json:"deploymentLog"`
}

McNlbInfo is a struct for response of CreateMcSwNlb

type MciAccessInfo

type MciAccessInfo struct {
	MciId                 string
	MciNlbListener        *MciAccessInfo `json:"mciNlbListener,omitempty"`
	MciSubGroupAccessInfo []MciSubGroupAccessInfo
}

MciAccessInfo is struct to retrieve overall access information of a MCI

type MciCmdReq

type MciCmdReq struct {
	UserName string   `json:"userName" example:"cb-user" default:""`
	Command  []string `` /* 128-byte string literal not displayed */
}

MciCmdReq is struct for remote command

type MciConnectionConfigCandidatesReq

type MciConnectionConfigCandidatesReq struct {
	// CommonSpec is field for id of a spec in common namespace
	CommonSpecs []string `json:"commonSpec" validate:"required" example:"aws+ap-northeast-2+t2.small,gcp+us-west1+g1-small"`
}

MciConnectionConfigCandidatesReq is struct for a request to check requirements to create a new MCI instance dynamically (with default resource option)

type MciPolicyInfo

type MciPolicyInfo struct {
	Name   string   `json:"Name"` //MCI Name (for request)
	Id     string   `json:"Id"`   //MCI Id (generated ID by the Name)
	Policy []Policy `json:"policy"`

	ActionLog   string `json:"actionLog"`
	Description string `json:"description" example:"Description"`
}

MciPolicyInfo is struct for MCI auto-control Policy object.

type MciPolicyReq

type MciPolicyReq struct {
	Policy      []Policy `json:"policy"`
	Description string   `json:"description" example:"Description"`
}

MciPolicyReq is struct for MCI auto-control Policy Request.

type MciRecommendReq

type MciRecommendReq struct {
	VmReq          []TbVmRecommendReq `json:"vmReq"`
	PlacementAlgo  string             `json:"placementAlgo"`
	PlacementParam []KeyValue         `json:"placementParam"`
	MaxResultNum   string             `json:"maxResultNum"`
}

MciRecommendReq is struct for MciRecommendReq

type MciSshCmdResult

type MciSshCmdResult struct {
	Results []SshCmdResult `json:"results"`
}

MciSshCmdResult is struct for Set of SshCmd Results in terms of MCI

type MciStatusInfo

type MciStatusInfo struct {
	Id   string `json:"id"`
	Name string `json:"name"`

	Status       string          `json:"status"`
	StatusCount  StatusCountInfo `json:"statusCount"`
	TargetStatus string          `json:"targetStatus"`
	TargetAction string          `json:"targetAction"`

	// InstallMonAgent Option for CB-Dragonfly agent installation ([yes/no] default:yes)
	InstallMonAgent string `json:"installMonAgent" example:"[yes, no]"` // yes or no

	MasterVmId    string `json:"masterVmId" example:"vm-asiaeast1-cb-01"`
	MasterIp      string `json:"masterIp" example:"32.201.134.113"`
	MasterSSHPort string `json:"masterSSHPort"`

	// Label is for describing the object by keywords
	Label map[string]string `json:"label"`

	// SystemLabel is for describing the mci in a keyword (any string can be used) for special System purpose
	SystemLabel string `json:"systemLabel" example:"Managed by CB-Tumblebug" default:""`

	Vm []TbVmStatusInfo `json:"vm"`
}

MciStatusInfo is struct to define simple information of MCI with updated status of all VMs

type MciSubGroupAccessInfo

type MciSubGroupAccessInfo struct {
	SubGroupId      string
	NlbListener     *TbNLBListenerInfo `json:"nlbListener,omitempty"`
	BastionVmId     string
	MciVmAccessInfo []MciVmAccessInfo
}

MciSubGroupAccessInfo is struct for MciSubGroupAccessInfo

type MciVmAccessInfo

type MciVmAccessInfo struct {
	VmId             string     `json:"vmId"`
	PublicIP         string     `json:"publicIP"`
	PrivateIP        string     `json:"privateIP"`
	SSHPort          string     `json:"sshPort"`
	PrivateKey       string     `json:"privateKey,omitempty"`
	VmUserName       string     `json:"vmUserName,omitempty"`
	VmUserPassword   string     `json:"vmUserPassword,omitempty"`
	ConnectionConfig ConnConfig `json:"connectionConfig"`
}

MciVmAccessInfo is struct for MciVmAccessInfo

type MonAgentInstallReq

type MonAgentInstallReq struct {
	NsId     string `json:"nsId,omitempty"`
	MciId    string `json:"mciId,omitempty"`
	VmId     string `json:"vmId,omitempty"`
	PublicIp string `json:"publicIp,omitempty"`
	Port     string `json:"port,omitempty"`
	UserName string `json:"userName,omitempty"`
	SshKey   string `json:"sshKey,omitempty"`
	CspType  string `json:"cspType,omitempty"`
}

MonAgentInstallReq struct

type MonResultSimple

type MonResultSimple struct {
	Metric string `json:"metric"`
	VmId   string `json:"vmId"`
	Value  string `json:"value"`
	Err    string `json:"err"`
}

MonResultSimple struct is for containing vm monitoring results

type MonResultSimpleResponse

type MonResultSimpleResponse struct {
	NsId          string            `json:"nsId"`
	MciId         string            `json:"mciId"`
	MciMonitoring []MonResultSimple `json:"mciMonitoring"`
}

MonResultSimpleResponse struct is for containing Mci monitoring results

type MultihostBenchmarkReq

type MultihostBenchmarkReq struct {
	Multihost []BenchmarkReq `json:"multihost"`
}

MultihostBenchmarkReq is struct for MultihostBenchmarkReq

type NLBListenerReq

type NLBListenerReq struct {
	Protocol string `json:"protocol" example:"TCP"` // TCP|UDP
	Port     string `json:"port" example:"80"`      // 1-65535
}

NLBListenerReq is a struct to handle NLB Listener information of the CB-Spider's & CB-Tumblebug's REST API request

type NlbSetting

type NlbSetting struct {
	Enable    string `yaml:"enable"`
	Interval  string `yaml:"interval"`
	Timeout   string `yaml:"timeout"`
	Threshold string `yaml:"threshold"`
}

NlbSetting is structure for NLB setting

type Nlbsw

type Nlbsw struct {
	Sw                      string `yaml:"sw"`
	Version                 string `yaml:"version"`
	CommandNlbPrepare       string `yaml:"commandNlbPrepare"`
	CommandNlbDeploy        string `yaml:"commandNlbDeploy"`
	CommandNlbAddTargetNode string `yaml:"commandNlbAddTargetNode"`
	CommandNlbApplyConfig   string `yaml:"commandNlbApplyConfig"`
	NlbMciCommonSpec        string `yaml:"nlbMciCommonSpec"`
	NlbMciCommonImage       string `yaml:"nlbMciCommonImage"`
	NlbMciSubGroupSize      string `yaml:"nlbMciSubGroupSize"`
}

Nlbsw is structure for NLB setting

type NsInfo

type NsInfo struct {
	// ResourceType is the type of the resource
	ResourceType string `json:"resourceType"`

	// Id is unique identifier for the object
	Id string `json:"id" example:"default"`
	// Uid is universally unique identifier for the object, used for labelSelector
	Uid string `json:"uid,omitempty" example:"wef12awefadf1221edcf"`

	// Name is human-readable string to represent the object
	Name string `json:"name" example:"default"`

	Description string `json:"description" example:"Description for this namespace"`
}

swagger:response NsInfo

type NsReq

type NsReq struct {
	Name        string `json:"name" example:"default"`
	Description string `json:"description" example:"Description for this namespace"`
}

type OSArchitecture added in v0.10.7

type OSArchitecture string
const (
	ARM32               OSArchitecture = "arm32"
	ARM64               OSArchitecture = "arm64"
	ARM64_MAC           OSArchitecture = "arm64_mac"
	X86_32              OSArchitecture = "x86_32"
	X86_64              OSArchitecture = "x86_64"
	X86_32_MAC          OSArchitecture = "x86_32_mac"
	X86_64_MAC          OSArchitecture = "x86_64_mac"
	S390X               OSArchitecture = "s390x"
	ArchitectureNA      OSArchitecture = "NA"
	ArchitectureUnknown OSArchitecture = ""
)

type OSPlatform added in v0.10.7

type OSPlatform string
const (
	Linux_UNIX OSPlatform = "Linux/UNIX"
	Windows    OSPlatform = "Windows"
	PlatformNA OSPlatform = "NA"
)

type OSTypeDetail added in v0.10.7

type OSTypeDetail struct {
	Name           string   `mapstructure:"name" json:"name"`
	Versions       []string `mapstructure:"versions" json:"versions"`
	DefaultVersion string   `mapstructure:"defaultVersion" json:"default_version"`
	Patterns       []string `mapstructure:"patterns" json:"patterns"`
}

OSTypeDetail is structure for OS type detail information

type ObjectStorageInfo added in v0.10.2

type ObjectStorageInfo struct {
	// ResourceType is the type of the resource
	ResourceType     string     `json:"resourceType"`
	ConnectionName   string     `json:"connectionName"`
	ConnectionConfig ConnConfig `json:"connectionConfig"`
	// Id is unique identifier for the object
	Id string `json:"id" example:"sqldb01"`
	// Uid is universally unique identifier for the object, used for labelSelector
	Uid string `json:"uid,omitempty" example:"wef12awefadf1221edcf"`
	// Name is human-readable string to represent the object
	Name string `json:"name" example:"sqldb01"`
	// CspResourceName is name assigned to the CSP resource. This name is internally used to handle the resource.
	CspResourceName string `json:"cspResourceName,omitempty" example:"we12fawefadf1221edcf"`
	// CspResourceId is resource identifier managed by CSP
	CspResourceId string      `json:"cspResourceId,omitempty" example:"csp-06eb41e14121c550a"`
	Status        string      `json:"status"`
	Description   string      `json:"description"`
	Details       interface{} `json:"details"`
}

type Operation

type Operation struct {
	Operator string `json:"operator" example:"<=" enums:">=,<=,=="` // >=, <=, ==
	Operand  string `json:"operand" example:"4" enums:"4,8,.."`     // 10, 70, 80, 98, ...
}

Operation is struct for .

type OptionalParameter

type OptionalParameter struct {
	Value string
	Set   bool
}

OptionalParameter is struct for optional parameter for function (ex. VmId)

type ParameterKeyVal

type ParameterKeyVal struct {
	Key string   `json:"key" example:"coordinateClose" enums:"coordinateClose,coordinateWithin,coordinateFair"` // coordinate
	Val []string `json:"val" example:"44.146838/-116.411403"`                                                   // ["Latitude,Longitude","12,543",..,"31,433"]
}

Operation is struct for .

type Policy

type Policy struct {
	AutoCondition AutoCondition `json:"autoCondition"`
	AutoAction    AutoAction    `json:"autoAction"`
	Status        string        `json:"status"`
}

Policy is struct for MCI auto-control Policy request that includes AutoCondition, AutoAction, Status.

type PrefixLengthDetail added in v0.10.7

type PrefixLengthDetail struct {
	Min         int    `mapstructure:"min" json:"min,omitempty"`
	Max         int    `mapstructure:"max" json:"max,omitempty"`
	Description string `mapstructure:"description" json:"description"`
}

PrefixLengthDetail is structure for prefix length configuration

type PriorityCondition

type PriorityCondition struct {
	Metric    string            `json:"metric" example:"location" enums:"location,cost,random,performance,latency"`
	Weight    string            `json:"weight" example:"0.3" enums:"0.1,0.2,..."`
	Parameter []ParameterKeyVal `json:"parameter,omitempty"`
}

FilterCondition is struct for .

type PriorityInfo

type PriorityInfo struct {
	Policy []PriorityCondition `json:"policy"`
}

PriorityInfo is struct for .

type PublicKeyResponse

type PublicKeyResponse struct {
	PublicKeyTokenId string `json:"publicKeyTokenId"`
	PublicKey        string `json:"publicKey"`
}

PublicKeyResponse is struct for containing the public key response

type Range

type Range struct {
	Min float32 `json:"min"`
	Max float32 `json:"max"`
}

Range struct is for 'FilterSpecsByRange'

type RegionDetail

type RegionDetail struct {
	RegionId    string   `mapstructure:"id" json:"regionId"`
	RegionName  string   `mapstructure:"regionName" json:"regionName"`
	Description string   `mapstructure:"description" json:"description"`
	Location    Location `mapstructure:"location" json:"location"`
	Zones       []string `mapstructure:"zone" json:"zones"`
}

RegionDetail is structure for region information

type RegionDetails added in v0.9.18

type RegionDetails struct {
	Name  string        `json:"name"`
	VNets []VNetDetails `json:"vNets"`
}

type RegionInfo

type RegionInfo struct {
	Region string
	Zone   string
}

RegionInfo is struct for region information

type RegionList

type RegionList struct {
	Regions []RegionDetail `mapstructure:"regions" json:"regions"`
}

RegionList is structure for region list

type RegionZoneInfo

type RegionZoneInfo struct {
	AssignedRegion string `json:"assignedRegion"`
	AssignedZone   string `json:"assignedZone"`
}

RegionZoneInfo is struct for containing region struct

type RegisterResourceAllResult

type RegisterResourceAllResult struct {
	ElapsedTime           int                      `json:"elapsedTime"`
	RegisteredConnection  int                      `json:"registeredConnection"`
	AvailableConnection   int                      `json:"availableConnection"`
	RegisterationOverview RegisterationOverview    `json:"registerationOverview"`
	RegisterationResult   []RegisterResourceResult `json:"registerationResult"`
}

RegisterResourceAllResult is struct for Register Resource Result for All Clouds

type RegisterResourceResult

type RegisterResourceResult struct {
	ConnectionName        string                `json:"connectionName"`
	SystemMessage         string                `json:"systemMessage"`
	ElapsedTime           int                   `json:"elapsedTime"`
	RegisterationOverview RegisterationOverview `json:"registerationOverview"`
	RegisterationOutputs  IdList                `json:"registerationOutputs"`
}

RegisterResourceResult is struct for Register Resource Result

type RegisterationOverview

type RegisterationOverview struct {
	VNet          int `json:"vNet"`
	SecurityGroup int `json:"securityGroup"`
	SshKey        int `json:"sshKey"`
	DataDisk      int `json:"dataDisk"`
	CustomImage   int `json:"customImage"`
	Vm            int `json:"vm"`
	NLB           int `json:"nlb"`
	Failed        int `json:"failed"`
}

RegisterResource is struct for Register Resource

type RequiredAWSResourceForSqlDB added in v0.10.2

type RequiredAWSResourceForSqlDB struct {
	VNetID    string `json:"vNetID,omitempty" example:"vpc-xxxxx"`
	Subnet1ID string `json:"subnet1ID,omitempty" example:"subnet-xxxx"`
	Subnet2ID string `json:"subnet2ID,omitempty" example:"subnet-xxxx in different AZ"`
}

type RequiredAzureResourceForObjectStorage added in v0.10.2

type RequiredAzureResourceForObjectStorage struct {
	ResourceGroup string `json:"resourceGroup,omitempty" example:"koreacentral"`
}

type RequiredAzureResourceForSqlDB added in v0.10.2

type RequiredAzureResourceForSqlDB struct {
	ResourceGroup string `json:"resourceGroup,omitempty" example:"koreacentral"`
}

type RequiredCSPResourceForObjectStorage added in v0.10.2

type RequiredCSPResourceForObjectStorage struct {
	// AWS   RequiredAWSResourceForObjectStorage   `json:"aws,omitempty"`
	Azure RequiredAzureResourceForObjectStorage `json:"azure,omitempty"`
}

type RequiredCSPResourceForSqlDB added in v0.10.2

type RequiredCSPResourceForSqlDB struct {
	AWS   RequiredAWSResourceForSqlDB   `json:"aws,omitempty"`
	Azure RequiredAzureResourceForSqlDB `json:"azure,omitempty"`
	NCP   RequiredNCPResourceForSqlDB   `json:"ncp,omitempty"`
}

type RequiredNCPResourceForSqlDB added in v0.10.2

type RequiredNCPResourceForSqlDB struct {
	SubnetID string `json:"subnetID,omitempty" example:"123456"`
}

type ReservedIPsDetail added in v0.10.7

type ReservedIPsDetail struct {
	Value       int    `mapstructure:"value" json:"value"`
	Description string `mapstructure:"description" json:"description"`
}

ReservedIPsDetail is structure for reserved IPs configuration

type ResourceCountOverview

type ResourceCountOverview struct {
	OnTumblebug int `json:"onTumblebug"`
	OnSpider    int `json:"onSpider"`
	OnCspTotal  int `json:"onCspTotal"`
	OnCspOnly   int `json:"onCspOnly"`
}

ResourceCountOverview is struct for Resource Count Overview

type ResourceDetail added in v0.10.7

type ResourceDetail struct {
	// CspResourceName is name assigned to the CSP resource. This name is internally used to handle the resource.
	CspResourceName string `json:"cspResourceName" default:"" example:"we12fawefadf1221edcf"`
	// CspResourceId is resource identifier managed by CSP
	CspResourceId string `json:"cspResourceId" default:"" example:"csp-06eb41e14121c550a"`
	// CspResourceDetail is the detailed information of the resource provided from the terrarium.
	CspResourceDetail any `json:"cspResourceDetail"`

	Status string `json:"status,omitempty"`
}

type ResourceIds added in v0.9.10

type ResourceIds struct {
	CspResourceId   string
	CspResourceName string
	ConnectionName  string
}

ResourceIds is struct for containing id and name of each Resource type

type ResourceOnCsp

type ResourceOnCsp struct {
	Count int                 `json:"count"`
	Info  []ResourceOnCspInfo `json:"info"`
}

ResourceOnCsp is struct for Resource on CSP

type ResourceOnCspInfo

type ResourceOnCspInfo struct {
	CspResourceId string `json:"cspResourceId"`
	RefNameOrId   string `json:"refNameOrId"`
}

ResourceOnCspInfo is struct for Resource on CSP Info

type ResourceOnSpider

type ResourceOnSpider struct {
	Count int                    `json:"count"`
	Info  []ResourceOnSpiderInfo `json:"info"`
}

ResourceOnSpider is struct for Resource on Spider

type ResourceOnSpiderInfo

type ResourceOnSpiderInfo struct {
	IdBySp        string `json:"idBySp"`
	CspResourceId string `json:"cspResourceId"`
}

ResourceOnSpiderInfo is struct for Resource on Spider Info

type ResourceOnTumblebug

type ResourceOnTumblebug struct {
	Count int                       `json:"count"`
	Info  []ResourceOnTumblebugInfo `json:"info"`
}

ResourceOnTumblebug is struct for Resource on Tumblebug

type ResourceOnTumblebugInfo

type ResourceOnTumblebugInfo struct {
	IdByTb        string `json:"idByTb"`
	CspResourceId string `json:"cspResourceId"`
	NsId          string `json:"nsId"`
	MciId         string `json:"mciId,omitempty"`
	ObjectKey     string `json:"objectKey"`
}

ResourceOnTumblebugInfo is struct for Resource on Tumblebug Info

type ResourceStatusInfo added in v0.9.19

type ResourceStatusInfo struct {
	Status       string `json:"status"`
	TargetStatus string `json:"targetStatus"`
	TargetAction string `json:"targetAction"`
}

ResourceStatusInfo is struct for status information of a resource

type ResourcesByManageType

type ResourcesByManageType struct {
	OnTumblebug ResourceOnTumblebug `json:"onTumblebug"`
	OnSpider    ResourceOnSpider    `json:"onSpider"`
	OnCspTotal  ResourceOnCsp       `json:"onCspTotal"`
	OnCspOnly   ResourceOnCsp       `json:"onCspOnly"`
}

ResourcesByManageType is struct for Resources by Manage Type

type Response added in v0.9.22

type Response struct {
	Success bool                   `json:"success" example:"true"`
	Status  int                    `json:"status,omitempty" example:"200"`
	Message string                 `json:"message" example:"Any message"`
	Detail  string                 `json:"details,omitempty" example:"Any details"`
	Object  map[string]interface{} `json:"object,omitempty"`
	List    []interface{}          `json:"list,omitempty"`
}

type RestPostObjectStorageRequest added in v0.10.2

type RestPostObjectStorageRequest struct {
	Name                string                              `json:"name" validate:"required" example:"objectstorage01"`
	ConnectionName      string                              `json:"connectionName" validate:"required" example:"aws-ap-northeast-2"`
	CSP                 string                              `json:"csp" validate:"required" example:"aws"`
	Region              string                              `json:"region" validate:"required" example:"ap-northeast-2"`
	RequiredCSPResource RequiredCSPResourceForObjectStorage `json:"requiredCSPResource,omitempty"`
}

type RestPostSqlDBRequest added in v0.10.2

type RestPostSqlDBRequest struct {
	Name                string                      `json:"name" validate:"required" example:"sqldb01"`
	ConnectionName      string                      `json:"connectionName" validate:"required" example:"aws-ap-northeast-2"`
	CSP                 string                      `json:"csp" validate:"required" example:"aws"`
	Region              string                      `json:"region" validate:"required" example:"ap-northeast-2"`
	DBInstanceSpec      string                      `json:"dbInstanceSpec,omitempty" validate:"required" example:"db.t3.micro"`
	DBEnginePort        int                         `json:"dbEnginePort,omitempty" validate:"required" example:"3306"`
	DBEngineVersion     string                      `json:"dbEngineVersion,omitempty" validate:"required" example:"8.0.39"`
	DBAdminUsername     string                      `json:"dbAdminUsername" validate:"required" example:"mydbadmin"`
	DBAdminPassword     string                      `json:"dbAdminPassword" validate:"required" example:"Password1234!"`
	RequiredCSPResource RequiredCSPResourceForSqlDB `json:"requiredCSPResource,omitempty"`
}

type RestPostVpnRequest added in v0.9.22

type RestPostVpnRequest struct {
	Name  string       `json:"name" validate:"required" example:"vpn01"`
	Site1 SiteProperty `json:"site1" validate:"required"`
	Site2 SiteProperty `json:"site2" validate:"required"`
}

type RetrievedRegionList added in v0.9.10

type RetrievedRegionList struct {
	Region []SpiderRegionZoneInfo `json:"region"`
}

RetrievedRegionList is array struct for Region

type RuntimeConfig

type RuntimeConfig struct {
	Cloud Cloud `yaml:"cloud"`
	Nlbsw Nlbsw `yaml:"nlbsw"`
}

RuntimeConfig is structure for global variable for cloud config

type SearchImageRequest added in v0.10.7

type SearchImageRequest struct {

	// Cloud Service Provider (ex: "aws", "azure", "gcp", etc.). Use GET /provider to get the list of available providers.
	ProviderName string `json:"providerName" example:"aws"`

	// Cloud Service Provider Region (ex: "us-east-1", "us-west-2", etc.). Use GET /provider/{providerName}/region to get the list of available regions.
	RegionName string `json:"regionName" example:"us-east-1"`

	// Simplified OS name and version string. Space-separated for AND condition (ex: "ubuntu 22.04", "windows 10", etc.).
	OSType string `json:"osType" example:"ubuntu 22.04" description:"Simplified OS name and version string. Space-separated for AND condition"`

	// The architecture of the operating system of the image. (ex: "x86_64", "arm64", etc.)
	OSArchitecture OSArchitecture `` /* 137-byte string literal not displayed */

	// Whether the image is ready for GPU usage or not.
	// In usual, true means the image is ready for GPU usage with GPU drivers and libraries installed.
	// If not specified, both true and false images will be included in the search results.
	// Even if the image is not ready for GPU usage, it can be used with GPU by installing GPU drivers and libraries manually.
	IsGPUImage *bool `json:"isGPUImage" example:"false"`

	// Whether the image is specialized image only for Kubernetes nodes.
	// If not specified, both true and false images will be included in the search results.
	// Images that are not specialized for Kubernetes also can be used as Kubernetes nodes. It depends on CSPs.
	IsKubernetesImage *bool `json:"isKubernetesImage" example:"false"`

	// Whether the image is registered by CB-Tumblebug asset file or not.
	IsRegisteredByAsset *bool `json:"isRegisteredByAsset" example:"false" description:"Whether the image is registered by asset or not."`

	// Whether the search results should include deprecated images or not.
	// If not specified, deprecated images will not be included in the search results.
	// In usual, deprecated images are not recommended to use, but they can be used if necessary.
	IncludeDeprecatedImage *bool `json:"includeDeprecatedImage" example:"false" description:"Include deprecated images in the search results."`

	// Keywords for searching images in detail.
	// Space-separated for AND condition (ex: "sql 2022", "ubuntu 22.04", etc.).
	// Used for if the user wants to search images with specific keywords in their details.
	DetailSearchKeys []string `json:"detailSearchKeys" example:"tensorflow,2.17" description:"Keywords for searching images in detail"`
}

SearchImageRequest is struct for Search Image Request

type SearchImageRequestOptions added in v0.10.7

type SearchImageRequestOptions struct {

	// Cloud Service Provider (ex: "aws", "azure", "gcp", etc.). Use GET /provider to get the list of available providers.
	ProviderName []string `json:"providerName"`

	// Cloud Service Provider Region (ex: "us-east-1", "us-west-2", etc.). Use GET /provider/{providerName}/region to get the list of available regions.
	RegionName []string `json:"regionName"`

	// Simplified OS name and version string. Space-separated for AND condition (ex: "ubuntu 22.04", "windows 10", etc.).
	OSType []string `json:"osType" description:"Simplified OS name and version string. Space-separated for AND condition"`

	// The architecture of the operating system of the image. (ex: "x86_64", "arm64", etc.)
	OSArchitecture []string `json:"osArchitecture" description:"The architecture of the operating system of the image."`

	// Whether the image is ready for GPU usage or not.
	// In usual, true means the image is ready for GPU usage with GPU drivers and libraries installed.
	// If not specified, both true and false images will be included in the search results.
	// Even if the image is not ready for GPU usage, it can be used with GPU by installing GPU drivers and libraries manually.
	IsGPUImage []bool `json:"isGPUImage" description:"Whether the image is ready for GPU usage or not."`

	// Whether the image is specialized image only for Kubernetes nodes.
	// If not specified, both true and false images will be included in the search results.
	// Images that are not specialized for Kubernetes also can be used as Kubernetes nodes. It depends on CSPs.
	IsKubernetesImage []bool `json:"isKubernetesImage" description:"Whether the image is specialized image only for Kubernetes nodes."`

	// Whether the image is registered by CB-Tumblebug asset file or not.
	IsRegisteredByAsset []bool `json:"isRegisteredByAsset" description:"Whether the image is registered by asset or not."`

	// Whether the search results should include deprecated images or not.
	// If not specified, deprecated images will not be included in the search results.
	// In usual, deprecated images are not recommended to use, but they can be used if necessary.
	IncludeDeprecatedImage []bool `json:"includeDeprecatedImage" description:"Include deprecated images in the search results."`

	// Keywords for searching images in detail.
	// Space-separated for AND condition (ex: "sql 2022", "ubuntu 22.04", etc.).
	// Used for if the user wants to search images with specific keywords in their details.
	DetailSearchKeys [][]string `json:"detailSearchKeys" description:"Keywords for searching images in detail"`
}

SearchImageRequestOptions is struct for Search Image Request

type SearchImageResponse added in v0.10.7

type SearchImageResponse struct {
	ImageCount int           `json:"imageCount"`
	ImageList  []TbImageInfo `json:"imageList"`
}

SearchImageResponse is struct for Search Image Request

type SimpleMsg

type SimpleMsg struct {
	Message string `json:"message" example:"Any message"`
}

SimpleMsg is struct for JSON Simple message

type SiteDetail added in v0.9.22

type SiteDetail struct {
	CSP            string `json:"csp" example:"aws"`
	Region         string `json:"region" example:"ap-northeast-2"`
	ConnectionName string `json:"connectionName" example:"aws-ap-northeast-2"`
	// Zone              string `json:"zone,omitempty" example:"ap-northeast-2a"`
	VNetId string `json:"vnet" example:"vpc-xxxxx"`
	// SubnetId          string `json:"subnet,omitempty" example:"subnet-xxxxx"`
	GatewaySubnetCidr string `json:"gatewaySubnetCidr,omitempty" example:"xxx.xxx.xxx.xxx/xx"`
	ResourceGroup     string `json:"resourceGroup,omitempty" example:"rg-xxxxx"`
}

SiteDetail struct represents the structure for detailed site information

type SiteProperty added in v0.10.7

type SiteProperty struct {
	VNetId              string              `json:"vNetId" example:"vnet01"`
	CspSpecificProperty CspSpecificProperty `json:"cspSpecificProperty,omitempty"`
}

type SitesInfo added in v0.9.22

type SitesInfo struct {
	NsId  string `json:"nsId" example:"ns-01"`
	MciId string `json:"mciId" example:"mci-01"`
	Count int    `json:"count" example:"3"`
	Sites sites  `json:"sites"`
}

SitesInfo struct represents the overall site information including namespace and MCI ID

func NewSiteInfo added in v0.9.22

func NewSiteInfo(nsId, mciId string) *SitesInfo

type SpecBenchmarkInfo

type SpecBenchmarkInfo struct {
	SpecId     string `json:"specid"`
	Cpus       string `json:"cpus"`
	Cpum       string `json:"cpum"`
	MemR       string `json:"memR"`
	MemW       string `json:"memW"`
	FioR       string `json:"fioR"`
	FioW       string `json:"fioW"`
	DbR        string `json:"dbR"`
	DbW        string `json:"dbW"`
	Rtt        string `json:"rtt"`
	EvaledTime string `json:"evaledTime"`
}

SpecBenchmarkInfo is struct for SpecBenchmarkInfo

type SpecFetchOption added in v0.11.0

type SpecFetchOption struct {
	// providers need to be excluded from the spec fetching operation (ex: ["azure"])
	ExcludedProviders []string `json:"excludedProviders,omitempty" example:"azure" description:"Providers to be excluded from the spec fetching operation."`

	// providers that are not region-specific (ex: ["gcp"])
	RegionAgnosticProviders []string `json:"regionAgnosticProviders,omitempty" example:"gcp,tencent" description:"Providers that are not region-specific."`
}

SpecFetchOption is struct for Spec Fetch Options

type SpiderAccessInfo

type SpiderAccessInfo struct {
	Endpoint   string // ex) https://1.2.3.4:6443
	Kubeconfig string
}

SpiderAccessInfo is a struct to handle Cluster Access information from the CB-Spider's REST API response

type SpiderAddonsInfo

type SpiderAddonsInfo struct {
	KeyValueList []KeyValue
}

SpiderAddonsInfo is a struct to handle Cluster Addons information from the CB-Spider's REST API response

type SpiderAllList

type SpiderAllList struct {
	MappedList     []SpiderNameIdSystemId
	OnlySpiderList []SpiderNameIdSystemId
	OnlyCSPList    []SpiderNameIdSystemId
}

type SpiderAllListWrapper

type SpiderAllListWrapper struct {
	AllList SpiderAllList
}

type SpiderChangeAutoscaleSizeReq

type SpiderChangeAutoscaleSizeReq struct {
	ConnectionName string
	ReqInfo        SpiderChangeAutoscaleSizeReqInfo
}

SpiderChangeAutoscaleSizeReq is a wrapper struct to create JSON body of 'Change Autoscale Size' request.

type SpiderChangeAutoscaleSizeReqInfo

type SpiderChangeAutoscaleSizeReqInfo struct {
	DesiredNodeSize string
	MinNodeSize     string
	MaxNodeSize     string
}

SpiderChangeAutoscaleSizeReqInfo is a wrapper struct to create JSON body of 'Change Autoscale Size' request.

type SpiderChangeAutoscaleSizeRes

type SpiderChangeAutoscaleSizeRes struct {
	SpiderNodeGroupInfo
}

SpiderChangeAutoscaleSizeRes is a wrapper struct to get JSON body of 'Change Autoscale Size' response

type SpiderCloudPrice added in v0.10.7

type SpiderCloudPrice struct {
	PriceList []SpiderPrice `json:"PriceList" validate:"required" description:"List of prices"` // List of prices for different services/products
}

SpiderCloudPrice represents the pricing information for a specific cloud provider.

type SpiderClusterInfo

type SpiderClusterInfo struct {
	IId IID // {NameId, SystemId}

	Version string // Kubernetes Version, ex) 1.23.3
	Network SpiderNetworkInfo

	NodeGroupList []SpiderNodeGroupInfo
	AccessInfo    SpiderAccessInfo
	Addons        SpiderAddonsInfo

	Status SpiderClusterStatus

	CreatedTime  time.Time
	KeyValueList []KeyValue
}

SpiderClusterInfo is a struct to handle Cluster information from the CB-Spider's REST API response

type SpiderClusterReq

type SpiderClusterReq struct {
	ConnectionName string
	ReqInfo        SpiderClusterReqInfo
}

SpiderClusterReq is a wrapper struct to create JSON body of 'Create Cluster request'

type SpiderClusterReqInfo

type SpiderClusterReqInfo struct {
	// (1) Cluster Info
	Name    string
	Version string

	// (2) Network Info
	VPCName            string
	SubnetNames        []string
	SecurityGroupNames []string

	// (3) NodeGroupInfo List
	NodeGroupList []SpiderNodeGroupReqInfo
}

SpiderClusterReqInfo is a struct to create JSON body of 'Create Cluster request'

type SpiderClusterRes

type SpiderClusterRes struct {
	SpiderClusterInfo
}

SpiderClusterRes is a wrapper struct to handle a Cluster information from the CB-Spider's REST API response

type SpiderClusterStatus

type SpiderClusterStatus string
const (
	SpiderClusterCreating SpiderClusterStatus = "Creating"
	SpiderClusterActive   SpiderClusterStatus = "Active"
	SpiderClusterInactive SpiderClusterStatus = "Inactive"
	SpiderClusterUpdating SpiderClusterStatus = "Updating"
	SpiderClusterDeleting SpiderClusterStatus = "Deleting"
)

type SpiderConnConfig

type SpiderConnConfig struct {
	ConfigName     string
	ProviderName   string
	DriverName     string
	CredentialName string
	RegionName     string
}

SpiderConnConfig is struct for containing a CB-Spider struct for connection config

type SpiderConnectionName

type SpiderConnectionName struct {
	ConnectionName string `json:"ConnectionName"`
}

type SpiderDiskAttachDetachReq

type SpiderDiskAttachDetachReq struct {
	VMName string
}

SpiderDiskAttachDetachReq is a struct to create JSON body of 'Attach/Detach disk request'

type SpiderDiskAttachDetachReqWrapper

type SpiderDiskAttachDetachReqWrapper struct {
	ConnectionName string
	ReqInfo        SpiderDiskAttachDetachReq
}

SpiderDiskAttachDetachReqWrapper is a wrapper struct to create JSON body of 'Attach/Detach disk request'

type SpiderDiskInfo

type SpiderDiskInfo struct {
	// Fields for request
	Name  string
	CSPid string

	// Fields for both request and response
	DiskType string // "", "SSD(gp2)", "Premium SSD", ...
	DiskSize string // "", "default", "50", "1000"  # (GB)

	// Fields for response
	IId IID // {NameId, SystemId}

	Status  DiskStatus // DiskCreating | DiskAvailable | DiskAttached | DiskDeleting | DiskError
	OwnerVM IID        // When the Status is DiskAttached

	CreatedTime  time.Time
	KeyValueList []KeyValue
}

SpiderDiskInfo is a struct to create JSON body of 'Get disk request'

type SpiderDiskReqInfoWrapper

type SpiderDiskReqInfoWrapper struct {
	ConnectionName string
	ReqInfo        SpiderDiskInfo
}

SpiderDiskReqInfoWrapper is a wrapper struct to create JSON body of 'Get disk request'

type SpiderDiskUpsizeReq

type SpiderDiskUpsizeReq struct {
	Size string // "", "default", "50", "1000"  # (GB)
}

SpiderDiskUpsizeReq is a struct to create JSON body of 'Upsize disk request'

type SpiderDiskUpsizeReqWrapper

type SpiderDiskUpsizeReqWrapper struct {
	ConnectionName string
	ReqInfo        SpiderDiskUpsizeReq
}

SpiderDiskUpsizeReqWrapper is a wrapper struct to create JSON body of 'Upsize disk request'

type SpiderGpuInfo

type SpiderGpuInfo struct {
	Count          string `json:"Count" validate:"required" example:"2"`                      // Number of GPUs, "-1" when not applicable
	Mfr            string `json:"Mfr,omitempty" validate:"omitempty" example:"NVIDIA"`        // Manufacturer of the GPU, NA when not applicable
	Model          string `json:"Model,omitempty" validate:"omitempty" example:"Tesla K80"`   // Model of the GPU, NA when not applicable
	MemSizeGB      string `json:"MemSizeGB,omitempty" validate:"omitempty" example:"12"`      // Memory size of the GPU in GB, "-1" when not applicable
	TotalMemSizeGB string `json:"TotalMemSizeGB,omitempty" validate:"omitempty" example:"24"` // Total Memory size of the GPU in GB, "-1" when not applicable
}

SpiderGpuInfo is a struct to handle GPU Info from CB-Spider.

type SpiderImageInfo

type SpiderImageInfo struct {
	IId IID `json:"IId" description:"The ID of the image."` // {NameId, SystemId}, {ami-00aa5a103ddf4509f, ami-00aa5a103ddf4509f}

	Name           string         `json:"Name" example:"ami-00aa5a103ddf4509f" description:"The name of the image."`                                   // ami-00aa5a103ddf4509f
	OSArchitecture OSArchitecture `json:"OSArchitecture" example:"x86_64" description:"The architecture of the operating system of the image."`        // arm64, x86_64 etc.
	OSPlatform     OSPlatform     `json:"OSPlatform" example:"Linux/UNIX" description:"The platform of the operating system of the image."`            // Linux/UNIX, Windows, NA
	OSDistribution string         `json:"OSDistribution" example:"Ubuntu 22.04~" description:"The distribution of the operating system of the image."` // Ubuntu 22.04~, CentOS 8 etc.
	OSDiskType     string         `json:"OSDiskType" example:"HDD" description:"The type of the OS disk of for the VM being created."`                 // ebs, HDD, etc.
	OSDiskSizeGB   string         `json:"OSDiskSizeGB" example:"50" description:"The (minimum) OS disk size in GB for the VM being created."`          // 10, 50, 100 etc.

	ImageStatus ImageStatus `json:"ImageStatus" example:"Available" description:"The status of the image, e.g., Available or Unavailable."` // Available, Unavailable

	KeyValueList []KeyValue `json:"KeyValueList,omitempty" validate:"omitempty" description:"A list of key-value pairs associated with the image."`
}

SpiderImageInfo represents the information of an Image.

type SpiderImageList

type SpiderImageList struct {
	Image []SpiderImageInfo `json:"image"`
}

SpiderImageList is struct for Spider Image List

type SpiderImageReqInfoWrapper

type SpiderImageReqInfoWrapper struct {
	ConnectionName string
	ReqInfo        SpiderImageInfo
}

SpiderImageReqInfoWrapper is a wrapper struct to create JSON body of 'Get image request'

type SpiderImageType

type SpiderImageType string
const (
	PublicImage SpiderImageType = "PublicImage"
	MyImage     SpiderImageType = "MyImage"
)

type SpiderKeyPairInfo

type SpiderKeyPairInfo struct {
	// Fields for request
	Name  string
	CSPId string

	// Fields for response
	IId          IID // {NameId, SystemId}
	Fingerprint  string
	PublicKey    string
	PrivateKey   string
	VMUserID     string
	KeyValueList []KeyValue
}

SpiderKeyPairInfo is a struct to create JSON body of 'Create keypair request'

type SpiderKeyPairReqInfoWrapper

type SpiderKeyPairReqInfoWrapper struct {
	ConnectionName string
	ReqInfo        SpiderKeyPairInfo
}

SpiderKeyPairReqInfoWrapper is a wrapper struct to create JSON body of 'Create keypair request'

type SpiderMeta added in v0.10.7

type SpiderMeta struct {
	Version     string `json:"Version" validate:"required" example:"1.0"`        // Version of the pricing data
	Description string `json:"Description,omitempty" example:"Cloud price data"` // Description of the pricing data
}

SpiderMeta contains metadata information about the price data.

type SpiderMyImageInfo

type SpiderMyImageInfo struct {
	IId IID // {NameId, SystemId}

	SourceVM IID

	Status CustomImageStatus // Available | Deleting

	CreatedTime  time.Time
	KeyValueList []KeyValue
}

type SpiderMyImageRegisterReq

type SpiderMyImageRegisterReq struct {
	ConnectionName string
	ReqInfo        struct {
		Name  string
		CSPId string // or, CSPid ?
	}
}

type SpiderMyImageReq

type SpiderMyImageReq struct {
	ConnectionName string
	ReqInfo        struct {
		Name     string
		SourceVM string
	}
}

type SpiderNLBAddRemoveVMReqInfoWrapper

type SpiderNLBAddRemoveVMReqInfoWrapper struct {
	ConnectionName string
	ReqInfo        SpiderNLBSubGroupReq
}

SpiderNLBAddRemoveVMReqInfoWrapper is a wrapper struct to create JSON body of 'Add/Remove VMs to/from NLB' request

type SpiderNLBHealthCheckerInfo

type SpiderNLBHealthCheckerInfo struct {
	Protocol  string `json:"protocol" example:"TCP"` // TCP|HTTP|HTTPS
	Port      string `json:"port" example:"22"`      // Listener Port or 1-65535
	Interval  int    `json:"interval" example:"10"`  // secs, Interval time between health checks.
	Timeout   int    `json:"timeout" example:"10"`   // secs, Waiting time to decide an unhealthy VM when no response.
	Threshold int    `json:"threshold" example:"3"`  // num, The number of continuous health checks to change the VM status.

	CspID        string     `json:"cspID"` // Optional, May be Used by Driver.
	KeyValueList []KeyValue `json:"keyValueList"`
}

type SpiderNLBHealthCheckerReq

type SpiderNLBHealthCheckerReq struct {
	Protocol  string `json:"protocol" example:"TCP"`      // TCP|HTTP|HTTPS
	Port      string `json:"port" example:"22"`           // Listener Port or 1-65535
	Interval  string `json:"interval" example:"default"`  // secs, Interval time between health checks.
	Timeout   string `json:"timeout" example:"default"`   // secs, Waiting time to decide an unhealthy VM when no response.
	Threshold string `json:"threshold" example:"default"` // num, The number of continuous health checks to change the VM status.
}

type SpiderNLBHealthInfo

type SpiderNLBHealthInfo struct {
	AllVMs       *[]IID
	HealthyVMs   *[]IID
	UnHealthyVMs *[]IID
}

type SpiderNLBHealthInfoWrapper

type SpiderNLBHealthInfoWrapper struct {
	Healthinfo SpiderNLBHealthInfo
}

type SpiderNLBInfo

type SpiderNLBInfo struct {
	IId    IID // {NameId, SystemId}
	VpcIID IID // {NameId, SystemId}

	Type  string // PUBLIC(V) | INTERNAL
	Scope string // REGION(V) | GLOBAL

	//------ Frontend
	Listener SpiderNLBListenerInfo

	//------ Backend
	VMGroup       SpiderNLBSubGroupInfo
	HealthChecker SpiderNLBHealthCheckerInfo

	CreatedTime  time.Time
	KeyValueList []KeyValue
}

SpiderNLBInfo is a struct to handle NLB information from the CB-Spider's REST API response

type SpiderNLBListenerInfo

type SpiderNLBListenerInfo struct {
	Protocol string `json:"protocol" example:"TCP"` // TCP|UDP
	IP       string `json:"ip" example:""`          // Auto Generated and attached
	Port     string `json:"port" example:"80"`      // 1-65535
	DNSName  string `json:"dnsName" example:""`     // Optional, Auto Generated and attached

	CspID        string     `json:"cspID"` // Optional, May be Used by Driver.
	KeyValueList []KeyValue `json:"keyValueList"`
}

SpiderNLBListenerInfo is a struct to handle NLB Listener information from the CB-Spider's REST API response

type SpiderNLBReqInfo

type SpiderNLBReqInfo struct {
	Name    string
	VPCName string
	Type    string // PUBLIC(V) | INTERNAL
	Scope   string // REGION(V) | GLOBAL

	Listener NLBListenerReq

	VMGroup       SpiderNLBSubGroupReq
	HealthChecker SpiderNLBHealthCheckerReq
}

SpiderNLBReqInfo is a struct to create JSON body of 'Create NLB request'

type SpiderNLBReqInfoWrapper

type SpiderNLBReqInfoWrapper struct {
	ConnectionName string
	ReqInfo        SpiderNLBReqInfo
}

SpiderNLBReqInfoWrapper is a wrapper struct to create JSON body of 'Create NLB request'

type SpiderNLBSubGroupInfo

type SpiderNLBSubGroupInfo struct {
	Protocol string // TCP|UDP|HTTP|HTTPS
	Port     string // 1-65535
	VMs      *[]IID

	CspID        string     `json:"cspID"` // Optional, May be Used by Driver.
	KeyValueList []KeyValue `json:"keyValueList"`
}

SpiderNLBSubGroupInfo is a struct from NLBSubGroupInfo from Spider

type SpiderNLBSubGroupReq

type SpiderNLBSubGroupReq struct {
	Protocol string // TCP|HTTP|HTTPS
	Port     string // Listener Port or 1-65535
	VMs      []string
}

type SpiderNameIdSystemId

type SpiderNameIdSystemId struct {
	NameId   string
	SystemId string
}

type SpiderNetworkInfo

type SpiderNetworkInfo struct {
	VpcIID            IID // {NameId, SystemId}
	SubnetIIDs        []IID
	SecurityGroupIIDs []IID

	KeyValueList []KeyValue
}

SpiderNetworkInfo is a struct to handle Cluster Network information from the CB-Spider's REST API response

type SpiderNodeGroupInfo

type SpiderNodeGroupInfo struct {
	IId IID `json:"IId" validate:"required"` // {NameId, SystemId}

	// VM config.
	ImageIID     IID    `json:"ImageIID" validate:"required"`
	VMSpecName   string `json:"VMSpecName" validate:"required" example:"t3.medium"`
	RootDiskType string `json:"RootDiskType,omitempty" validate:"omitempty"`              // "SSD(gp2)", "Premium SSD", ...
	RootDiskSize string `json:"RootDiskSize,omitempty" validate:"omitempty" example:"50"` // "", "default", "50", "1000" (GB)
	KeyPairIID   IID    `json:"KeyPairIID" validate:"required"`

	// Scaling config.
	OnAutoScaling   bool `json:"OnAutoScaling" validate:"required" example:"true"`
	DesiredNodeSize int  `json:"DesiredNodeSize" validate:"required" example:"2"`
	MinNodeSize     int  `json:"MinNodeSize" validate:"required" example:"1"`
	MaxNodeSize     int  `json:"MaxNodeSize" validate:"required" example:"3"`

	Status SpiderNodeGroupStatus `json:"Status" validate:"required" example:"Active"`

	Nodes []IID `json:"Nodes,omitempty" validate:"omitempty"`

	KeyValueList []KeyValue `json:"KeyValueList,omitempty" validate:"omitempty"`
}

SpiderNodeGroupInfo is a struct to handle Cluster Node Group information from the CB-Spider's REST API response

type SpiderNodeGroupReq

type SpiderNodeGroupReq struct {
	NameSpace      string // should be empty string from Tumblebug
	ConnectionName string
	ReqInfo        SpiderNodeGroupReqInfo
}

SpiderNodeGroupReq is a wrapper struct to create JSON body of 'Add NodeGroup' request

type SpiderNodeGroupReqInfo

type SpiderNodeGroupReqInfo struct {
	Name         string
	ImageName    string
	VMSpecName   string
	RootDiskType string
	RootDiskSize string
	KeyPairName  string

	// autoscale config.
	OnAutoScaling   string
	DesiredNodeSize string
	MinNodeSize     string
	MaxNodeSize     string
}

SpiderNodeGroupReqInfo is a wrapper struct to create JSON body of 'Add NodeGroup' request

type SpiderNodeGroupStatus

type SpiderNodeGroupStatus string
const (
	SpiderNodeGroupCreating SpiderNodeGroupStatus = "Creating"
	SpiderNodeGroupActive   SpiderNodeGroupStatus = "Active"
	SpiderNodeGroupInactive SpiderNodeGroupStatus = "Inactive"
	SpiderNodeGroupUpdating SpiderNodeGroupStatus = "Updating"
	SpiderNodeGroupDeleting SpiderNodeGroupStatus = "Deleting"
)

type SpiderOnDemand added in v0.10.7

type SpiderOnDemand struct {
	PricingId   string `json:"PricingId" validate:"required" example:"price-123"`    // ID of the pricing policy
	Unit        string `json:"Unit" validate:"required" example:"Hour"`              // Unit of the pricing (e.g., per hour)
	Currency    string `json:"Currency" validate:"required" example:"USD"`           // Currency of the pricing
	Price       string `json:"Price" validate:"required" example:"0.02"`             // Price in the specified currency per unit
	Description string `json:"Description,omitempty" example:"Pricing for t2.micro"` // Description of the pricing policy
}

OnDemand represents the OnDemand pricing details.

type SpiderPrice added in v0.10.7

type SpiderPrice struct {
	// ZoneName    string            `json:"ZoneName,omitempty" example:"us-east-1a"`                                     // Name of the zone
	ProductInfo SpiderProductInfo `json:"ProductInfo" validate:"required" description:"Information about the product"` // Information about the product
	PriceInfo   SpiderPriceInfo   `json:"PriceInfo" validate:"required" description:"Pricing details of the product"`  // Pricing details of the product
}

SpiderPrice represents the price information for a specific product.

type SpiderPriceInfo added in v0.10.7

type SpiderPriceInfo struct {
	OnDemand SpiderOnDemand `json:"OnDemand" validate:"required" description:"Ondemand pricing details"` // Ondemand pricing details

}

PriceInfo represents the pricing details for a product.

type SpiderPriceInfoHandler added in v0.10.7

type SpiderPriceInfoHandler interface {
	ListProductFamily(regionName string) ([]string, error)
	GetPriceInfo(productFamily string, regionName string, filterList []KeyValue) (string, error) // return string: json format
}

type SpiderProductInfo added in v0.10.7

type SpiderProductInfo struct {
	// ProductId  string         `json:"ProductId" validate:"required" example:"prod-123"`                           // ID of the product
	VMSpecInfo SpiderSpecInfoForNameOnly `json:"VMSpecInfo" validate:"required" description:"Information about the VM spec"` // Information about the VM spec

}

ProductInfo represents the product details.

type SpiderRegionZoneInfo

type SpiderRegionZoneInfo struct {
	RegionName        string     // ex) "region01"
	ProviderName      string     // ex) "GCP"
	KeyValueInfoList  []KeyValue // ex) { {region, us-east1}, {zone, us-east1-c} }
	AvailableZoneList []string
}

SpiderRegionZoneInfo is struct for containing region struct of CB-Spider

type SpiderSecurityInfo

type SpiderSecurityInfo struct {
	// Fields for request
	Name    string
	VPCName string
	CSPId   string

	// Fields for both request and response
	SecurityRules []SpiderSecurityRuleInfo

	// Fields for response
	IId          IID    // {NameId, SystemId}
	VpcIID       IID    // {NameId, SystemId}
	Direction    string // @todo userd??
	KeyValueList []KeyValue
}

SpiderSecurityRuleInfo is a struct to create JSON body of 'Create security group request'

type SpiderSecurityInfoList

type SpiderSecurityInfoList struct {
	SecurityGroup []SpiderSecurityInfo
}

SpiderSecurityInfoList is a struct to handle 'List security group' response from CB-Spider.

type SpiderSecurityReqInfoWrapper

type SpiderSecurityReqInfoWrapper struct {
	ConnectionName string
	ReqInfo        SpiderSecurityInfo
}

SpiderSecurityReqInfoWrapper is a wrapper struct to create JSON body of 'Create security group request'

type SpiderSecurityRuleInfo

type SpiderSecurityRuleInfo struct {
	FromPort   string //`json:"fromPort"`
	ToPort     string //`json:"toPort"`
	IPProtocol string //`json:"ipProtocol"`
	Direction  string //`json:"direction"`
	CIDR       string
}

SpiderSecurityRuleInfo is a struct to handle security group rule info from/to CB-Spider.

type SpiderSecurityRuleReqInfoIntermediateWrapper

type SpiderSecurityRuleReqInfoIntermediateWrapper struct {
	RuleInfoList []SpiderSecurityRuleInfo
}

SpiderSecurityRuleReqInfoIntermediateWrapper is a intermediate wrapper struct between SpiderSecurityRuleReqInfoWrapper and SpiderSecurityRuleInfo.

type SpiderSecurityRuleReqInfoWrapper

type SpiderSecurityRuleReqInfoWrapper struct {
	ConnectionName string
	ReqInfo        SpiderSecurityRuleReqInfoIntermediateWrapper
}

SpiderSecurityRuleReqInfoWrapper is a wrapper struct to create JSON body of 'Create security rule'

type SpiderSetAutoscalingReq

type SpiderSetAutoscalingReq struct {
	ConnectionName string
	ReqInfo        SpiderSetAutoscalingReqInfo
}

SpiderSetAutoscalingReq is a wrapper struct to create JSON body of 'Set Autoscaling On/Off' request.

type SpiderSetAutoscalingReqInfo

type SpiderSetAutoscalingReqInfo struct {
	OnAutoScaling string
}

SpiderSetAutoscalingReqInfo is a wrapper struct to create JSON body of 'Set Autoscaling On/Off' request.

type SpiderSetAutoscalingRes

type SpiderSetAutoscalingRes struct {
	Result string
}

SpiderSetAutoscalingRes is a wrapper struct to create JSON body of 'Set Autoscaling On/Off' response.

type SpiderSpecInfo

type SpiderSpecInfo struct {
	Region     string          `json:"Region" validate:"required" example:"us-east-1"` // Region where the VM spec is available
	Name       string          `json:"Name" validate:"required" example:"t2.micro"`    // Name of the VM spec
	VCpu       SpiderVCpuInfo  `json:"VCpu" validate:"required"`                       // CPU details of the VM spec
	MemSizeMiB string          `json:"MemSizeMib" validate:"required" example:"1024"`  // Memory size in MiB
	DiskSizeGB string          `json:"DiskSizeGB" validate:"required" example:"8"`     // Disk size in GB, "-1" when not applicable
	Gpu        []SpiderGpuInfo `json:"Gpu,omitempty" validate:"omitempty"`             // GPU details if available

	KeyValueList []KeyValue `json:"KeyValueList,omitempty" validate:"omitempty"` // Additional key-value pairs for the VM spec
}

SpiderSpecInfo is a struct to create JSON body of 'Get spec request'

type SpiderSpecInfoForNameOnly added in v0.10.10

type SpiderSpecInfoForNameOnly struct {
	// Region     string          `json:"Region" validate:"required" example:"us-east-1"` // Region where the VM spec is available
	Name string `json:"Name" validate:"required" example:"t2.micro"` // Name of the VM spec

}

SpiderSpecInfoForNameOnly is a struct to create JSON body of SpiderSpecInfoForNameOnly

type SpiderSpecList

type SpiderSpecList struct {
	Vmspec []SpiderSpecInfo `json:"vmspec"`
}

SpiderSpecList is a struct to handle spec list from the CB-Spider's REST API response

type SpiderTagAddRequest added in v0.10.7

type SpiderTagAddRequest struct {
	ConnectionName string `json:"ConnectionName" validate:"required" example:"aws-connection"`
	ReqInfo        struct {
		ResourceType string   `json:"ResourceType" validate:"required" example:"VPC"`
		ResourceName string   `json:"ResourceName" validate:"required" example:"vpc-01"`
		Tag          KeyValue `json:"Tag" validate:"required"`
	} `json:"ReqInfo" validate:"required"`
}

type SpiderTagRemoveRequest added in v0.10.7

type SpiderTagRemoveRequest struct {
	ConnectionName string `json:"ConnectionName" validate:"required" example:"aws-connection"`
	ReqInfo        struct {
		ResourceType string `json:"ResourceType" validate:"required" example:"VPC"`
		ResourceName string `json:"ResourceName" validate:"required" example:"vpc-01"`
	} `json:"ReqInfo" validate:"required"`
}

type SpiderUpgradeClusterReq

type SpiderUpgradeClusterReq struct {
	NameSpace      string // should be empty string from Tumblebug
	ConnectionName string
	ReqInfo        SpiderUpgradeClusterReqInfo
}

SpiderUpgradeClusterReq is a wrapper struct to create JSON body of 'Upgrade Cluster' request

type SpiderUpgradeClusterReqInfo

type SpiderUpgradeClusterReqInfo struct {
	Version string
}

SpiderUpgradeClusterReqInfo is a wrapper struct to create JSON body of 'Upgrade Cluster' request

type SpiderVCpuInfo

type SpiderVCpuInfo struct {
	Count    string `json:"Count" validate:"required" example:"2"`                 // Number of VCpu, "-1" when not applicable
	ClockGHz string `json:"ClockGHz,omitempty" validate:"omitempty" example:"2.5"` // Clock speed in GHz, "-1" when not applicable
}

SpiderVCpuInfo is a struct to handle vCPU Info from CB-Spider.

type SpiderVMInfo

type SpiderVMInfo struct {

	// Fields for both request and response
	VMSpecName   string // instance type or flavour, etc... ex) t2.micro or f1.micro
	VMUserId     string // ex) user1
	VMUserPasswd string
	RootDiskType string // "SSD(gp2)", "Premium SSD", ...
	RootDiskSize string // "default", "50", "1000" (GB)
	ImageType    SpiderImageType

	// Fields for response
	IId               IID // {NameId, SystemId}
	ImageIId          IID
	VpcIID            IID
	SubnetIID         IID   // AWS, ex) subnet-8c4a53e4
	SecurityGroupIIds []IID // AWS, ex) sg-0b7452563e1121bb6
	KeyPairIId        IID
	DataDiskIIDs      []IID
	StartTime         time.Time
	Region            RegionInfo //  ex) {us-east1, us-east1-c} or {ap-northeast-2}
	NetworkInterface  string     // ex) eth0
	PublicIP          string
	PublicDNS         string
	PrivateIP         string
	PrivateDNS        string
	RootDiskName      string // "/dev/sda1", ...
	SSHAccessPoint    string
	KeyValueList      []KeyValue
}

Ref: cb-spider/cloud-control-manager/cloud-driver/interfaces/resources/VMHandler.go SpiderVMInfo is struct from CB-Spider for VM information

type SpiderVMReqInfo added in v0.9.19

type SpiderVMReqInfo struct {
	// Fields for request
	Name               string
	ImageName          string
	VPCName            string
	SubnetName         string
	SecurityGroupNames []string
	KeyPairName        string
	CSPid              string // VM ID given by CSP (required for registering VM)
	DataDiskNames      []string

	// Fields for both request and response
	VMSpecName   string // instance type or flavour, etc... ex) t2.micro or f1.micro
	VMUserId     string // ex) user1
	VMUserPasswd string
	RootDiskType string // "SSD(gp2)", "Premium SSD", ...
	RootDiskSize string // "default", "50", "1000" (GB)
	ImageType    SpiderImageType
}

Ref: cb-spider/cloud-control-manager/cloud-driver/interfaces/resources/VMHandler.go SpiderVMReqInfo is struct from CB-Spider for VM request information

type SpiderVMReqInfoWrapper

type SpiderVMReqInfoWrapper struct {
	ConnectionName string
	ReqInfo        SpiderVMReqInfo
}

SpiderVMReqInfoWrapper is struct from CB-Spider (VMHandler.go) for wrapping SpiderVMReqInfo

type SqlDBInfo added in v0.10.1

type SqlDBInfo struct {
	// ResourceType is the type of the resource
	ResourceType     string     `json:"resourceType"`
	ConnectionName   string     `json:"connectionName"`
	ConnectionConfig ConnConfig `json:"connectionConfig"`
	// Id is unique identifier for the object
	Id string `json:"id" example:"sqldb01"`
	// Uid is universally unique identifier for the object, used for labelSelector
	Uid string `json:"uid,omitempty" example:"wef12awefadf1221edcf"`
	// Name is human-readable string to represent the object
	Name string `json:"name" example:"sqldb01"`
	// CspResourceName is name assigned to the CSP resource. This name is internally used to handle the resource.
	CspResourceName string `json:"cspResourceName,omitempty" example:"we12fawefadf1221edcf"`
	// CspResourceId is resource identifier managed by CSP
	CspResourceId string      `json:"cspResourceId,omitempty" example:"csp-06eb41e14121c550a"`
	Status        string      `json:"status"`
	Description   string      `json:"description"`
	Details       interface{} `json:"details"`
}

type SshCmdResult

type SshCmdResult struct {
	MciId   string         `json:"mciId"`
	VmId    string         `json:"vmId"`
	VmIp    string         `json:"vmIp"`
	Command map[int]string `json:"command"`
	Stdout  map[int]string `json:"stdout"`
	Stderr  map[int]string `json:"stderr"`
	Err     error          `json:"err"`
}

SshCmdResult is struct for SshCmd Result

type SshInfo

type SshInfo struct {
	UserName   string // ex) root
	PrivateKey []byte // ex) -----BEGIN RSA PRIVATE KEY-----
	EndPoint   string // ex) node12:22
}

SshInfo is struct for ssh info

type StatusCountInfo

type StatusCountInfo struct {

	// CountTotal is for Total VMs
	CountTotal int `json:"countTotal"`

	// CountCreating is for counting Creating
	CountCreating int `json:"countCreating"`

	// CountRunning is for counting Running
	CountRunning int `json:"countRunning"`

	// CountFailed is for counting Failed
	CountFailed int `json:"countFailed"`

	// CountSuspended is for counting Suspended
	CountSuspended int `json:"countSuspended"`

	// CountRebooting is for counting Rebooting
	CountRebooting int `json:"countRebooting"`

	// CountTerminated is for counting Terminated
	CountTerminated int `json:"countTerminated"`

	// CountSuspending is for counting Suspending
	CountSuspending int `json:"countSuspending"`

	// CountResuming is for counting Resuming
	CountResuming int `json:"countResuming"`

	// CountTerminating is for counting Terminating
	CountTerminating int `json:"countTerminating"`

	// CountUndefined is for counting Undefined
	CountUndefined int `json:"countUndefined"`
}

StatusCountInfo is struct to count the number of VMs in each status. ex: Running=4, Suspended=8.

type SubnetDetail added in v0.10.7

type SubnetDetail struct {
	PrefixLength PrefixLengthDetail `mapstructure:"prefix-length" json:"prefixLength"`
	ReservedIPs  ReservedIPsDetail  `mapstructure:"reserved-ips" json:"reservedIPs"`
}

SubnetDetail is structure for subnet configuration

type SystemLabelInfo added in v0.9.12

type SystemLabelInfo struct {
	LabelTypes   []string          `json:"labelTypes"`
	SystemLabels map[string]string `json:"systemLabels"`
}

SystemLabelInfo is a struct to return LabelTypes and System label Keys

type TbAttachDetachDataDiskReq

type TbAttachDetachDataDiskReq struct {
	DataDiskId string `json:"dataDiskId" validate:"required"`
}

TbAttachDetachDataDiskReq is a wrapper struct to create JSON body of 'Attach/Detach disk request'

type TbChangeK8sNodeGroupAutoscaleSizeReq

type TbChangeK8sNodeGroupAutoscaleSizeReq struct {
	DesiredNodeSize string `json:"desiredNodeSize" example:"1"`
	MinNodeSize     string `json:"minNodeSize" example:"1"`
	MaxNodeSize     string `json:"maxNodeSize" example:"3"`
}

TbChangeK8sNodeGroupAutoscaleSizeReq is a struct to handle 'Change K8sNodeGroup's Autoscale Size' request toward CB-Tumblebug.

type TbChangeK8sNodeGroupAutoscaleSizeRes

type TbChangeK8sNodeGroupAutoscaleSizeRes struct {
	TbK8sNodeGroupInfo
}

TbChangeK8sNodeGroupAutoscaleSizeRes is a struct to handle 'Change K8sNodeGroup's Autoscale Size' response from CB-Tumblebug.

type TbCustomImageInfo

type TbCustomImageInfo struct {
	// ResourceType is the type of the resource
	ResourceType string `json:"resourceType"`

	// Id is unique identifier for the object
	Id string `json:"id" example:"aws-ap-southeast-1"`
	// Uid is universally unique identifier for the object, used for labelSelector
	Uid string `json:"uid,omitempty" example:"wef12awefadf1221edcf"`
	// CspResourceName is name assigned to the CSP resource. This name is internally used to handle the resource.
	CspResourceName string `json:"cspResourceName,omitempty" example:"we12fawefadf1221edcf"`
	// CspResourceId is resource identifier managed by CSP
	CspResourceId string `json:"cspResourceId,omitempty" example:"csp-06eb41e14121c550a"`

	// Name is human-readable string to represent the object
	Name             string     `json:"name" example:"aws-ap-southeast-1"`
	Namespace        string     `json:"namespace,omitempty" example:"default"` // required to save in RDB
	ConnectionName   string     `json:"connectionName" example:"aws-ap-southeast-1"`
	ConnectionConfig ConnConfig `json:"connectionConfig" gorm:"type:text;serializer:json"`

	SourceVmId           string            `json:"sourceVmId" example:"aws-ap-southeast-1-1"`
	Description          string            `json:"description"`
	CreationDate         time.Time         `json:"creationDate,omitempty" example:"2022-10-18T08:12:48Z"`
	GuestOS              string            `json:"guestOS,omitempty"` // Windows7, Ubuntu etc.
	Status               CustomImageStatus `json:"status" example:"Available"`
	KeyValueList         []KeyValue        `json:"keyValueList" gorm:"type:text;serializer:json"`
	AssociatedObjectList []string          `json:"associatedObjectList,omitempty" gorm:"type:text;serializer:json"`
	IsAutoGenerated      bool              `json:"isAutoGenerated,omitempty"`

	// SystemLabel is for describing the Resource in a keyword (any string can be used) for special System purpose
	SystemLabel string `json:"systemLabel,omitempty" example:"Managed by CB-Tumblebug" default:""`
}

TbCustomImageInfo is a struct for custom image (VM snapshot)

type TbCustomImageReq

type TbCustomImageReq struct {
	// This field is for 'Register existing custom image'
	CspResourceId string `json:"cspResourceId"`

	ConnectionName string `json:"connectionName"`
	Name           string `json:"name" validate:"required"`
	SourceVmId     string `json:"sourceVmId"`
	Description    string `json:"description"`
}

TbCustomImageReq is a struct to handle a request for Create custom image (VM snapshot)

type TbDataDiskInfo

type TbDataDiskInfo struct {
	// ResourceType is the type of the resource
	ResourceType string `json:"resourceType"`

	// Id is unique identifier for the object
	Id string `json:"id" example:"aws-ap-southeast-1"`
	// Uid is universally unique identifier for the object, used for labelSelector
	Uid string `json:"uid,omitempty" example:"wef12awefadf1221edcf"`
	// CspResourceName is name assigned to the CSP resource. This name is internally used to handle the resource.
	CspResourceName string `json:"cspResourceName,omitempty" example:"we12fawefadf1221edcf"`
	// CspResourceId is resource identifier managed by CSP
	CspResourceId string `json:"cspResourceId,omitempty" example:"csp-06eb41e14121c550a"`

	// Name is human-readable string to represent the object
	Name             string     `json:"name" example:"aws-ap-southeast-1"`
	ConnectionName   string     `json:"connectionName,omitempty" example:"aws-ap-southeast-1"`
	ConnectionConfig ConnConfig `json:"connectionConfig"`

	DiskType             string     `json:"diskType" example:"standard"`
	DiskSize             string     `json:"diskSize" example:"77"`
	Status               DiskStatus `json:"status" example:"Available"` // Available, Unavailable, Attached, ...
	AssociatedObjectList []string   `json:"associatedObjectList" example:"/ns/default/mci/mci01/vm/aws-ap-southeast-1-1"`
	CreatedTime          time.Time  `json:"createdTime,omitempty" example:"2022-10-12T05:09:51.05Z"`
	KeyValueList         []KeyValue `json:"keyValueList,omitempty"`
	Description          string     `json:"description,omitempty" example:"Available"`

	// Latest system message such as error message
	SystemMessage string `json:"systemMessage" example:"Failed because ..." default:""` // systeam-given string message

	IsAutoGenerated bool `json:"isAutoGenerated,omitempty"`

	// SystemLabel is for describing the Resource in a keyword (any string can be used) for special System purpose
	SystemLabel string `json:"systemLabel,omitempty" example:"Managed by CB-Tumblebug" default:""`
}

TbDataDiskInfo is a struct that represents TB dataDisk object.

type TbDataDiskReq

type TbDataDiskReq struct {
	Name           string `json:"name" validate:"required" example:"aws-ap-southeast-1-datadisk"`
	ConnectionName string `json:"connectionName" validate:"required" example:"aws-ap-southeast-1"`
	DiskType       string `json:"diskType" example:"default"`
	DiskSize       string `json:"diskSize" validate:"required" example:"77" default:"100"`
	Description    string `json:"description,omitempty"`

	// Fields for "Register existing dataDisk" feature
	// CspResourceId is required to register object from CSP (option=register)
	CspResourceId string `json:"cspResourceId"`
}

TbDataDiskReq is a struct to handle 'Register dataDisk' request toward CB-Tumblebug.

type TbDataDiskUpsizeReq

type TbDataDiskUpsizeReq struct {
	DiskSize    string `json:"diskSize" validate:"required"`
	Description string `json:"description"`
}

TbDataDiskUpsizeReq is a struct to handle 'Upsize dataDisk' request toward CB-Tumblebug.

type TbDataDiskVmReq

type TbDataDiskVmReq struct {
	Name        string `json:"name" validate:"required" example:"aws-ap-southeast-1-datadisk"`
	DiskType    string `json:"diskType" example:"default"`
	DiskSize    string `json:"diskSize" validate:"required" example:"77" default:"100"`
	Description string `json:"description,omitempty"`
}

TbDataDiskVmReq is a struct to handle 'Provisioning dataDisk to VM' request toward CB-Tumblebug.

type TbFirewallRuleInfo

type TbFirewallRuleInfo struct {
	FromPort   string `validate:"required"` //`json:"fromPort"`
	ToPort     string `validate:"required"` //`json:"toPort"`
	IPProtocol string `validate:"required"` //`json:"ipProtocol"`
	Direction  string `validate:"required"` //`json:"direction"`
	CIDR       string
}

TbFirewallRuleInfo is a struct to handle firewall rule info of CB-Tumblebug.

type TbIdNameInDetailInfo

type TbIdNameInDetailInfo struct {
	IdInTb    string `json:"idInTb"`
	IdInSp    string `json:"idInSp"`
	IdInCsp   string `json:"idInCsp"`
	NameInCsp string `json:"nameInCsp"`
}

TbVmIdNameInDetailInfo is struct for details related with ID and Name

type TbImageInfo

type TbImageInfo struct {
	// Composite primary key
	Namespace    string `json:"namespace" example:"default" gorm:"primaryKey"`
	ProviderName string `json:"providerName" gorm:"primaryKey"`
	CspImageName string `` /* 141-byte string literal not displayed */

	// Array field for supporting multiple regions
	RegionList []string `json:"regionList" gorm:"type:text;serializer:json"`

	Id  string `json:"id" example:"aws-ap-southeast-1"`
	Uid string `json:"uid,omitempty" example:"wef12awefadf1221edcf"`

	Name           string `json:"name" example:"aws-ap-southeast-1"`
	ConnectionName string `json:"connectionName,omitempty"`
	InfraType      string `json:"infraType,omitempty"` // vm|k8s|kubernetes|container, etc.

	FetchedTime  string `json:"fetchedTime,omitempty"`
	CreationDate string `json:"creationDate,omitempty"`

	IsGPUImage        bool `` /* 143-byte string literal not displayed */
	IsKubernetesImage bool `` /* 164-byte string literal not displayed */

	OSType string `json:"osType,omitempty" gorm:"column:os_type" example:"ubuntu 22.04" description:"Simplified OS name and version string"`

	OSArchitecture OSArchitecture `` // arm64, x86_64 etc.
	/* 137-byte string literal not displayed */
	OSPlatform OSPlatform `` // Linux/UNIX, Windows, NA
	/* 129-byte string literal not displayed */
	OSDistribution string `` // Ubuntu 22.04~, CentOS 8 etc.
	/* 144-byte string literal not displayed */
	OSDiskType   string  `json:"osDiskType" gorm:"column:os_disk_type" example:"HDD" description:"The type of the OS disk of for the VM being created."` // ebs, HDD, etc.
	OSDiskSizeGB float64 ``                                                                                                                              // 10, 50, 100 etc.
	/* 135-byte string literal not displayed */
	ImageStatus ImageStatus `json:"imageStatus" example:"Available" description:"The status of the image, e.g., Available, Deprecated, NA."` // Available, Deprecated, NA

	Details     []KeyValue `json:"details" gorm:"type:text;serializer:json"`
	SystemLabel string     `json:"systemLabel,omitempty" example:"Managed by CB-Tumblebug" default:""`
	Description string     `json:"description,omitempty"`
}

TbImageInfo is a struct that represents TB image object.

type TbImageReq

type TbImageReq struct {
	Name           string `json:"name" validate:"required"`
	ConnectionName string `json:"connectionName" validate:"required"`
	CspImageName   string `json:"cspImageName" validate:"required"`
	Description    string `json:"description"`
}

TbImageReq is a struct to handle 'Register image' request toward CB-Tumblebug.

type TbInspectResourcesResponse

type TbInspectResourcesResponse struct {
	InspectResources []InspectResource `json:"inspectResources"`
}

TbInspectResourcesResponse is struct for response of InspectResources request

type TbK8sAccessInfo

type TbK8sAccessInfo struct {
	Endpoint   string `json:"endpoint" example:"http://1.2.3.4:6443"`
	Kubeconfig string `json:"kubeconfig" example:"apiVersion: v1\nclusters:\n- cluster:\n certificate-authority-data: LS0..."`
}

TbK8sAccessInfo is a struct to handle K8sCluster Access information from the CB-Tumblebug's REST API response

type TbK8sAddonsInfo

type TbK8sAddonsInfo struct {
	KeyValueList []KeyValue `json:"keyValueList"`
}

TbK8sAddonsInfo is a struct to handle K8sCluster Addons information from the CB-Tumblebug's REST API response

type TbK8sClusterContainerCmdReq added in v0.10.4

type TbK8sClusterContainerCmdReq struct {
	Command []string `json:"command" validate:"required" example:"echo hello"`
}

TbK8sClusterContainerCmdReq is struct for remote command

type TbK8sClusterContainerCmdResult added in v0.10.4

type TbK8sClusterContainerCmdResult struct {
	Command string `json:"command"`
	Stdout  string `json:"stdout"`
	Stderr  string `json:"stderr"`
	Err     error  `json:"err"`
}

TbK8sClusterContainerCmdResult is struct for K8sClusterContainerCmd Result

type TbK8sClusterContainerCmdResults added in v0.10.7

type TbK8sClusterContainerCmdResults struct {
	Results []*TbK8sClusterContainerCmdResult `json:"results"`
}

TbK8sClusterContainerCmdResultMap is struct maps for K8sClusterContainerCmd Result

type TbK8sClusterDynamicReq added in v0.10.0

type TbK8sClusterDynamicReq struct {
	// K8sCluster name if it is not empty.
	Name string `json:"name" validate:"required" example:"k8scluster01"`

	// K8s Clsuter version
	Version string `json:"version,omitempty" example:"1.29"`

	// Label is for describing the object by keywords
	Label map[string]string `json:"label,omitempty"`

	Description string `json:"description,omitempty" example:"Description"`

	// NodeGroup name if it is not empty
	NodeGroupName string `json:"nodeGroupName,omitempty" example:"k8sng01"`

	// CommonSpec is field for id of a spec in common namespace
	CommonSpec string `json:"commonSpec" validate:"required" example:"tencent+ap-seoul+S2.MEDIUM4"`

	// CommonImage is field for id of a image in common namespace
	CommonImage string `json:"commonImage" validate:"required" example:"default, tencent+ap-seoul+ubuntu20.04"`

	RootDiskType string `json:"rootDiskType,omitempty" example:"default, TYPE1, ..." default:"default"`  // "", "default", "TYPE1", AWS: ["standard", "gp2", "gp3"], Azure: ["PremiumSSD", "StandardSSD", "StandardHDD"], GCP: ["pd-standard", "pd-balanced", "pd-ssd", "pd-extreme"], ALIBABA: ["cloud_efficiency", "cloud", "cloud_essd"], TENCENT: ["CLOUD_PREMIUM", "CLOUD_SSD"]
	RootDiskSize string `json:"rootDiskSize,omitempty" example:"default, 30, 42, ..." default:"default"` // "default", Integer (GB): ["50", ..., "1000"]

	OnAutoScaling   string `json:"onAutoScaling,omitempty" default:"true" example:"true"`
	DesiredNodeSize string `json:"desiredNodeSize,omitempty" default:"1" example:"1"`
	MinNodeSize     string `json:"minNodeSize,omitempty" default:"1" example:"1"`
	MaxNodeSize     string `json:"maxNodeSize,omitempty" default:"2" example:"3"`

	// if ConnectionName is given, the VM tries to use associtated credential.
	// if not, it will use predefined ConnectionName in Spec objects
	ConnectionName string `json:"connectionName,omitempty" default:"tencent-ap-seoul"`
}

TbK8sClusterDynamicReq is struct for requirements to create K8sCluster dynamically (with default resource option)

type TbK8sClusterInfo

type TbK8sClusterInfo struct {
	// ResourceType is the type of the resource
	ResourceType string `json:"resourceType"`

	// Id is unique identifier for the object, same as Name
	Id string `json:"id" example:"k8scluster01"`

	// Uid is universally unique identifier for the object, used for labelSelector
	Uid string `json:"uid,omitempty" example:"wef12awefadf1221edcf"`

	// Name is human-readable string to represent the object
	Name           string `json:"name" example:"k8scluster01"`
	ConnectionName string `json:"connectionName" example:"alibaba-ap-northeast-2"`

	// ConnectionConfig shows connection info to cloud service provider
	ConnectionConfig ConnConfig `json:"connectionConfig"`

	Description string `json:"description" example:"My K8sCluster"`

	// Latest system message such as error message
	SystemMessage string `json:"systemMessage" example:"Failed because ..." default:""` // systeam-given string message

	// Label is for describing the object by keywords
	Label map[string]string `json:"label"`

	// SystemLabel is for describing the Resource in a keyword (any string can be used) for special System purpose
	SystemLabel string `json:"systemLabel" example:"Managed by CB-Tumblebug" default:""`

	// Version is for kubernetes version
	Version string `json:"version" example:"1.30.1"` // Kubernetes Version, ex) 1.30.1

	// Network is for describing network information about the cluster
	Network TbK8sClusterNetworkInfo `json:"network"`

	// K8sNodeGroupList is for describing network information about the cluster
	K8sNodeGroupList []TbK8sNodeGroupInfo `json:"k8sNodeGroupList"`
	AccessInfo       TbK8sAccessInfo      `json:"accessInfo"`
	Addons           TbK8sAddonsInfo      `json:"addons"`

	Status TbK8sClusterStatus `json:"status" example:"Active"` // Creating, Active, Inactive, Updating, Deleting

	CreatedTime  time.Time  `json:"createdTime" example:"1970-01-01T00:00:00.00Z"`
	KeyValueList []KeyValue `json:"keyValueList"`

	// CspResourceName is name assigned to the CSP resource. This name is internally used to handle the resource.
	CspResourceName string `json:"cspResourceName,omitempty" example:"we12fawefadf1221edcf"`

	// CspResourceId is resource identifier managed by CSP
	CspResourceId string `json:"cspResourceId,omitempty" example:"csp-06eb41e14121c550a"`

	SpiderViewK8sClusterDetail SpiderClusterInfo `json:"spiderViewK8sClusterDetail,omitempty"`
}

TbK8sClusterInfo is a struct that represents TB K8sCluster object.

type TbK8sClusterNetworkInfo

type TbK8sClusterNetworkInfo struct {
	VNetId           string   `json:"vNetId" example:"vpc-01"`
	SubnetIds        []string `json:"subnetIds" example:"subnet-01"`
	SecurityGroupIds []string `json:"securityGroupIds" example:"sg-01"`

	KeyValueList []KeyValue `json:"keyValueList"`
}

TbK8sClusterNetworkInfo is a struct to handle K8sCluster Network information from the CB-Tumblebug's REST API response

type TbK8sClusterReq

type TbK8sClusterReq struct {
	//Namespace      string `json:"namespace" validate:"required" example:"default"`
	ConnectionName string `json:"connectionName" validate:"required" example:"alibaba-ap-northeast-2"`
	Description    string `json:"description" example:"My K8sCluster"`

	// (1) K8sCluster Info
	Name    string `json:"name" validate:"required" example:"k8scluster01"`
	Version string `json:"version" example:"1.30.1-aliyun.1"`

	// (2) Network Info
	VNetId           string   `json:"vNetId" validate:"required" example:"vpc-01"`
	SubnetIds        []string `json:"subnetIds" validate:"required" example:"subnet-01"`
	SecurityGroupIds []string `json:"securityGroupIds" validate:"required" example:"sg-01"`

	// (3) NodeGroupInfo List
	K8sNodeGroupList []TbK8sNodeGroupReq `json:"k8sNodeGroupList"`

	// Fields for "Register existing K8sCluster" feature
	// @description CspResourceId is required to register a k8s cluster from CSP (option=register)
	CspResourceId string `json:"cspResourceId" example:"required when option is register"`

	// Label is for describing the object by keywords
	Label map[string]string `json:"label"`

	// SystemLabel is for describing the k8scluster in a keyword (any string can be used) for special System purpose
	SystemLabel string `json:"systemLabel" example:"" default:""`
}

TbK8sClusterReq is a struct to handle 'Create K8sCluster' request toward CB-Tumblebug.

type TbK8sClusterStatus

type TbK8sClusterStatus string
const (
	TbK8sClusterCreating TbK8sClusterStatus = "Creating"
	TbK8sClusterActive   TbK8sClusterStatus = "Active"
	TbK8sClusterInactive TbK8sClusterStatus = "Inactive"
	TbK8sClusterUpdating TbK8sClusterStatus = "Updating"
	TbK8sClusterDeleting TbK8sClusterStatus = "Deleting"
)

type TbK8sNodeGroupDynamicReq added in v0.10.2

type TbK8sNodeGroupDynamicReq struct {
	// K8sNodeGroup name if it is not empty.
	Name string `json:"name" validate:"required" example:"k8sng01"`

	// Label is for describing the object by keywords
	Label map[string]string `json:"label,omitempty"`

	Description string `json:"description,omitempty" example:"Description"`

	// CommonSpec is field for id of a spec in common namespace
	CommonSpec string `json:"commonSpec" validate:"required" example:"tencent+ap-seoul+S2.MEDIUM4"`

	// CommonImage is field for id of a image in common namespace
	CommonImage string `json:"commonImage" validate:"required" example:"default, tencent+ap-seoul+ubuntu20.04"`

	RootDiskType string `json:"rootDiskType,omitempty" example:"default, TYPE1, ..." default:"default"`  // "", "default", "TYPE1", AWS: ["standard", "gp2", "gp3"], Azure: ["PremiumSSD", "StandardSSD", "StandardHDD"], GCP: ["pd-standard", "pd-balanced", "pd-ssd", "pd-extreme"], ALIBABA: ["cloud_efficiency", "cloud", "cloud_essd"], TENCENT: ["CLOUD_PREMIUM", "CLOUD_SSD"]
	RootDiskSize string `json:"rootDiskSize,omitempty" example:"default, 30, 42, ..." default:"default"` // "default", Integer (GB): ["50", ..., "1000"]

	OnAutoScaling   string `json:"onAutoScaling,omitempty" default:"true" example:"true"`
	DesiredNodeSize string `json:"desiredNodeSize,omitempty" default:"1" example:"1"`
	MinNodeSize     string `json:"minNodeSize,omitempty" default:"1" example:"1"`
	MaxNodeSize     string `json:"maxNodeSize,omitempty" default:"2" example:"3"`
}

TbK8sNodeGroupDynamicReq is struct for requirements to create K8sNodeGroup dynamically (with default resource option)

type TbK8sNodeGroupInfo

type TbK8sNodeGroupInfo struct {
	// Id is unique identifier for the object
	Id string `json:"id" example:"aws-ap-southeast-1"`

	// Name is human-readable string to represent the object
	Name string `json:"name" example:"aws-ap-southeast-1"`

	ImageId         string               `json:"imageId"`
	SpecId          string               `json:"specId"`
	RootDiskType    string               `json:"rootDiskType"`
	RootDiskSize    string               `json:"rootDiskSize"`
	SshKeyId        string               `json:"sshKeyId"`
	OnAutoScaling   bool                 `json:"onAutoScaling"`
	DesiredNodeSize int                  `json:"desiredNodeSize"`
	MinNodeSize     int                  `json:"minNodeSize"`
	MaxNodeSize     int                  `json:"maxNodeSize"`
	Status          TbK8sNodeGroupStatus `json:"status" example:"Active"` // Creating, Active, Inactive, Updating, Deleting
	K8sNodes        []TbK8sNodeInfo      `json:"k8sNodes"`
	KeyValueList    []KeyValue           `json:"keyValueList"`

	// CspResourceName is name assigned to the CSP resource. This name is internally used to handle the resource.
	CspResourceName string `json:"cspResourceName,omitempty" example:"we12fawefadf1221edcf"`

	// CspResourceId is resource identifier managed by CSP
	CspResourceId string `json:"cspResourceId,omitempty" example:"csp-06eb41e14121c550a"`

	SpiderViewK8sNodeGroupDetail SpiderNodeGroupInfo `json:"spiderViewK8sNodeGroupDetail,omitempty"`
}

TbK8sNodeGroupInfo is a struct to handle K8sCluster's Node Group information from the CB-Tumblebug's REST API response

type TbK8sNodeGroupReq

type TbK8sNodeGroupReq struct {
	Name         string `json:"name" example:"k8sng01"`
	ImageId      string `json:"imageId" example:"image-01"`
	SpecId       string `json:"specId" example:"spec-01"`
	RootDiskType string `json:"rootDiskType" example:"cloud_essd" enum:"default, TYPE1, ..."` // "", "default", "TYPE1", AWS: ["standard", "gp2", "gp3"], Azure: ["PremiumSSD", "StandardSSD", "StandardHDD"], GCP: ["pd-standard", "pd-balanced", "pd-ssd", "pd-extreme"], ALIBABA: ["cloud_efficiency", "cloud", "cloud_ssd"], TENCENT: ["CLOUD_PREMIUM", "CLOUD_SSD"]
	RootDiskSize string `json:"rootDiskSize" example:"40" enum:"default, 30, 42, ..."`        // "default", Integer (GB): ["50", ..., "1000"]
	SshKeyId     string `json:"sshKeyId" example:"sshkey-01"`

	// autoscale config.
	OnAutoScaling   string `json:"onAutoScaling" example:"true"`
	DesiredNodeSize string `json:"desiredNodeSize" example:"1"`
	MinNodeSize     string `json:"minNodeSize" example:"1"`
	MaxNodeSize     string `json:"maxNodeSize" example:"3"`

	// Label is for describing the object by keywords
	Label map[string]string `json:"label"`

	Description string `json:"description" example:"Description"`
}

TbK8sNodeGroupReq is a struct to handle requests related to K8sNodeGroup toward CB-Tumblebug.

type TbK8sNodeGroupStatus

type TbK8sNodeGroupStatus string
const (
	TbK8sNodeGroupCreating TbK8sNodeGroupStatus = "Creating"
	TbK8sNodeGroupActive   TbK8sNodeGroupStatus = "Active"
	TbK8sNodeGroupInactive TbK8sNodeGroupStatus = "Inactive"
	TbK8sNodeGroupUpdating TbK8sNodeGroupStatus = "Updating"
	TbK8sNodeGroupDeleting TbK8sNodeGroupStatus = "Deleting"
)

type TbK8sNodeInfo added in v0.10.7

type TbK8sNodeInfo struct {
	// CspResourceName is name assigned to the CSP resource. This name is internally used to handle the resource.
	CspResourceName string `json:"cspResourceName,omitempty" example:"we12fawefadf1221edcf"`

	// CspResourceId is resource identifier managed by CSP
	CspResourceId string `json:"cspResourceId,omitempty" example:"csp-06eb41e14121c550a"`
}

TbK8sNodeInfo is a struct to handle K8sCluster's Node information

type TbMciDynamicReq

type TbMciDynamicReq struct {
	Name string `json:"name" validate:"required" example:"mci01"`

	// InstallMonAgent Option for CB-Dragonfly agent installation ([yes/no] default:no)
	InstallMonAgent string `json:"installMonAgent" example:"no" default:"no" enums:"yes,no"` // yes or no

	// Label is for describing the object by keywords
	Label map[string]string `json:"label"`

	// SystemLabel is for describing the mci in a keyword (any string can be used) for special System purpose
	SystemLabel string `json:"systemLabel" example:"" default:""`

	Description string `json:"description" example:"Made in CB-TB"`

	Vm []TbVmDynamicReq `json:"vm" validate:"required"`

	// PostCommand is for the command to bootstrap the VMs
	PostCommand MciCmdReq `json:"postCommand"`
}

TbMciDynamicReq is struct for requirements to create MCI dynamically (with default resource option)

type TbMciInfo

type TbMciInfo struct {
	// ResourceType is the type of the resource
	ResourceType string `json:"resourceType"`

	// Id is unique identifier for the object
	Id string `json:"id" example:"aws-ap-southeast-1"`
	// Uid is universally unique identifier for the object, used for labelSelector
	Uid string `json:"uid,omitempty" example:"wef12awefadf1221edcf"`

	// Name is human-readable string to represent the object
	Name string `json:"name" example:"aws-ap-southeast-1"`

	Status       string          `json:"status"`
	StatusCount  StatusCountInfo `json:"statusCount"`
	TargetStatus string          `json:"targetStatus"`
	TargetAction string          `json:"targetAction"`

	// InstallMonAgent Option for CB-Dragonfly agent installation ([yes/no] default:no)
	InstallMonAgent string `json:"installMonAgent" example:"no" default:"no" enums:"yes,no"` // yes or no

	// ConfigureCloudAdaptiveNetwork is an option to configure Cloud Adaptive Network (CLADNet) ([yes/no] default:yes)
	ConfigureCloudAdaptiveNetwork string `json:"configureCloudAdaptiveNetwork" example:"yes" default:"no" enums:"yes,no"` // yes or no

	// Label is for describing the object by keywords
	Label map[string]string `json:"label"`

	// SystemLabel is for describing the mci in a keyword (any string can be used) for special System purpose
	SystemLabel string `json:"systemLabel" example:"Managed by CB-Tumblebug" default:""`

	// Latest system message such as error message
	SystemMessage string `json:"systemMessage" example:"Failed because ..." default:""` // systeam-given string message

	PlacementAlgo string     `json:"placementAlgo,omitempty"`
	Description   string     `json:"description"`
	Vm            []TbVmInfo `json:"vm"`

	// List of IDs for new VMs. Return IDs if the VMs are newly added. This field should be used for return body only.
	NewVmList []string `json:"newVmList"`

	// PostCommand is for the command to bootstrap the VMs
	PostCommand MciCmdReq `json:"postCommand"`

	// PostCommandResult is the result of the command for bootstraping the VMs
	PostCommandResult MciSshCmdResult `json:"postCommandResult"`
}

TbMciInfo is struct for MCI info

type TbMciReq

type TbMciReq struct {
	Name string `json:"name" validate:"required" example:"mci01"`

	// InstallMonAgent Option for CB-Dragonfly agent installation ([yes/no] default:yes)
	InstallMonAgent string `json:"installMonAgent" example:"no" default:"no" enums:"yes,no"` // yes or no

	// Label is for describing the object by keywords
	Label map[string]string `json:"label"`

	// SystemLabel is for describing the mci in a keyword (any string can be used) for special System purpose
	SystemLabel string `json:"systemLabel" example:"" default:""`

	PlacementAlgo string `json:"placementAlgo,omitempty"`
	Description   string `json:"description" example:"Made in CB-TB"`

	Vm []TbVmReq `json:"vm" validate:"required"`

	// PostCommand is for the command to bootstrap the VMs
	PostCommand MciCmdReq `json:"postCommand" validate:"omitempty"`
}

TbMciReq is struct for requirements to create MCI

type TbNLBAddRemoveVMReq

type TbNLBAddRemoveVMReq struct {
	TargetGroup TbNLBTargetGroupInfo `json:"targetGroup"`
}

TbNLBAddRemoveVMReq is a struct to handle 'Add/Remove VMs to/from NLB' request toward CB-Tumblebug.

type TbNLBHealthCheckerInfo

type TbNLBHealthCheckerInfo struct {
	Protocol  string `json:"protocol" example:"TCP"` // TCP|HTTP|HTTPS
	Port      string `json:"port" example:"22"`      // Listener Port or 1-65535
	Interval  int    `json:"interval" example:"10"`  // secs, Interval time between health checks.
	Timeout   int    `json:"timeout" example:"10"`   // secs, Waiting time to decide an unhealthy VM when no response.
	Threshold int    `json:"threshold" example:"3"`  // num, The number of continuous health checks to change the VM status.

	KeyValueList []KeyValue `json:"keyValueList"`
}

type TbNLBHealthCheckerReq

type TbNLBHealthCheckerReq struct {
	Interval  string `json:"interval" example:"default"`  // secs, Interval time between health checks.
	Timeout   string `json:"timeout" example:"default"`   // secs, Waiting time to decide an unhealthy VM when no response.
	Threshold string `json:"threshold" example:"default"` // num, The number of continuous health checks to change the VM status.
}

type TbNLBHealthInfo

type TbNLBHealthInfo struct {
	AllVMs       []string
	HealthyVMs   []string
	UnHealthyVMs []string
}

type TbNLBInfo

type TbNLBInfo struct {
	// ResourceType is the type of the resource
	ResourceType string `json:"resourceType"`

	// Id is unique identifier for the object
	Id string `json:"id" example:"aws-ap-southeast-1"`
	// Uid is universally unique identifier for the object, used for labelSelector
	Uid string `json:"uid,omitempty" example:"wef12awefadf1221edcf"`
	// CspResourceName is name assigned to the CSP resource. This name is internally used to handle the resource.
	CspResourceName string `json:"cspResourceName,omitempty" example:"we12fawefadf1221edcf"`
	// CspResourceId is resource identifier managed by CSP
	CspResourceId string `json:"cspResourceId,omitempty" example:"csp-06eb41e14121c550a"`

	// Name is human-readable string to represent the object
	Name string `json:"name" example:"aws-ap-southeast-1"`

	ConnectionName   string     `json:"connectionName"`
	ConnectionConfig ConnConfig `json:"connectionConfig"`

	Type  string // PUBLIC(V) | INTERNAL
	Scope string // REGION(V) | GLOBAL

	Listener TbNLBListenerInfo `json:"listener"`

	TargetGroup   TbNLBTargetGroupInfo   `json:"targetGroup"`
	HealthChecker TbNLBHealthCheckerInfo `json:"healthChecker"`

	CreatedTime time.Time

	Description          string     `json:"description"`
	Status               string     `json:"status"`
	KeyValueList         []KeyValue `json:"keyValueList"`
	AssociatedObjectList []string   `json:"associatedObjectList"`
	IsAutoGenerated      bool       `json:"isAutoGenerated"`
	Location             Location   `json:"location"`

	// SystemLabel is for describing the Resource in a keyword (any string can be used) for special System purpose
	SystemLabel string `json:"systemLabel" example:"Managed by CB-Tumblebug" default:""`
}

TbNLBInfo is a struct that represents TB nlb object.

type TbNLBListenerInfo

type TbNLBListenerInfo struct {
	Protocol string `json:"protocol" example:"TCP"`                                               // TCP|UDP
	IP       string `json:"ip" example:"x.x.x.x"`                                                 // Auto Generated and attached
	Port     string `json:"port" example:"80"`                                                    // 1-65535
	DNSName  string `json:"dnsName" example:"default-group-cd3.elb.ap-northeast-2.amazonaws.com"` // Optional, Auto Generated and attached

	KeyValueList []KeyValue `json:"keyValueList"`
}

TbNLBListenerInfo is a struct to handle NLB Listener information from the CB-Tumblebug's REST API response

type TbNLBReq

type TbNLBReq struct {
	Description string `json:"description"`
	// Existing NLB (used only for option=register)
	CspResourceId string `json:"cspResourceId"`

	Type  string `json:"type" validate:"required" enums:"PUBLIC,INTERNAL" example:"PUBLIC"` // PUBLIC(V) | INTERNAL
	Scope string `json:"scope" validate:"required" enums:"REGION,GLOBAL" example:"REGION"`  // REGION(V) | GLOBAL

	// Frontend
	Listener NLBListenerReq `json:"listener" validate:"required"`
	// Backend
	TargetGroup TbNLBTargetGroupReq `json:"targetGroup" validate:"required"`
	// HealthChecker
	HealthChecker TbNLBHealthCheckerReq `json:"healthChecker" validate:"required"`
}

TbNLBReq is a struct to handle 'Create nlb' request toward CB-Tumblebug.

type TbNLBTargetGroupInfo

type TbNLBTargetGroupInfo struct {
	Protocol string `json:"protocol" example:"TCP"` // TCP|HTTP|HTTPS
	Port     string `json:"port" example:"80"`      // Listener Port or 1-65535

	SubGroupId string   `json:"subGroupId" example:"g1"`
	VMs        []string `json:"vms"`

	KeyValueList []KeyValue
}

type TbNLBTargetGroupReq

type TbNLBTargetGroupReq struct {
	Protocol   string `json:"protocol" example:"TCP"` // TCP|HTTP|HTTPS
	Port       string `json:"port" example:"80"`      // Listener Port or 1-65535
	SubGroupId string `json:"subGroupId" example:"g1"`
}

type TbRegisterSubnetReq added in v0.9.9

type TbRegisterSubnetReq struct {
	ConnectionName string `json:"connectionName" validate:"required"`
	CspResourceId  string `json:"cspResourceId" validate:"required"`
	Name           string `json:"name" validate:"required"`
	Zone           string `json:"zone,omitempty"`
	Description    string `json:"description,omitempty"`
}

type TbRegisterVNetReq added in v0.9.9

type TbRegisterVNetReq struct {
	ConnectionName string `json:"connectionName" validate:"required"`
	CspResourceId  string `json:"cspResourceId" validate:"required"`
	Name           string `json:"name" validate:"required"`
	Description    string `json:"description,omitempty"`
}

TbRegisterVNetReq TbRegisterVNetReq contains the information needed to register a vNet that has already been created via another external method.

type TbScaleOutSubGroupReq

type TbScaleOutSubGroupReq struct {
	// Define addtional VMs to scaleOut
	NumVMsToAdd string `json:"numVMsToAdd" validate:"required" example:"2"`
}

TbVmReq is struct to get requirements to create a new server instance

type TbSecurityGroupInfo

type TbSecurityGroupInfo struct {
	// ResourceType is the type of the resource
	ResourceType string `json:"resourceType"`

	// Id is unique identifier for the object
	Id string `json:"id" example:"aws-ap-southeast-1"`
	// Uid is universally unique identifier for the object, used for labelSelector
	Uid string `json:"uid,omitempty" example:"wef12awefadf1221edcf"`
	// CspResourceName is name assigned to the CSP resource. This name is internally used to handle the resource.
	CspResourceName string `json:"cspResourceName,omitempty" example:"we12fawefadf1221edcf"`
	// CspResourceId is resource identifier managed by CSP
	CspResourceId string `json:"cspResourceId,omitempty" example:"csp-06eb41e14121c550a"`

	// Name is human-readable string to represent the object
	Name string `json:"name" example:"aws-ap-southeast-1"`

	ConnectionName   string     `json:"connectionName"`
	ConnectionConfig ConnConfig `json:"connectionConfig"`

	VNetId               string               `json:"vNetId"`
	Description          string               `json:"description"`
	FirewallRules        []TbFirewallRuleInfo `json:"firewallRules"`
	KeyValueList         []KeyValue           `json:"keyValueList"`
	AssociatedObjectList []string             `json:"associatedObjectList"`
	IsAutoGenerated      bool                 `json:"isAutoGenerated"`

	// SystemLabel is for describing the Resource in a keyword (any string can be used) for special System purpose
	SystemLabel string `json:"systemLabel" example:"Managed by CB-Tumblebug" default:""`
}

TbSecurityGroupInfo is a struct that represents TB security group object.

type TbSecurityGroupReq

type TbSecurityGroupReq struct {
	Name           string                `json:"name" validate:"required"`
	ConnectionName string                `json:"connectionName" validate:"required"`
	VNetId         string                `json:"vNetId" validate:"required"`
	Description    string                `json:"description"`
	FirewallRules  *[]TbFirewallRuleInfo `json:"firewallRules"` // validate:"required"`

	// CspResourceId is required to register object from CSP (option=register)
	CspResourceId string `json:"cspResourceId"`
}

TbSecurityGroupReq is a struct to handle 'Create security group' request toward CB-Tumblebug.

type TbSetK8sNodeGroupAutoscalingReq

type TbSetK8sNodeGroupAutoscalingReq struct {
	OnAutoScaling string `json:"onAutoScaling" example:"true"`
}

TbSetK8sNodeGroupAutoscalingReq is a struct to handle 'Set K8sNodeGroup's Autoscaling' request toward CB-Tumblebug.

type TbSetK8sNodeGroupAutoscalingRes

type TbSetK8sNodeGroupAutoscalingRes struct {
	Result string `json:"result" example:"true"`
}

TbSetK8sNodeGroupAutoscalingRes is a struct to handle 'Set K8sNodeGroup's Autoscaling' response from CB-Tumblebug.

type TbSpecInfo

type TbSpecInfo struct {
	// Id is unique identifier for the object
	Id string `json:"id" example:"aws-ap-southeast-1" gorm:"primaryKey"`
	// Uid is universally unique identifier for the object, used for labelSelector
	Uid string `json:"uid,omitempty" example:"wef12awefadf1221edcf"`

	// CspSpecName is name of the spec given by CSP
	CspSpecName string `json:"cspSpecName,omitempty" example:"csp-06eb41e14121c550a"`

	// Name is human-readable string to represent the object
	Name           string `json:"name" example:"aws-ap-southeast-1"`
	Namespace      string `json:"namespace,omitempty" example:"default" gorm:"primaryKey"`
	ConnectionName string `json:"connectionName,omitempty"`
	ProviderName   string `json:"providerName,omitempty"`
	RegionName     string `json:"regionName,omitempty"`
	// InfraType can be one of vm|k8s|kubernetes|container, etc.
	InfraType             string   `json:"infraType,omitempty"`
	Architecture          string   `json:"architecture,omitempty" example:"x86_64"`
	OsType                string   `json:"osType,omitempty"`
	VCPU                  uint16   `json:"vCPU,omitempty"`
	MemoryGiB             float32  `json:"memoryGiB,omitempty"`
	DiskSizeGB            float32  `json:"diskSizeGB,omitempty"`
	MaxTotalStorageTiB    uint16   `json:"maxTotalStorageTiB,omitempty"`
	NetBwGbps             uint16   `json:"netBwGbps,omitempty"`
	AcceleratorModel      string   `json:"acceleratorModel,omitempty"`
	AcceleratorCount      uint8    `json:"acceleratorCount,omitempty"`
	AcceleratorMemoryGB   float32  `json:"acceleratorMemoryGB,omitempty"`
	AcceleratorType       string   `json:"acceleratorType,omitempty"`
	CostPerHour           float32  `json:"costPerHour,omitempty"`
	Description           string   `json:"description,omitempty"`
	OrderInFilteredResult uint16   `json:"orderInFilteredResult,omitempty"`
	EvaluationStatus      string   `json:"evaluationStatus,omitempty"`
	EvaluationScore01     float32  `json:"evaluationScore01"`
	EvaluationScore02     float32  `json:"evaluationScore02"`
	EvaluationScore03     float32  `json:"evaluationScore03"`
	EvaluationScore04     float32  `json:"evaluationScore04"`
	EvaluationScore05     float32  `json:"evaluationScore05"`
	EvaluationScore06     float32  `json:"evaluationScore06"`
	EvaluationScore07     float32  `json:"evaluationScore07"`
	EvaluationScore08     float32  `json:"evaluationScore08"`
	EvaluationScore09     float32  `json:"evaluationScore09"`
	EvaluationScore10     float32  `json:"evaluationScore10"`
	RootDiskType          string   `json:"rootDiskType"`
	RootDiskSize          string   `json:"rootDiskSize"`
	AssociatedObjectList  []string `json:"associatedObjectList,omitempty" gorm:"type:text;serializer:json"`
	IsAutoGenerated       bool     `json:"isAutoGenerated,omitempty"`

	// SystemLabel is for describing the Resource in a keyword (any string can be used) for special System purpose
	SystemLabel string     `json:"systemLabel,omitempty" example:"Managed by CB-Tumblebug" default:""`
	Details     []KeyValue `json:"details" gorm:"type:text;serializer:json"`
}

TbSpecInfo is a struct that represents TB spec object.

type TbSpecReq

type TbSpecReq struct {
	// Name is human-readable string to represent the object, used to generate Id
	Name           string `json:"name" validate:"required"`
	ConnectionName string `json:"connectionName" validate:"required"`
	// CspSpecName is name of the spec given by CSP
	CspSpecName string `json:"cspSpecName" validate:"required"`
	Description string `json:"description"`
}

TbSpecReq is a struct to handle 'Register spec' request toward CB-Tumblebug.

type TbSshKeyInfo

type TbSshKeyInfo struct {
	// ResourceType is the type of the resource
	ResourceType string `json:"resourceType"`

	// Id is unique identifier for the object
	Id string `json:"id" example:"aws-ap-southeast-1"`
	// Uid is universally unique identifier for the object, used for labelSelector
	Uid string `json:"uid,omitempty" example:"wef12awefadf1221edcf"`
	// CspResourceName is name assigned to the CSP resource. This name is internally used to handle the resource.
	CspResourceName string `json:"cspResourceName,omitempty" example:"we12fawefadf1221edcf"`
	// CspResourceId is resource identifier managed by CSP
	CspResourceId string `json:"cspResourceId,omitempty" example:"csp-06eb41e14121c550a"`

	// Name is human-readable string to represent the object
	Name string `json:"name" example:"aws-ap-southeast-1"`

	ConnectionName   string     `json:"connectionName,omitempty"`
	ConnectionConfig ConnConfig `json:"connectionConfig"`

	Description string `json:"description,omitempty"`

	Fingerprint          string     `json:"fingerprint,omitempty"`
	Username             string     `json:"username,omitempty"`
	VerifiedUsername     string     `json:"verifiedUsername,omitempty"`
	PublicKey            string     `json:"publicKey,omitempty"`
	PrivateKey           string     `json:"privateKey,omitempty"`
	KeyValueList         []KeyValue `json:"keyValueList,omitempty"`
	AssociatedObjectList []string   `json:"associatedObjectList,omitempty"`
	IsAutoGenerated      bool       `json:"isAutoGenerated,omitempty"`

	// SystemLabel is for describing the Resource in a keyword (any string can be used) for special System purpose
	SystemLabel string `json:"systemLabel,omitempty" example:"Managed by CB-Tumblebug" default:""`
}

TbSshKeyInfo is a struct that represents TB SSH key object.

type TbSshKeyReq

type TbSshKeyReq struct {
	Name           string `json:"name" validate:"required"`
	ConnectionName string `json:"connectionName" validate:"required"`
	Description    string `json:"description"`

	// Fields for "Register existing SSH keys" feature
	// CspResourceId is required to register object from CSP (option=register)
	CspResourceId    string `json:"cspResourceId"`
	Fingerprint      string `json:"fingerprint"`
	Username         string `json:"username"`
	VerifiedUsername string `json:"verifiedUsername"`
	PublicKey        string `json:"publicKey"`
	PrivateKey       string `json:"privateKey"`
}

TbSshKeyReq is a struct to handle 'Create SSH key' request toward CB-Tumblebug.

type TbSubGroupInfo

type TbSubGroupInfo struct {
	// ResourceType is the type of the resource
	ResourceType string `json:"resourceType"`

	// Id is unique identifier for the object
	Id string `json:"id" example:"aws-ap-southeast-1"`
	// Uid is universally unique identifier for the object, used for labelSelector
	Uid string `json:"uid,omitempty" example:"wef12awefadf1221edcf"`
	// Name is human-readable string to represent the object
	Name string `json:"name" example:"aws-ap-southeast-1"`

	VmId         []string `json:"vmId"`
	SubGroupSize string   `json:"subGroupSize"`
}

TbSubGroupInfo is struct to define an object that includes homogeneous VMs

type TbSubnetInfo

type TbSubnetInfo struct {
	// ResourceType is the type of the resource
	ResourceType string `json:"resourceType"`

	// Id is unique identifier for the object
	Id string `json:"id" example:"aws-ap-southeast-1"`
	// Uid is universally unique identifier for the object, used for labelSelector
	Uid string `json:"uid,omitempty" example:"wef12awefadf1221edcf"`
	// CspResourceName is name assigned to the CSP resource. This name is internally used to handle the resource.
	CspResourceName string `json:"cspResourceName,omitempty" example:"we12fawefadf1221edcf"`
	// CspResourceId is resource identifier managed by CSP
	CspResourceId string `json:"cspResourceId,omitempty" example:"csp-06eb41e14121c550a"`

	// Name is human-readable string to represent the object
	Name             string     `json:"name" example:"aws-ap-southeast-1"`
	ConnectionName   string     `json:"connectionName"`
	ConnectionConfig ConnConfig `json:"connectionConfig"`

	// CspVNetName is identifier to handle CSP vNet resource
	CspVNetName string `json:"cspVNetName,omitempty" example:"we12fawefadf1221edcf"`
	// CspVNetId is vNet resource identifier managed by CSP
	CspVNetId    string        `json:"cspVNetId,omitempty" example:"csp-45eb41e14121c550a"`
	Status       string        `json:"status"`
	IPv4_CIDR    string        `json:"ipv4_CIDR"`
	Zone         string        `json:"zone,omitempty"`
	BastionNodes []BastionNode `json:"bastionNodes,omitempty"`
	KeyValueList []KeyValue    `json:"keyValueList,omitempty"`
	Description  string        `json:"description"`
}

TbSubnetInfo is a struct that represents TB subnet object.

type TbSubnetReq

type TbSubnetReq struct {
	Name        string `json:"name" validate:"required" example:"subnet00"`
	IPv4_CIDR   string `json:"ipv4_CIDR" validate:"required" example:"10.0.1.0/24"`
	Zone        string `json:"zone,omitempty" default:""`
	Description string `json:"description,omitempty" example:"subnet00 managed by CB-Tumblebug"`
}

TbSubnetReq is a struct that represents TB subnet object.

type TbUpgradeK8sClusterReq

type TbUpgradeK8sClusterReq struct {
	Version string `json:"version" example:"1.30.1-alyun.1"`
}

TbUpgradeK8sClusterReq is a struct to handle 'Upgrade K8sCluster' request toward CB-Tumblebug.

type TbVNetInfo

type TbVNetInfo struct {
	// ResourceType is the type of the resource
	ResourceType string `json:"resourceType"`

	// Id is unique identifier for the object
	Id string `json:"id" example:"aws-ap-southeast-1"`
	// Uid is universally unique identifier for the object, used for labelSelector
	Uid string `json:"uid,omitempty" example:"wef12awefadf1221edcf"`
	// CspResourceName is name assigned to the CSP resource. This name is internally used to handle the resource.
	CspResourceName string `json:"cspResourceName,omitempty" example:"we12fawefadf1221edcf"`
	// CspResourceId is resource identifier managed by CSP
	CspResourceId string `json:"cspResourceId,omitempty" example:"csp-06eb41e14121c550a"`

	// Name is human-readable string to represent the object
	Name             string     `json:"name" example:"aws-ap-southeast-1"`
	ConnectionName   string     `json:"connectionName"`
	ConnectionConfig ConnConfig `json:"connectionConfig"`

	CidrBlock            string         `json:"cidrBlock"`
	SubnetInfoList       []TbSubnetInfo `json:"subnetInfoList"`
	Description          string         `json:"description"`
	Status               string         `json:"status"`
	KeyValueList         []KeyValue     `json:"keyValueList,omitempty"`
	AssociatedObjectList []string       `json:"associatedObjectList"`
	IsAutoGenerated      bool           `json:"isAutoGenerated"`

	// SystemLabel is for describing the Resource in a keyword (any string can be used) for special System purpose
	SystemLabel string `json:"systemLabel" example:"Managed by CB-Tumblebug" default:""`
}

TbVNetInfo is a struct that represents TB vNet object.

type TbVNetReq

type TbVNetReq struct {
	Name           string        `json:"name" validate:"required" example:"vnet00"`
	ConnectionName string        `json:"connectionName" validate:"required" example:"aws-ap-northeast-2"`
	CidrBlock      string        `json:"cidrBlock" example:"10.0.0.0/16"`
	SubnetInfoList []TbSubnetReq `json:"subnetInfoList"`
	Description    string        `json:"description" example:"vnet00 managed by CB-Tumblebug"`
}

TbVNetReq is a struct to handle 'Create vNet' request toward CB-Tumblebug.

type TbVmDynamicReq

type TbVmDynamicReq struct {
	// VM name or subGroup name if is (not empty) && (> 0). If it is a group, actual VM name will be generated with -N postfix.
	Name string `json:"name" example:"g1-1"`

	// if subGroupSize is (not empty) && (> 0), subGroup will be generated. VMs will be created accordingly.
	SubGroupSize string `json:"subGroupSize" example:"3" default:"1"`

	// Label is for describing the object by keywords
	Label map[string]string `json:"label"`

	Description string `json:"description" example:"Description"`

	// CommonSpec is field for id of a spec in common namespace
	CommonSpec string `json:"commonSpec" validate:"required" example:"aws+ap-northeast-2+t2.small"`
	// CommonImage is field for id of a image in common namespace
	CommonImage string `json:"commonImage" validate:"required" example:"ubuntu18.04"`

	RootDiskType string `json:"rootDiskType,omitempty" example:"default, TYPE1, ..." default:"default"`  // "", "default", "TYPE1", AWS: ["standard", "gp2", "gp3"], Azure: ["PremiumSSD", "StandardSSD", "StandardHDD"], GCP: ["pd-standard", "pd-balanced", "pd-ssd", "pd-extreme"], ALIBABA: ["cloud_efficiency", "cloud", "cloud_essd"], TENCENT: ["CLOUD_PREMIUM", "CLOUD_SSD"]
	RootDiskSize string `json:"rootDiskSize,omitempty" example:"default, 30, 42, ..." default:"default"` // "default", Integer (GB): ["50", ..., "1000"]

	VmUserPassword string `json:"vmUserPassword,omitempty" default:""`
	// if ConnectionName is given, the VM tries to use associtated credential.
	// if not, it will use predefined ConnectionName in Spec objects
	ConnectionName string `json:"connectionName,omitempty" default:""`
}

TbVmDynamicReq is struct to get requirements to create a new server instance dynamically (with default resource option)

type TbVmInfo

type TbVmInfo struct {
	// ResourceType is the type of the resource
	ResourceType string `json:"resourceType"`

	// Id is unique identifier for the object
	Id string `json:"id" example:"aws-ap-southeast-1"`
	// Uid is universally unique identifier for the object, used for labelSelector
	Uid string `json:"uid,omitempty" example:"wef12awefadf1221edcf"`
	// CspResourceName is name assigned to the CSP resource. This name is internally used to handle the resource.
	CspResourceName string `json:"cspResourceName,omitempty" example:"we12fawefadf1221edcf"`
	// CspResourceId is resource identifier managed by CSP
	CspResourceId string `json:"cspResourceId,omitempty" example:"csp-06eb41e14121c550a"`

	// Name is human-readable string to represent the object
	Name string `json:"name" example:"aws-ap-southeast-1"`

	// defined if the VM is in a group
	SubGroupId string `json:"subGroupId"`

	Location Location `json:"location"`

	// Required by CB-Tumblebug
	Status       string `json:"status"`
	TargetStatus string `json:"targetStatus"`
	TargetAction string `json:"targetAction"`

	// Montoring agent status
	MonAgentStatus string `json:"monAgentStatus" example:"[installed, notInstalled, failed]"` // yes or no// installed, notInstalled, failed

	// NetworkAgent status
	NetworkAgentStatus string `json:"networkAgentStatus" example:"[notInstalled, installing, installed, failed]"` // notInstalled, installing, installed, failed

	// Latest system message such as error message
	SystemMessage string `json:"systemMessage" example:"Failed because ..." default:""` // systeam-given string message

	// Created time
	CreatedTime string `json:"createdTime" example:"2022-11-10 23:00:00" default:""`

	Label       map[string]string `json:"label"`
	Description string            `json:"description"`

	Region       RegionInfo `json:"region"` // AWS, ex) {us-east1, us-east1-c} or {ap-northeast-2}
	PublicIP     string     `json:"publicIP"`
	SSHPort      string     `json:"sshPort"`
	PublicDNS    string     `json:"publicDNS"`
	PrivateIP    string     `json:"privateIP"`
	PrivateDNS   string     `json:"privateDNS"`
	RootDiskType string     `json:"rootDiskType"`
	RootDiskSize string     `json:"rootDiskSize"`
	RootDiskName string     `json:"rootDiskName"`

	ConnectionName   string     `json:"connectionName"`
	ConnectionConfig ConnConfig `json:"connectionConfig"`
	SpecId           string     `json:"specId"`
	CspSpecName      string     `json:"cspSpecName"`
	ImageId          string     `json:"imageId"`
	CspImageName     string     `json:"cspImageName"`
	VNetId           string     `json:"vNetId"`
	CspVNetId        string     `json:"cspVNetId"`
	SubnetId         string     `json:"subnetId"`
	CspSubnetId      string     `json:"cspSubnetId"`
	NetworkInterface string     `json:"networkInterface"`
	SecurityGroupIds []string   `json:"securityGroupIds"`
	DataDiskIds      []string   `json:"dataDiskIds"`
	SshKeyId         string     `json:"sshKeyId"`
	CspSshKeyId      string     `json:"cspSshKeyId"`
	VmUserName       string     `json:"vmUserName,omitempty"`
	VmUserPassword   string     `json:"vmUserPassword,omitempty"`

	AddtionalDetails []KeyValue `json:"addtionalDetails,omitempty"`
}

TbVmInfo is struct to define a server instance object

type TbVmPriority

type TbVmPriority struct {
	Priority string     `json:"priority"`
	VmSpec   TbSpecInfo `json:"vmSpec"`
}

TbVmPriority is struct for TbVmPriority

type TbVmRecommendInfo

type TbVmRecommendInfo struct {
	VmReq          TbVmRecommendReq `json:"vmReq"`
	VmPriority     []TbVmPriority   `json:"vmPriority"`
	PlacementAlgo  string           `json:"placementAlgo"`
	PlacementParam []KeyValue       `json:"placementParam"`
}

TbVmRecommendInfo is struct for TbVmRecommendInfo

type TbVmRecommendReq

type TbVmRecommendReq struct {
	RequestName  string `json:"requestName"`
	MaxResultNum string `json:"maxResultNum"`

	VcpuSize   string `json:"vcpuSize"`
	MemorySize string `json:"memorySize"`
	DiskSize   string `json:"diskSize"`

	PlacementAlgo  string     `json:"placementAlgo"`
	PlacementParam []KeyValue `json:"placementParam"`
}

TbVmRecommendReq is struct for TbVmRecommendReq

type TbVmReq

type TbVmReq struct {
	// VM name or subGroup name if is (not empty) && (> 0). If it is a group, actual VM name will be generated with -N postfix.
	Name string `json:"name" validate:"required" example:"g1-1"`

	// CspResourceId is resource identifier managed by CSP (required for option=register)
	CspResourceId string `json:"cspResourceId,omitempty" example:"i-014fa6ede6ada0b2c"`

	// if subGroupSize is (not empty) && (> 0), subGroup will be generated. VMs will be created accordingly.
	SubGroupSize string `json:"subGroupSize" example:"3" default:""`

	// Label is for describing the object by keywords
	Label map[string]string `json:"label"`

	Description string `json:"description" example:"Description"`

	ConnectionName string `json:"connectionName" validate:"required" example:"testcloud01-seoul"`
	SpecId         string `json:"specId" validate:"required"`
	// ImageType        string   `json:"imageType"`
	ImageId          string   `json:"imageId" validate:"required"`
	VNetId           string   `json:"vNetId" validate:"required"`
	SubnetId         string   `json:"subnetId" validate:"required"`
	SecurityGroupIds []string `json:"securityGroupIds" validate:"required"`
	SshKeyId         string   `json:"sshKeyId" validate:"required"`
	VmUserName       string   `json:"vmUserName,omitempty"`
	VmUserPassword   string   `json:"vmUserPassword,omitempty"`
	RootDiskType     string   `json:"rootDiskType,omitempty" example:"default, TYPE1, ..."`  // "", "default", "TYPE1", AWS: ["standard", "gp2", "gp3"], Azure: ["PremiumSSD", "StandardSSD", "StandardHDD"], GCP: ["pd-standard", "pd-balanced", "pd-ssd", "pd-extreme"], ALIBABA: ["cloud_efficiency", "cloud", "cloud_ssd"], TENCENT: ["CLOUD_PREMIUM", "CLOUD_SSD"]
	RootDiskSize     string   `json:"rootDiskSize,omitempty" example:"default, 30, 42, ..."` // "default", Integer (GB): ["50", ..., "1000"]
	DataDiskIds      []string `json:"dataDiskIds"`
}

TbVmReq is struct to get requirements to create a new server instance

type TbVmSnapshotReq

type TbVmSnapshotReq struct {
	Name string `json:"name" example:"aws-ap-southeast-1-snapshot"`
}

TbVmSnapshotReq is a struct to handle 'Create VM snapshot' request toward CB-Tumblebug.

type TbVmStatusInfo

type TbVmStatusInfo struct {

	// Id is unique identifier for the object
	Id string `json:"id" example:"aws-ap-southeast-1"`
	// Uid is universally unique identifier for the object, used for labelSelector
	Uid string `json:"uid,omitempty" example:"wef12awefadf1221edcf"`
	// CspResourceName is name assigned to the CSP resource. This name is internally used to handle the resource.
	CspResourceName string `json:"cspResourceName,omitempty" example:"we12fawefadf1221edcf"`
	// CspResourceId is resource identifier managed by CSP
	CspResourceId string `json:"cspResourceId,omitempty" example:"csp-06eb41e14121c550a"`

	// Name is human-readable string to represent the object
	Name string `json:"name" example:"aws-ap-southeast-1"`

	Status       string `json:"status"`
	TargetStatus string `json:"targetStatus"`
	TargetAction string `json:"targetAction"`
	NativeStatus string `json:"nativeStatus"`

	// Montoring agent status
	MonAgentStatus string `json:"monAgentStatus" example:"[installed, notInstalled, failed]"` // yes or no// installed, notInstalled, failed

	// Latest system message such as error message
	SystemMessage string `json:"systemMessage" example:"Failed because ..." default:""` // systeam-given string message

	// Created time
	CreatedTime string `json:"createdTime" example:"2022-11-10 23:00:00" default:""`

	PublicIp  string `json:"publicIp"`
	PrivateIp string `json:"privateIp"`
	SSHPort   string `json:"sshPort"`

	Location Location `json:"location"`
}

TbVmStatusInfo is to define simple information of VM with updated status

type TencentSpecificProperty added in v0.10.7

type TencentSpecificProperty struct {
}

* Note: nothing is needed for Tencent currently.

type VNetDesignRequest added in v0.9.10

type VNetDesignRequest struct {
	DesiredPrivateNetwork string                      `json:"desiredPrivateNetwork"`
	SupernettingEnabled   string                      `json:"supernettingEnabled"`
	McNetConfigurations   []McNetConfigurationDetails `json:"mcNetConfigurations"`
}

VNetDesignRequest is a struct to handle the utility function, DesignVNet()

type VNetDesignResponse added in v0.9.10

type VNetDesignResponse struct {
	RootNetworkCIDR string      `json:"rootNetworkCIDR,omitempty"` // in case of supernetting enabled
	VNetReqList     []TbVNetReq `json:"vNetReqList"`
}

type VNetDetail added in v0.10.7

type VNetDetail struct {
	PrefixLength PrefixLengthDetail `mapstructure:"prefix-length" json:"prefixLength"`
}

VNetDetail is structure for virtual network configuration

type VNetDetails added in v0.9.18

type VNetDetails struct {
	SubnetCount    string `json:"subnetCount"`
	HostsPerSubnet string `json:"hostsPerSubnet"`
	UseFirstNZones string `json:"useFirstNZones"`
}

type VPNDetail added in v0.10.7

type VPNDetail struct {
	GatewaySubnet GatewaySubnetDetail `mapstructure:"gateway-subnet" json:"gatewaySubnet"`
}

VPNDetail is structure for VPN configuration

type VpnIdList added in v0.9.22

type VpnIdList struct {
	VpnIdList []string `json:"vpnIdList"`
}

type VpnInfo added in v0.10.7

type VpnInfo struct {
	// ResourceType is the type of the resource
	ResourceType string `json:"resourceType"`

	// Id is unique identifier for the object
	Id string `json:"id" example:"vpn01"`
	// Uid is universally unique identifier for the object, used for labelSelector
	Uid string `json:"uid,omitempty" example:"wef12awefadf1221edcf"`

	// Name is human-readable string to represent the object
	Name        string          `json:"name" example:"vpn01"`
	Description string          `json:"description"`
	Status      string          `json:"status"`
	VpnSites    []VpnSiteDetail `json:"vpnSites"`
}

type VpnInfoList added in v0.9.22

type VpnInfoList struct {
	VpnInfoList []VpnInfo `json:"vpnInfoList"`
}

type VpnSiteDetail added in v0.10.7

type VpnSiteDetail struct {
	ConnectionName   string     `json:"connectionName"`
	ConnectionConfig ConnConfig `json:"connectionConfig"`

	// ResourceDetails represents a CSP's multiple resources associated with the VPN from a CSP.
	ResourceDetails []ResourceDetail `json:"resourceDetails"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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