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
- Variables
- func BatchStoreLatencyInfo(latencyData []LatencyInfo) error
- func GetLabelConstantsMap() map[string]string
- func GetLabelTypes() []string
- func GetLatencyValue(sourceRegion, targetRegion string) (float64, error)
- func StoreLatencyInfo(sourceRegion, targetRegion string, latencyMs float64) error
- type AgentInstallContent
- type AgentInstallContentWrapper
- type AlibabaSpecificProperty
- type AttachDetachDataDiskReq
- type AutoAction
- type AutoCondition
- type AvailableZonesError
- type AvailableZonesInfo
- type AwsSpecificProperty
- type AzureSpecificProperty
- type BasicImageRules
- type BastionInfo
- type BastionNode
- type BenchmarkInfo
- type BenchmarkInfoArray
- type BenchmarkReq
- type Bucket
- type Buckets
- type BuildAgnosticImageReq
- type BuildAgnosticImageResult
- type CIDRBlockDetail
- type CSPDetail
- type CSPIgnorePatterns
- type CSPNetworkDetail
- type ChangeK8sNodeGroupAutoscaleSizeReq
- type ChangeK8sNodeGroupAutoscaleSizeRes
- type CheckK8sClusterDynamicReqInfo
- type CheckMciDynamicReqInfo
- type CheckNodeDynamicReqInfo
- type CheckSubGroupDynamicReqInfo
- type Cloud
- type CloudDriverInfo
- type CloudInfo
- type CloudNetworkInfo
- type CloudSetting
- type CloudSpecIgnoreConfig
- type CommandExecutionStatus
- type CommandStatusFilter
- type CommandStatusInfo
- type CommandStatusListResponse
- type ConfigInfo
- type ConfigReq
- type ConnConfig
- type ConnConfigList
- type ControlVmResult
- type ControlVmResultWrapper
- type CorsRule
- type CreateSubGroupDynamicReq
- type CreateSubGroupReq
- type Credential
- type CredentialInfo
- type CredentialReq
- type CspResourceStatusRequest
- type CspResourceStatusResponse
- type CspSpecificProperty
- type CustomImageReq
- type CustomImageStatus
- type DataDiskInfo
- type DataDiskReq
- type DataDiskUpsizeReq
- type DataDiskVmReq
- type DfAgentInstallReq
- type DiskStatus
- type ExtractPatterns
- type ExtractPatternsInfo
- type FilterAvailableValues
- type FilterCondition
- type FilterConditionExample
- type FilterInfo
- type FilterOptionsInfo
- type FilterSpecsByRangeRequest
- type FirewallRuleInfo
- type FirewallRuleReq
- type GatewaySubnetDetail
- type GcpSpecificProperty
- type GetAvailableRegionZonesListRequest
- type GetAvailableRegionZonesRequest
- type GlobalIgnorePatterns
- type HandlingCommandCountResponse
- type IID
- type IbmSpecificProperty
- type IdList
- type IdNameInDetailInfo
- type ImageFetchOption
- type ImageInfo
- type ImageReq
- type ImageRiskInfo
- type ImageSourceCommandHistory
- type ImageStatus
- type InspectResource
- type InspectResourceAllResult
- type InspectResourceResult
- type InspectResourcesRequest
- type InspectResourcesResponse
- type K8sAccessInfo
- type K8sAddonsInfo
- type K8sClusterAssetInfo
- type K8sClusterConnectionConfigCandidatesReq
- type K8sClusterContainerCmdReq
- type K8sClusterContainerCmdResult
- type K8sClusterContainerCmdResults
- type K8sClusterDetail
- type K8sClusterDynamicReq
- type K8sClusterFailedInfo
- type K8sClusterInfo
- type K8sClusterNetworkInfo
- type K8sClusterNodeGroupsOnCreation
- type K8sClusterNodeImageDesignation
- type K8sClusterNodeImageDetail
- type K8sClusterNodeImageDetailAvailable
- type K8sClusterReq
- type K8sClusterRequiredSubnetCount
- type K8sClusterRootDiskDetail
- type K8sClusterRootDiskDetailSize
- type K8sClusterRootDiskDetailType
- type K8sClusterSetting
- type K8sClusterStatus
- type K8sClusterVersionDetail
- type K8sClusterVersionDetailAvailable
- type K8sMultiClusterDynamicReq
- type K8sMultiClusterInfo
- type K8sNodeGroupDynamicReq
- type K8sNodeGroupInfo
- type K8sNodeGroupReq
- type K8sNodeGroupStatus
- type K8sNodeInfo
- type KeyValue
- type KeyWithEncryptedValue
- type Label
- type LabelInfo
- type LabelableResource
- type LatencyInfo
- type Location
- type McNetConfigurationDetails
- type McNlbInfo
- type MciAccessInfo
- type MciAssociatedResourceList
- type MciCmdReq
- type MciConnectionConfigCandidatesReq
- type MciCreationErrors
- type MciDynamicReq
- type MciHandlingCommandCountResponse
- type MciInfo
- type MciPolicyInfo
- type MciPolicyReq
- type MciRecommendReq
- type MciReq
- type MciSnapshotResult
- type MciSshCmdResult
- type MciSshCmdResultForAPI
- type MciStatusInfo
- type MciSubGroupAccessInfo
- type MciVmAccessInfo
- type MonAgentInstallReq
- type MonResultSimple
- type MonResultSimpleResponse
- type MultihostBenchmarkReq
- type NLBAddRemoveVMReq
- type NLBHealthCheckerInfo
- type NLBHealthCheckerReq
- type NLBHealthInfo
- type NLBInfo
- type NLBListenerInfo
- type NLBListenerReq
- type NLBReq
- type NLBTargetGroupInfo
- type NLBTargetGroupReq
- type NlbSetting
- type Nlbsw
- type NsInfo
- type NsReq
- type OSArchitecture
- type OSPlatform
- type OSTypeDetail
- type Object
- type ObjectStorageCreateRequest
- type ObjectStorageGetCorsResponse
- type ObjectStorageGetVersioningResponse
- type ObjectStorageInfo
- type ObjectStorageListObjectVersionsResponse
- type ObjectStorageListObjectsResponse
- type ObjectStorageListResponse
- type ObjectStorageLocationResponse
- type ObjectStoragePresignedUrlResponse
- type ObjectStorageSetCorsRequest
- type ObjectStorageSetVersioningRequest
- type ObjectVersion
- type Operation
- type OperationExample
- type OptionalParameter
- type OverallRiskInfo
- type Owner
- type ParameterKeyVal
- type ParameterKeyValExample
- type ParameterOptionDetail
- type ParameterOptionsInfo
- type PatternSet
- type Policy
- type PrefixLengthDetail
- type PriorityCondition
- type PriorityConditionExample
- type PriorityInfo
- type PriorityOptionsInfo
- type ProvisioningEvent
- type ProvisioningLog
- type PublicKeyResponse
- type Range
- type RecommendSpecReq
- type RecommendSpecRequestOptions
- type RegionDetail
- type RegionDetails
- type RegionIgnorePatterns
- type RegionInfo
- type RegionList
- type RegionZoneInfo
- type RegisterResourceAllResult
- type RegisterResourceResult
- type RegisterSubnetReq
- type RegisterVNetReq
- type RegisterationOverview
- type RequiredAWSResourceForSqlDB
- type RequiredAzureResourceForSqlDB
- type RequiredCSPResourceForSqlDB
- type RequiredNCPResourceForSqlDB
- type ReservedIPsDetail
- type ResourceCountOverview
- type ResourceDetail
- type ResourceIds
- type ResourceOnCsp
- type ResourceOnCspInfo
- type ResourceOnSpider
- type ResourceOnSpiderInfo
- type ResourceOnTumblebug
- type ResourceOnTumblebugInfo
- type ResourceStatusInfo
- type ResourcesByManageType
- type Response
- type RestPostSqlDBRequest
- type RestPostVpnRequest
- type RestWrapperSecurityGroupUpdateResponse
- type RetrievedRegionList
- type ReviewMciDynamicReqInfo
- type ReviewResourceSummary
- type ReviewResourceValidation
- type ReviewSubGroupDynamicReqInfo
- type RiskAnalysis
- type RuntimeConfig
- type ScaleOutSubGroupReq
- type ScheduleJobListResponse
- type ScheduleJobRequest
- type ScheduleJobStatus
- type SearchImageRequest
- type SearchImageRequestOptions
- type SearchImageResponse
- type SecurityGroupInfo
- type SecurityGroupReq
- type SecurityGroupUpdateReq
- type SecurityGroupUpdateResponse
- type SetK8sNodeGroupAutoscalingReq
- type SetK8sNodeGroupAutoscalingRes
- type SimpleMsg
- type SiteDetail
- type SiteProperty
- type SitesInfo
- type SnapshotReq
- type SpecAvailabilityBatchResult
- type SpecAvailabilityInfo
- type SpecBenchmarkInfo
- type SpecCleanupResult
- type SpecFetchOption
- type SpecImagePairReviewReq
- type SpecImagePairReviewResult
- type SpecInfo
- type SpecRegionZoneInfo
- type SpecReq
- type SpecRiskInfo
- type SpecsToIgnoreData
- type SpiderAccessInfo
- type SpiderAddonsInfo
- type SpiderAllList
- type SpiderAllListWrapper
- type SpiderAllVpcInfoWrapper
- type SpiderAllVpcListInfo
- type SpiderChangeAutoscaleSizeReq
- type SpiderChangeAutoscaleSizeReqInfo
- type SpiderChangeAutoscaleSizeRes
- type SpiderCloudPrice
- type SpiderClusterInfo
- type SpiderClusterReq
- type SpiderClusterReqInfo
- type SpiderClusterRes
- type SpiderClusterStatus
- type SpiderConnConfig
- type SpiderConnectionName
- type SpiderDiskAttachDetachReq
- type SpiderDiskAttachDetachReqWrapper
- type SpiderDiskInfo
- type SpiderDiskReqInfoWrapper
- type SpiderDiskUpsizeReq
- type SpiderDiskUpsizeReqWrapper
- type SpiderGpuInfo
- type SpiderImageInfo
- type SpiderImageList
- type SpiderImageReqInfoWrapper
- type SpiderImageType
- type SpiderKeyPairInfo
- type SpiderKeyPairReqInfoWrapper
- type SpiderMeta
- type SpiderMyImageInfo
- type SpiderMyImageRegisterReq
- type SpiderMyImageReq
- type SpiderNLBAddRemoveVMReqInfoWrapper
- type SpiderNLBHealthCheckerInfo
- type SpiderNLBHealthCheckerReq
- type SpiderNLBHealthInfo
- type SpiderNLBHealthInfoWrapper
- type SpiderNLBInfo
- type SpiderNLBListenerInfo
- type SpiderNLBReqInfo
- type SpiderNLBReqInfoWrapper
- type SpiderNLBSubGroupInfo
- type SpiderNLBSubGroupReq
- type SpiderNameIdSystemId
- type SpiderNetworkInfo
- type SpiderNodeGroupInfo
- type SpiderNodeGroupReq
- type SpiderNodeGroupReqInfo
- type SpiderNodeGroupStatus
- type SpiderOnDemand
- type SpiderPrice
- type SpiderPriceInfo
- type SpiderPriceInfoHandler
- type SpiderProductInfo
- type SpiderRegionZoneInfo
- type SpiderSecurityInfo
- type SpiderSecurityInfoList
- type SpiderSecurityReqInfoWrapper
- type SpiderSecurityRuleInfo
- type SpiderSecurityRuleReqInfoIntermediateWrapper
- type SpiderSecurityRuleReqInfoWrapper
- type SpiderSetAutoscalingReq
- type SpiderSetAutoscalingReqInfo
- type SpiderSetAutoscalingRes
- type SpiderSpecInfo
- type SpiderSpecInfoForNameOnly
- type SpiderSpecList
- type SpiderSubnetInfo
- type SpiderTagAddRequest
- type SpiderTagRemoveRequest
- type SpiderUpgradeClusterReq
- type SpiderUpgradeClusterReqInfo
- type SpiderVCpuInfo
- type SpiderVMInfo
- type SpiderVMReqInfo
- type SpiderVMReqInfoWrapper
- type SpiderVpcInfo
- type SqlDBInfo
- type SshCmdResult
- type SshCmdResultForAPI
- type SshHostKeyInfo
- type SshInfo
- type SshKeyInfo
- type SshKeyReq
- type StatusCountInfo
- type SubGroupInfo
- type SubnetDetail
- type SubnetInfo
- type SubnetReq
- type SystemLabelInfo
- type TencentSpecificProperty
- type UpdateScheduleJobRequest
- type UpdateSpecListByAvailabilityRequest
- type UpdateSummary
- type UpgradeK8sClusterReq
- type VNetDesignRequest
- type VNetDesignResponse
- type VNetDetail
- type VNetDetails
- type VNetInfo
- type VNetReq
- type VPNDetail
- type VmCreationError
- type VmInfo
- type VmPriority
- type VmRecommendInfo
- type VmRecommendReq
- type VmSnapshotResult
- type VmStatusInfo
- type VpnIdList
- type VpnInfo
- type VpnInfoList
- type VpnSiteDetail
Constants ¶
const ( StrManager string = "cb-tumblebug" StrSpiderRestUrl string = "TB_SPIDER_REST_URL" StrDragonflyRestUrl string = "TB_DRAGONFLY_REST_URL" StrTerrariumRestUrl string = "TB_TERRARIUM_REST_URL" StrAPIUsername string = "TB_API_USERNAME" StrAPIPassword string = "TB_API_PASSWORD" 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" StrMyImage string = "myimage" 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 = "" // SystemCommonNs is const for SystemCommon NameSpace ID SystemCommonNs string = "system" )
const ( AttachDataDisk string = "attach" DetachDataDisk string = "detach" AvailableDataDisk string = "available" )
type DataDiskCmd string
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" )
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" )
const ( // StatusPreparing is const for Preparing StatusPreparing string = "Preparing" // StatusPrepared is const for Prepared StatusPrepared string = "Prepared" // 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" // StatusEmpty is const for Empty (MCI has no VMs) StatusEmpty string = "Empty" // StatusComplete is const for Complete StatusComplete string = "None" )
const ( // PolicyContinue continues with partial MCI creation when some VMs fail PolicyContinue string = "continue" // PolicyRollback cleans up entire MCI when any VM creation fails PolicyRollback string = "rollback" // PolicyRefine marks failed VMs for refinement when creation fails PolicyRefine string = "refine" )
Provisioning failure handling policies
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
const ( // AutoActionScaleOut is const for "ScaleOut" action. AutoActionScaleOut string = "ScaleOut" // AutoActionScaleIn is const for "ScaleIn" action. AutoActionScaleIn string = "ScaleIn" )
Action for mci automation
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" )
const DefaultSystemLabel string = "Managed by CB-Tumblebug"
DefaultSystemLabel is const for string to specify the Default System Label
const MilkywayPort string = ":1324/milkyway/"
MilkywayPort is const for MilkywayPort
const StrAutoGen string = "autogen"
Variables ¶
var APIPassword string
var APIUsername string
var AutocontrolDurationMs string
var DBDatabase string
var DBPassword string
var DBUrl string
var DBUser string
var DefaultCredentialHolder string
var DefaultNamespace string
var DragonflyRestUrl string
var EtcdEndpoints string
var MyDB *sql.DB
var ORM *gorm.DB
var ORM *xorm.Engine
var ResourceTypeRegistry = map[string]func() interface{}{ StrSSHKey: func() interface{} { return &SshKeyInfo{} }, StrImage: func() interface{} { return &ImageInfo{} }, StrCustomImage: func() interface{} { return &ImageInfo{} }, StrSecurityGroup: func() interface{} { return &SecurityGroupInfo{} }, StrSpec: func() interface{} { return &SpecInfo{} }, StrVNet: func() interface{} { return &VNetInfo{} }, StrSubnet: func() interface{} { return &SubnetInfo{} }, StrDataDisk: func() interface{} { return &DataDiskInfo{} }, StrNLB: func() interface{} { return &NLBInfo{} }, StrVM: func() interface{} { return &VmInfo{} }, StrMCI: func() interface{} { return &MciInfo{} }, StrK8s: func() interface{} { return &K8sClusterInfo{} }, StrNamespace: func() interface{} { return &NsInfo{} }, StrVPN: func() interface{} { return &VpnInfo{} }, }
ResourceTypeRegistry is map for Resource type
var SelfEndpoint string
var SpiderRestUrl string
var SshDefaultUserName = []string{"cb-user", "ubuntu", "root", "ec2-user"}
SshDefaultUserName is array for temporal constants
var StartTime string
var SystemReady bool
SystemReady is global variable for checking SystemReady status
var TerrariumRestUrl string
Functions ¶
func BatchStoreLatencyInfo ¶ added in v0.11.9
func BatchStoreLatencyInfo(latencyData []LatencyInfo) error
BatchStoreLatencyInfo stores multiple latency records in a single transaction
func GetLabelConstantsMap ¶ added in v0.9.12
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.
func GetLatencyValue ¶ added in v0.11.9
GetLatencyValue retrieves latency value between two regions (compatibility function)
func StoreLatencyInfo ¶ added in v0.11.9
StoreLatencyInfo stores latency information to database
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 AttachDetachDataDiskReq ¶ added in v0.11.9
type AttachDetachDataDiskReq struct {
DataDiskId string `json:"dataDiskId" validate:"required"`
}
AttachDetachDataDiskReq is a wrapper struct to create JSON body of 'Attach/Detach disk request'
type AutoAction ¶
type AutoAction struct {
ActionType string `json:"actionType" example:"ScaleOut" enums:"ScaleOut,ScaleIn"`
SubGroupDynamicReq CreateSubGroupDynamicReq `json:"subGroupDynamicReq"`
// 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 AvailableZonesError ¶ added in v0.12.2
type AvailableZonesError struct {
// SpecId is the queried spec ID
SpecId string `json:"specId" example:"aws+ap-northeast-2+t3.medium"`
// ErrorCode provides a machine-readable error code for programmatic handling
ErrorCode string `json:"errorCode" example:"PROVIDER_NOT_AVAILABLE"`
// ErrorMessage provides a human-readable error description
ErrorMessage string `json:"errorMessage" example:"Provider 'xyz' is not available"`
// Suggestion provides actionable guidance when errors occur
Suggestion string `json:"suggestion,omitempty" example:"Available providers: aws, gcp, azure"`
// AlternativeRegions provides alternative regions when the specified region is unavailable
AlternativeRegions []string `json:"alternativeRegions,omitempty" example:"ap-northeast-1,us-east-1"`
// QueryDurationMs is the time taken to process the query in milliseconds
QueryDurationMs int64 `json:"queryDurationMs" example:"15"`
}
AvailableZonesError represents an error response for available zones query @Description Error response when available zones query fails
type AvailableZonesInfo ¶ added in v0.12.2
type AvailableZonesInfo struct {
// SpecId is the queried spec ID
SpecId string `json:"specId" example:"aws+ap-northeast-2+t3.medium"`
// ProviderName is the cloud service provider name
ProviderName string `json:"providerName" example:"aws"`
// RegionName is the region name
RegionName string `json:"regionName" example:"ap-northeast-2"`
// CspSpecName is the CSP-specific spec name
CspSpecName string `json:"cspSpecName" example:"t3.medium"`
// CredentialHolder is the credential holder used for the query
CredentialHolder string `json:"credentialHolder" example:"admin"`
// AvailableZones contains zones that are verified and available
AvailableZones []string `json:"availableZones" example:"ap-northeast-2a,ap-northeast-2c"`
// AllVerifiedZones contains all verified zones for the provider/region (before CSP-specific filtering)
AllVerifiedZones []string `json:"allVerifiedZones,omitempty" example:"ap-northeast-2a,ap-northeast-2b,ap-northeast-2c"`
UnavailableZones []string `json:"unavailableZones,omitempty" example:"ap-northeast-2b"`
// HasZoneConcept indicates whether the CSP/region has zone concept
HasZoneConcept bool `json:"hasZoneConcept" example:"true"`
// QueryDurationMs is the time taken to process the query in milliseconds
QueryDurationMs int64 `json:"queryDurationMs" example:"125"`
}
AvailableZonesInfo represents available zones for a spec (success response) @Description Available (verified) zones for a specific spec
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 BasicImageRules ¶ added in v0.11.22
type BasicImageRules struct {
Common PatternSet `mapstructure:"common" json:"common"`
CspSpecific map[string]PatternSet `mapstructure:"cspSpecific" json:"cspSpecific,omitempty"`
}
BasicImageRules defines rules for identifying basic OS images Basic images are clean, official OS installations without additional software or customization
type BastionInfo ¶
type BastionInfo struct {
VmId []string `json:"vmId"`
}
BastionInfo is struct for bastion info
type BastionNode ¶
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 ¶
BenchmarkReq is struct for BenchmarkReq
type Bucket ¶ added in v0.11.10
type Bucket struct {
Name string `json:"name" example:"spider-test-bucket"`
CreationDate string `json:"creationDate" example:"2025-09-04T04:18:06Z"`
}
Bucket represents a single bucket in S3 bucket list response
type Buckets ¶ added in v0.11.10
type Buckets struct {
Bucket []Bucket `json:"bucket"`
}
Buckets represents the collection of buckets in S3 bucket list response
type BuildAgnosticImageReq ¶ added in v0.11.14
type BuildAgnosticImageReq struct {
// MCI configuration for creating the infrastructure
SourceMciReq MciDynamicReq `json:"sourceMciReq" validate:"required"`
// Snapshot configuration for creating custom images
SnapshotReq SnapshotReq `json:"snapshotReq" validate:"required"`
// Whether to cleanup (terminate) MCI after snapshot creation
CleanupMciAfterSnapshot bool `json:"cleanupMciAfterSnapshot" example:"true" default:"true"`
}
BuildAgnosticImageReq is a struct to handle 'Build Agnostic Image' request This combines MCI creation and snapshot creation into a single workflow
type BuildAgnosticImageResult ¶ added in v0.11.14
type BuildAgnosticImageResult struct {
// MCI information
MciId string `json:"mciId" example:"mci01"`
Namespace string `json:"namespace" example:"default"`
MciStatus string `json:"mciStatus" example:"Running"`
MciCleanedUp bool `json:"mciCleanedUp" example:"true"`
// Snapshot results
SnapshotResult MciSnapshotResult `json:"snapshotResult"`
// Overall summary
TotalDuration string `json:"totalDuration" example:"15m30s"`
Message string `json:"message" example:"Successfully created 3 custom images from MCI"`
}
BuildAgnosticImageResult represents the result of building agnostic images
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"`
UseEmptyRepresentativeZone bool `mapstructure:"useEmptyRepresentativeZone" json:"useEmptyRepresentativeZone,omitempty"`
Regions map[string]RegionDetail `mapstructure:"region" json:"regions"`
}
CSPDetail is structure for CSP information
type CSPIgnorePatterns ¶ added in v0.11.9
type CSPIgnorePatterns struct {
Description string `yaml:"description,omitempty"`
GlobalPatterns []string `yaml:"global_patterns,omitempty"`
Regions map[string]RegionIgnorePatterns `yaml:"regions,omitempty"`
}
CSPIgnorePatterns represents ignore patterns for a specific CSP
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 ChangeK8sNodeGroupAutoscaleSizeReq ¶ added in v0.11.9
type ChangeK8sNodeGroupAutoscaleSizeReq struct {
DesiredNodeSize string `json:"desiredNodeSize" example:"1"`
MinNodeSize string `json:"minNodeSize" example:"1"`
MaxNodeSize string `json:"maxNodeSize" example:"3"`
}
ChangeK8sNodeGroupAutoscaleSizeReq is a struct to handle 'Change K8sNodeGroup's Autoscale Size' request toward CB-Tumblebug.
type ChangeK8sNodeGroupAutoscaleSizeRes ¶ added in v0.11.9
type ChangeK8sNodeGroupAutoscaleSizeRes struct {
K8sNodeGroupInfo
}
ChangeK8sNodeGroupAutoscaleSizeRes is a struct to handle 'Change K8sNodeGroup's Autoscale Size' response from CB-Tumblebug.
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 []CheckSubGroupDynamicReqInfo `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 SpecInfo `json:"spec" default:""`
Image []ImageInfo `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 CheckSubGroupDynamicReqInfo ¶ added in v0.11.9
type CheckSubGroupDynamicReqInfo struct {
// ConnectionConfigCandidates will provide ConnectionConfig options
ConnectionConfigCandidates []string `json:"connectionConfigCandidates" default:""`
Spec SpecInfo `json:"spec" default:""`
Image []ImageInfo `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
}
CheckSubGroupDynamicReqInfo 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"`
Ncp CloudSetting `yaml:"ncp"`
NHN CloudSetting `yaml:"nhn"`
Openstack CloudSetting `yaml:"openstack"`
Cloudit CloudSetting `yaml:"cloudit"`
}
Cloud is structure for cloud settings per CSP
type CloudDriverInfo ¶
CloudDriverInfo is struct for containing a CB-Spider struct for cloud driver info
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 CloudSpecIgnoreConfig ¶ added in v0.11.9
type CloudSpecIgnoreConfig struct {
Global GlobalIgnorePatterns `yaml:"global"`
CSPs map[string]CSPIgnorePatterns `yaml:"csps,omitempty"`
}
CloudSpecIgnoreConfig represents the structure of cloudspec_ignore.yaml
type CommandExecutionStatus ¶ added in v0.11.10
type CommandExecutionStatus string
CommandExecutionStatus represents the status of command execution
const ( // CommandStatusQueued indicates the command has been requested but not started CommandStatusQueued CommandExecutionStatus = "Queued" // CommandStatusHandling indicates the command is currently being processed CommandStatusHandling CommandExecutionStatus = "Handling" // CommandStatusCompleted indicates the command execution completed successfully CommandStatusCompleted CommandExecutionStatus = "Completed" // CommandStatusFailed indicates the command execution failed CommandStatusFailed CommandExecutionStatus = "Failed" // CommandStatusTimeout indicates the command execution timed out CommandStatusTimeout CommandExecutionStatus = "Timeout" )
type CommandStatusFilter ¶ added in v0.11.10
type CommandStatusFilter struct {
// Status filters by command execution status
Status []CommandExecutionStatus `json:"status,omitempty" example:"[\"Completed\",\"Failed\"]"`
// XRequestId filters by specific request ID
XRequestId string `json:"xRequestId,omitempty" example:"req-12345678-abcd-1234-efgh-123456789012"`
// CommandContains filters commands containing this text
CommandContains string `json:"commandContains,omitempty" example:"ls"`
// StartTimeFrom filters commands started from this time (RFC3339 format)
StartTimeFrom string `json:"startTimeFrom,omitempty" example:"2024-01-15T10:00:00Z"`
// StartTimeTo filters commands started until this time (RFC3339 format)
StartTimeTo string `json:"startTimeTo,omitempty" example:"2024-01-15T11:00:00Z"`
// IndexFrom filters commands from this index (inclusive)
IndexFrom int `json:"indexFrom,omitempty" example:"1"`
// IndexTo filters commands to this index (inclusive)
IndexTo int `json:"indexTo,omitempty" example:"10"`
// Limit limits the number of results returned
Limit int `json:"limit,omitempty" example:"50"`
// Offset specifies the number of results to skip
Offset int `json:"offset,omitempty" example:"0"`
}
CommandStatusFilter represents filtering criteria for command status queries
type CommandStatusInfo ¶ added in v0.11.10
type CommandStatusInfo struct {
// Index is sequential identifier for this command execution (1, 2, 3, ...)
Index int `json:"index" example:"1"`
// XRequestId is the request ID from X-Request-ID header when the command was executed
XRequestId string `json:"xRequestId,omitempty" example:"req-12345678-abcd-1234-efgh-123456789012"`
// CommandRequested is the original command as requested by the user
CommandRequested string `json:"commandRequested" example:"ls -la"`
// CommandExecuted is the actual SSH command executed on the VM (may be adjusted)
CommandExecuted string `json:"commandExecuted" example:"ls -la"`
// Status represents the current status of the command execution
Status CommandExecutionStatus `json:"status" example:"Completed"`
// StartedTime is when the command execution started
StartedTime string `json:"startedTime" example:"2024-01-15 10:30:00" default:""`
// CompletedTime is when the command execution completed (success or failure)
CompletedTime string `json:"completedTime,omitempty" example:"2024-01-15 10:30:05"`
// ElapsedTime is the duration of command execution in milliseconds
ElapsedTime int64 `json:"elapsedTime,omitempty" example:"5000"`
// ResultSummary provides a brief summary of the execution result
ResultSummary string `json:"resultSummary,omitempty" example:"Command executed successfully"`
// ErrorMessage contains error details if the execution failed
ErrorMessage string `json:"errorMessage,omitempty" example:"SSH connection failed"`
// Stdout contains the standard output from command execution (truncated for history)
Stdout string `json:"stdout,omitempty" example:"total 8\ndrwxr-xr-x 2 user user 4096 Jan 15 10:30 ."`
// Stderr contains the standard error from command execution (truncated for history)
Stderr string `json:"stderr,omitempty" example:""`
}
CommandStatusInfo represents a single remote command execution record
type CommandStatusListResponse ¶ added in v0.11.10
type CommandStatusListResponse struct {
// Commands is the list of command status info matching the filter criteria
Commands []CommandStatusInfo `json:"commands"`
// Total is the total number of commands matching the criteria (before limit/offset)
Total int `json:"total" example:"25"`
// Limit is the limit applied to the query
Limit int `json:"limit" example:"50"`
// Offset is the offset applied to the query
Offset int `json:"offset" example:"0"`
}
CommandStatusListResponse represents the response for command status list queries
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 CorsRule ¶ added in v0.12.2
type CorsRule struct {
AllowedMethod []string `json:"allowedMethod" example:"GET,PUT"`
AllowedOrigin []string `json:"allowedOrigin" example:"*"`
AllowedHeader []string `json:"allowedHeader" example:"*"`
ExposeHeader []string `json:"exposeHeader" example:"ETag"`
MaxAgeSeconds int `json:"maxAgeSeconds" example:"3000"`
}
CorsRule represents a single CORS rule in the set CORS request
type CreateSubGroupDynamicReq ¶ added in v0.11.9
type CreateSubGroupDynamicReq struct {
// SubGroup name, actual VM name will be generated with -N postfix.
Name string `json:"name" example:"g1"`
// 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" example:"{\"role\":\"worker\",\"env\":\"test\"}"`
Description string `json:"description" example:"Created via CB-Tumblebug"`
// SpecId is field for id of a spec in common namespace
SpecId string `json:"specId" validate:"required" example:"aws+ap-northeast-2+t3.nano"`
// ImageId is field for id of a image in common namespace
ImageId string `json:"imageId" validate:"required" example:"ami-01f71f215b23ba262"`
RootDiskType string `json:"rootDiskType,omitempty" example:"gp3" 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:"50" default:"default"` // "default", Integer (GB): ["50", ..., "1000"]
VmUserPassword string `json:"vmUserPassword,omitempty" example:"" 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" example:"aws-ap-northeast-2" default:""`
// Zone is an optional field to specify the availability zone for VM placement.
// If specified, subnet will be created in this zone for resources like GPU VMs
// that may only be available in specific zones. If empty, auto-selection applies.
Zone string `json:"zone,omitempty" example:"ap-northeast-2a" default:""`
}
CreateSubGroupDynamicReq is struct to get requirements to create a new server instance dynamically (with default resource option)
type CreateSubGroupReq ¶ added in v0.11.9
type CreateSubGroupReq struct {
// SubGroup name of VMs. 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"`
}
CreateSubGroupReq is struct to get requirements to create a new server instance
type Credential ¶
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 CspResourceStatusRequest ¶ added in v0.11.3
type CspResourceStatusRequest struct {
ConnectionName string `json:"ConnectionName"`
}
CspResourceStatusRequest is struct for requesting CSP resource status from CB-Spider
type CspResourceStatusResponse ¶ added in v0.11.3
type CspResourceStatusResponse struct {
ConnectionName string `json:"connectionName"`
ResourceType string `json:"resourceType"`
AllList SpiderAllList `json:"allList"`
SystemMessage string `json:"systemMessage,omitempty"`
Error string `json:"error,omitempty"`
}
CspResourceStatusResponse is struct for CSP resource status response from CB-Spider
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 CustomImageReq ¶ added in v0.11.9
type CustomImageReq 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"`
}
CustomImageReq is a struct to handle a request for Create custom image (VM snapshot)
type CustomImageStatus ¶
type CustomImageStatus string
const ( MyImageAvailable CustomImageStatus = "Available" )
type DataDiskInfo ¶ added in v0.11.9
type DataDiskInfo 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:""`
}
DataDiskInfo is a struct that represents TB dataDisk object.
type DataDiskReq ¶ added in v0.11.9
type DataDiskReq 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"`
}
DataDiskReq is a struct to handle 'Register dataDisk' request toward CB-Tumblebug.
type DataDiskUpsizeReq ¶ added in v0.11.9
type DataDiskUpsizeReq struct {
DiskSize string `json:"diskSize" validate:"required"`
Description string `json:"description"`
}
DataDiskUpsizeReq is a struct to handle 'Upsize dataDisk' request toward CB-Tumblebug.
type DataDiskVmReq ¶ added in v0.11.9
type DataDiskVmReq 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"`
}
DataDiskVmReq is a struct to handle 'Provisioning dataDisk to VM' request toward CB-Tumblebug.
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 FilterAvailableValues ¶ added in v0.11.9
type FilterAvailableValues struct {
// Basic identification fields
Id []string `json:"id,omitempty" description:"Available spec IDs"`
Name []string `json:"name,omitempty" description:"Available spec names"`
ConnectionName []string `json:"connectionName,omitempty" description:"Available connection names"`
// Provider and region information
ProviderName []string `json:"providerName" description:"Available CSP provider names"`
RegionName []string `json:"regionName" description:"Available region names"`
CspSpecName []string `json:"cspSpecName,omitempty" description:"Available CSP spec names"`
// Infrastructure specifications
InfraType []string `json:"infraType" description:"Available infrastructure types"`
Architecture []string `json:"architecture" description:"Available architectures"`
OsType []string `json:"osType,omitempty" description:"Available OS types"`
// Accelerator information
AcceleratorModel []string `json:"acceleratorModel,omitempty" description:"Available accelerator models"`
AcceleratorType []string `json:"acceleratorType,omitempty" description:"Available accelerator types"`
// Additional fields
Description []string `json:"description,omitempty" description:"Available descriptions"`
EvaluationStatus []string `json:"evaluationStatus,omitempty" description:"Available evaluation statuses"`
}
FilterAvailableValues provides available values for filter fields
type FilterCondition ¶
type FilterCondition struct {
Metric string `json:"metric" example:"vCPU" enums:"vCPU,memoryGiB,costPerHour"`
Condition []Operation `json:"condition"`
}
FilterCondition is struct for .
type FilterConditionExample ¶ added in v0.11.9
type FilterConditionExample struct {
Metric string `json:"metric" example:"vCPU"`
Description string `json:"description" example:"Filter specs with 2-8 vCPUs"`
Condition []OperationExample `json:"condition"`
}
FilterConditionExample provides example filter conditions
type FilterInfo ¶
type FilterInfo struct {
Policy []FilterCondition `json:"policy"`
}
FilterInfo is struct for .
type FilterOptionsInfo ¶ added in v0.11.9
type FilterOptionsInfo struct {
// Available metrics for filtering
AvailableMetrics []string `` /* 149-byte string literal not displayed */
// Example filter policies
ExamplePolicies []FilterConditionExample `json:"examplePolicies" description:"Example filter policies"`
// Available values for each metric (for select fields)
AvailableValues FilterAvailableValues `json:"availableValues" description:"Available values for select-type filter fields"`
// Example limit values for performance optimization
LimitExamples []string `json:"limitExamples" example:"0,50,100,200,500" description:"Example limit values for performance optimization"`
}
FilterOptionsInfo provides available filter metrics and their example values
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"`
RegionLatitude float64 `json:"regionLatitude"`
RegionLongitude float64 `json:"regionLongitude"`
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"`
Limit int `json:"limit" example:"0" description:"Maximum number of results to return (0 for no limit - returns all results)"`
}
FilterSpecsByRangeRequest is for 'FilterSpecsByRange'
type FirewallRuleInfo ¶ added in v0.11.9
type FirewallRuleInfo struct {
// Port is the single port (e.g. "22") or port range (e.g. "1-65535") for the rule
Port string `json:"Port" example:"1-65535"`
// Protocol is the protocol type for the rule (TCP, UDP, ICMP, ALL)
Protocol string `validate:"required" json:"Protocol" example:"TCP" enums:"TCP,UDP,ICMP,ALL"`
// Direction is the direction of the rule (inbound or outbound)
Direction string `validate:"required" json:"Direction" example:"inbound" enums:"inbound,outbound"`
// CIDR is the allowed IP range (e.g. 0.0.0.0/0, 10.0.0/8)
CIDR string `json:"CIDR" example:"0.0.0.0/0"`
}
FirewallRuleInfo is a struct to handle firewall rule info of CB-Tumblebug.
type FirewallRuleReq ¶ added in v0.11.9
type FirewallRuleReq struct {
// Ports is to get multiple ports or port ranges as a string (e.g. "22,900-1000,2000-3000")
// This allows flexibility in specifying single ports or ranges in a comma-separated format.
// This field is used to handle both single ports and port ranges in a unified way.
// It can accept a single port (e.g. "22"), a range (e.g. "900-1000"), or multiple ports/ranges (e.g. "22,900-1000,2000-3000").
Ports string `json:"Ports" example:"22,900-1000,2000-3000"`
// Protocol is the protocol type for the rule (TCP, UDP, ICMP). Don't use ALL here.
Protocol string `validate:"required" json:"Protocol" example:"TCP" enums:"TCP,UDP,ICMP"`
// Direction is the direction of the rule (inbound or outbound)
Direction string `validate:"required" json:"Direction" example:"inbound" enums:"inbound,outbound"`
// CIDR is the allowed IP range (e.g. 0.0.0.0/0, 10.0.0/8)
CIDR string `json:"CIDR" example:"0.0.0.0/0"`
}
FirewallRuleReq is a struct to get a request for firewall rule info of CB-Tumblebug.
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 GetAvailableRegionZonesListRequest ¶ added in v0.11.9
type GetAvailableRegionZonesRequest ¶ added in v0.11.9
type GetAvailableRegionZonesRequest struct {
Provider string `json:"provider" validate:"required" example:"alibaba"`
CspSpecName string `json:"cspSpecName" validate:"required" example:"ecs.t5.large"`
}
Availability request structures for API handlers
type GlobalIgnorePatterns ¶ added in v0.11.9
type GlobalIgnorePatterns struct {
Patterns []string `yaml:"patterns"`
}
GlobalIgnorePatterns represents global ignore patterns that apply to all CSPs
type HandlingCommandCountResponse ¶ added in v0.11.10
type HandlingCommandCountResponse struct {
// VmId is the VM identifier
VmId string `json:"vmId" example:"g1-1"`
// HandlingCount is the number of commands currently in 'Handling' status
HandlingCount int `json:"handlingCount" example:"3"`
}
HandlingCommandCountResponse represents the response for VM handling command count queries
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
}
type IdNameInDetailInfo ¶ added in v0.11.9
type IdNameInDetailInfo struct {
IdInTb string `json:"idInTb"`
IdInSp string `json:"idInSp"`
IdInCsp string `json:"idInCsp"`
NameInCsp string `json:"nameInCsp"`
}
IdNameInDetailInfo is struct for details related with ID and Name
type ImageFetchOption ¶ added in v0.10.7
type ImageFetchOption struct {
// Specific providers to target for the image fetching operation (ex: ["aws", "gcp"])
// If specified, only these providers will be processed (excludedProviders will be ignored)
TargetProviders []string `` /* 148-byte string literal not displayed */
// 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 ImageInfo ¶ added in v0.11.9
type ImageInfo struct {
// ResourceType is the type of the resource
ResourceType string `json:"resourceType"`
// 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"`
// CspImageId is resource identifier managed by CSP
CspImageId string `json:"cspImageId,omitempty" example:"ami-0d399fba46a30a310"`
// SourceVmUid is the UID of the source VM from which this image was created
SourceVmUid string `json:"sourceVmUid" example:"wef12awefadf1221edcf"`
// SourceCspImageName is the name of the source CSP image from which this image was created
SourceCspImageName string `json:"sourceCspImageName" example:"csp-06eb41e14121c550a"`
ConnectionName string `json:"connectionName"`
InfraType string `json:"infraType"` // vm|k8s|kubernetes|container, etc.
FetchedTime string `json:"fetchedTime"`
CreationDate string `json:"creationDate"`
IsGPUImage bool `` /* 133-byte string literal not displayed */
IsKubernetesImage bool `` /* 154-byte string literal not displayed */
IsBasicImage bool `` /* 142-byte string literal not displayed */
OSType string `json:"osType" 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" example:"Managed by CB-Tumblebug" default:""`
Description string `json:"description"`
// CommandHistory stores the status and history of remote commands executed on this VM
CommandHistory []ImageSourceCommandHistory `json:"commandHistory" gorm:"type:text;serializer:json"`
}
ImageInfo is a struct that represents TB image object.
type ImageReq ¶ added in v0.11.9
type ImageReq struct {
Name string `json:"name" validate:"required"`
ConnectionName string `json:"connectionName" validate:"required"`
CspImageName string `json:"cspImageName" validate:"required"`
Description string `json:"description"`
}
ImageReq is a struct to handle 'Register image' request toward CB-Tumblebug.
type ImageRiskInfo ¶ added in v0.11.3
type ImageRiskInfo struct {
// Level is the risk level: "low", "medium", "high"
Level string `json:"level"`
// Message explains the image-specific risk reasoning
Message string `json:"message"`
// HasFailedWithSpec indicates if this image has failed with this spec before
HasFailedWithSpec bool `json:"hasFailedWithSpec"`
// HasSucceededWithSpec indicates if this image has succeeded with this spec before
HasSucceededWithSpec bool `json:"hasSucceededWithSpec"`
// IsNewCombination indicates if this spec+image combination has never been tried
IsNewCombination bool `json:"isNewCombination"`
}
ImageRiskInfo represents risk analysis specific to the image
type ImageSourceCommandHistory ¶ added in v0.11.14
type ImageSourceCommandHistory struct {
// Index is sequential identifier for this command execution (1, 2, 3, ...)
Index int `json:"index" example:"1"`
// CommandExecuted is the actual SSH command executed on the VM (may be adjusted)
CommandExecuted string `json:"commandExecuted" example:"ls -la"`
}
ImageSourceCommandHistory represents a single remote command execution record
type ImageStatus ¶ added in v0.10.7
type ImageStatus string
const ( ImageAvailable ImageStatus = "Available" 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 InspectResourcesRequest ¶ added in v0.11.3
type InspectResourcesRequest struct {
ConnectionName string `json:"connectionName" example:"aws-ap-southeast-1"`
ResourceType string `json:"resourceType" example:"vNet" enums:"vNet,subnet,securityGroup,sshKey,vm"`
}
InspectResourcesRequest struct for Inspect Resources Request
type InspectResourcesResponse ¶ added in v0.11.9
type InspectResourcesResponse struct {
InspectResources []InspectResource `json:"inspectResources"`
}
InspectResourcesResponse is struct for response of InspectResources request
type K8sAccessInfo ¶ added in v0.11.9
type K8sAccessInfo 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..."`
}
K8sAccessInfo is a struct to handle K8sCluster Access information from the CB-Tumblebug's REST API response
type K8sAddonsInfo ¶ added in v0.11.9
type K8sAddonsInfo struct {
KeyValueList []KeyValue `json:"keyValueList"`
}
K8sAddonsInfo is a struct to handle K8sCluster Addons information from the CB-Tumblebug's REST API response
type K8sClusterAssetInfo ¶ added in v0.11.9
type K8sClusterAssetInfo struct {
CSPs map[string]K8sClusterDetail `mapstructure:"k8scluster" json:"k8s_cluster"`
}
K8sClusterAssetInfo is structure for kubernetes cluster information
type K8sClusterConnectionConfigCandidatesReq ¶ added in v0.10.0
type K8sClusterConnectionConfigCandidatesReq struct {
// SpecId is field for id of a spec in common namespace
SpecIds []string `json:"specId" 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 K8sClusterContainerCmdReq ¶ added in v0.11.9
type K8sClusterContainerCmdReq struct {
Command []string `json:"command" validate:"required" example:"echo hello"`
}
K8sClusterContainerCmdReq is struct for remote command
type K8sClusterContainerCmdResult ¶ added in v0.11.9
type K8sClusterContainerCmdResult struct {
Command string `json:"command"`
Stdout string `json:"stdout"`
Stderr string `json:"stderr"`
Err error `json:"err"`
}
K8sClusterContainerCmdResult is struct for K8sClusterContainerCmd Result
type K8sClusterContainerCmdResults ¶ added in v0.11.9
type K8sClusterContainerCmdResults struct {
Results []*K8sClusterContainerCmdResult `json:"results"`
}
K8sClusterContainerCmdResultMap is struct maps for K8sClusterContainerCmd Result
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 K8sClusterDynamicReq ¶ added in v0.11.9
type K8sClusterDynamicReq struct {
// K8sCluster name if it is not empty. Optional when used with namePrefix in multi-cluster creation.
Name string `json:"name" 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"`
// SpecId is field for id of a spec in common namespace
SpecId string `json:"specId" validate:"required" example:"tencent+ap-seoul+S2.MEDIUM4"`
// ImageId is field for id of a image in common namespace
ImageId string `json:"imageId" 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"`
}
K8sClusterDynamicReq is struct for requirements to create K8sCluster dynamically (with default resource option)
type K8sClusterFailedInfo ¶ added in v0.11.22
type K8sClusterFailedInfo struct {
Name string `json:"name" example:"k8s-cluster-01"`
ConnectionName string `json:"connectionName,omitempty" example:"aws-ap-northeast-2"`
SpecId string `json:"specId,omitempty" example:"aws+ap-northeast-2+t3.medium"`
Error string `json:"error" example:"failed to create cluster: resource quota exceeded"`
}
K8sClusterFailedInfo contains information about a failed cluster creation attempt
type K8sClusterInfo ¶
type K8sClusterInfo 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 K8sClusterNetworkInfo `json:"network"`
// K8sNodeGroupList is for describing network information about the cluster
K8sNodeGroupList []K8sNodeGroupInfo `json:"k8sNodeGroupList"`
AccessInfo K8sAccessInfo `json:"accessInfo"`
Addons K8sAddonsInfo `json:"addons"`
Status K8sClusterStatus `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"`
}
K8sClusterInfo is a struct that represents TB K8sCluster object.
type K8sClusterNetworkInfo ¶ added in v0.11.9
type K8sClusterNetworkInfo 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"`
}
K8sClusterNetworkInfo is a struct to handle K8sCluster Network information from the CB-Tumblebug's REST API response
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 K8sClusterReq ¶ added in v0.11.9
type K8sClusterReq 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 []K8sNodeGroupReq `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:""`
}
K8sClusterReq is a struct to handle 'Create K8sCluster' request toward CB-Tumblebug.
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 K8sClusterStatus ¶ added in v0.11.9
type K8sClusterStatus string
const ( K8sClusterCreating K8sClusterStatus = "Creating" K8sClusterActive K8sClusterStatus = "Active" K8sClusterInactive K8sClusterStatus = "Inactive" K8sClusterUpdating K8sClusterStatus = "Updating" K8sClusterDeleting K8sClusterStatus = "Deleting" )
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 K8sMultiClusterDynamicReq ¶ added in v0.11.22
type K8sMultiClusterDynamicReq struct {
NamePrefix string `json:"namePrefix" example:"across"`
Clusters []K8sClusterDynamicReq `json:"clusters" validate:"required,dive"`
}
K8sMultiClusterDynamicReq is a wrapper struct for creating multiple K8sClusters in parallel
type K8sMultiClusterInfo ¶ added in v0.11.22
type K8sMultiClusterInfo struct {
Clusters []K8sClusterInfo `json:"clusters"`
FailedClusters []K8sClusterFailedInfo `json:"failedClusters,omitempty"`
}
K8sMultiClusterInfo is a wrapper struct for multiple K8sCluster creation results
type K8sNodeGroupDynamicReq ¶ added in v0.11.9
type K8sNodeGroupDynamicReq 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"`
// SpecId is field for id of a spec in common namespace
SpecId string `json:"specId" validate:"required" example:"tencent+ap-seoul+S2.MEDIUM4"`
// ImageId is field for id of a image in common namespace
ImageId string `json:"imageId" 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"`
}
K8sNodeGroupDynamicReq is struct for requirements to create K8sNodeGroup dynamically (with default resource option)
type K8sNodeGroupInfo ¶ added in v0.11.9
type K8sNodeGroupInfo 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 K8sNodeGroupStatus `json:"status" example:"Active"` // Creating, Active, Inactive, Updating, Deleting
K8sNodes []K8sNodeInfo `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"`
}
K8sNodeGroupInfo is a struct to handle K8sCluster's Node Group information from the CB-Tumblebug's REST API response
type K8sNodeGroupReq ¶ added in v0.11.9
type K8sNodeGroupReq 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"`
}
K8sNodeGroupReq is a struct to handle requests related to K8sNodeGroup toward CB-Tumblebug.
type K8sNodeGroupStatus ¶ added in v0.11.9
type K8sNodeGroupStatus string
const ( K8sNodeGroupCreating K8sNodeGroupStatus = "Creating" K8sNodeGroupActive K8sNodeGroupStatus = "Active" K8sNodeGroupInactive K8sNodeGroupStatus = "Inactive" K8sNodeGroupUpdating K8sNodeGroupStatus = "Updating" K8sNodeGroupDeleting K8sNodeGroupStatus = "Deleting" )
type K8sNodeInfo ¶ added in v0.11.9
type K8sNodeInfo 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"`
}
K8sNodeInfo is a struct to handle K8sCluster's Node information
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 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 LatencyInfo ¶ added in v0.11.9
type LatencyInfo struct {
// SourceRegion is the source region for latency measurement
SourceRegion string `json:"sourceRegion" gorm:"primaryKey" example:"aws+us-east-1"`
// TargetRegion is the target region for latency measurement
TargetRegion string `json:"targetRegion" gorm:"primaryKey" example:"aws+us-west-2"`
// LatencyMs is the latency in milliseconds between source and target regions
LatencyMs float64 `json:"latencyMs" example:"70.5"`
// MeasuredAt is the timestamp when the latency was measured
MeasuredAt time.Time `json:"measuredAt"`
// UpdatedAt is the timestamp when the record was last updated
UpdatedAt time.Time `json:"updatedAt"`
}
LatencyInfo is a struct that represents TB latency map object.
func GetAllLatencyInfo ¶ added in v0.11.9
func GetAllLatencyInfo() ([]LatencyInfo, error)
GetAllLatencyInfo retrieves all latency information from database
func GetLatencyInfo ¶ added in v0.11.9
func GetLatencyInfo(sourceRegion, targetRegion string) (*LatencyInfo, error)
GetLatencyInfo retrieves latency information from database
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 *MciInfo `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 MciAssociatedResourceList ¶ added in v0.11.2
type MciAssociatedResourceList struct {
ConnectionNames []string `json:"connectionNames"`
ProviderNames []string `json:"providerNames"`
SubGroupIds []string `json:"subGroupIds"`
VmIds []string `json:"vmIds"`
CspVmNames []string `json:"cspVmNames"`
CspVmIds []string `json:"cspVmIds"`
ImageIds []string `json:"imageIds"`
SpecIds []string `json:"specIds"`
VNetIds []string `json:"vNetIds"`
CspVNetIds []string `json:"cspVNetIds"`
SubnetIds []string `json:"subnetIds"`
CspSubnetIds []string `json:"cspSubnetIds"`
SecurityGroupIds []string `json:"securityGroupIds"`
DataDiskIds []string `json:"dataDiskIds"`
SSHKeyIds []string `json:"sshKeyIds"`
}
MciAssociatedResourceList is struct for associated resource IDs of an 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 {
// SpecId is field for id of a spec in common namespace
SpecIds []string `json:"specId" 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 MciCreationErrors ¶ added in v0.11.3
type MciCreationErrors struct {
// VmObjectCreationErrors contains errors from VM object creation phase
VmObjectCreationErrors []VmCreationError `json:"vmObjectCreationErrors,omitempty"`
// VmCreationErrors contains errors from actual VM creation phase
VmCreationErrors []VmCreationError `json:"vmCreationErrors,omitempty"`
// TotalVmCount is the total number of VMs that were supposed to be created
TotalVmCount int `json:"totalVmCount"`
// SuccessfulVmCount is the number of VMs that were successfully created
SuccessfulVmCount int `json:"successfulVmCount"`
// FailedVmCount is the number of VMs that failed to be created
FailedVmCount int `json:"failedVmCount"`
// FailureHandlingStrategy indicates how failures were handled
FailureHandlingStrategy string `json:"failureHandlingStrategy,omitempty"` // "rollback", "refine", "continue"
}
MciCreationErrors represents errors that occurred during MCI creation
type MciDynamicReq ¶ added in v0.11.9
type MciDynamicReq struct {
Name string `json:"name" validate:"required" example:"mci01"`
// PolicyOnPartialFailure determines how to handle VM creation failures
// - "continue": Continue with partial MCI creation (default)
// - "rollback": Cleanup entire MCI when any VM fails
// - "refine": Mark failed VMs for refinement
PolicyOnPartialFailure string `json:"policyOnPartialFailure" example:"continue" default:"continue" enums:"continue,rollback,refine"`
// 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
// SubGroups is array of VM requests for multi-cloud infrastructure
// Example: Multiple VM groups across different CSPs
// [
// {
// "name": "aws-group",
// "subGroupSize": "3",
// "specId": "aws+ap-northeast-2+t3.nano",
// "imageId": "ami-01f71f215b23ba262",
// "rootDiskSize": "50",
// "label": {"role": "worker", "csp": "aws"}
// },
// {
// "name": "azure-group",
// "subGroupSize": "2",
// "specId": "azure+koreasouth+standard_b1s",
// "imageId": "Canonical:0001-com-ubuntu-server-jammy:22_04-lts:22.04.202505210",
// "rootDiskSize": "50",
// "label": {"role": "head", "csp": "azure"}
// },
// {
// "name": "gcp-group",
// "subGroupSize": "1",
// "specId": "gcp+asia-northeast3+g1-small",
// "imageId": "https://www.googleapis.com/compute/v1/projects/ubuntu-os-cloud/global/images/ubuntu-2204-jammy-v20250712",
// "rootDiskSize": "50",
// "label": {"role": "test", "csp": "gcp"}
// }
// ]
SubGroups []CreateSubGroupDynamicReq `json:"subGroups" validate:"required"`
// PostCommand is for the command to bootstrap the VMs
PostCommand MciCmdReq `json:"postCommand"`
// 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"`
// Label is for describing the object by keywords
Label map[string]string `json:"label"`
}
MciDynamicReq is struct for requirements to create MCI dynamically (with default resource option)
type MciHandlingCommandCountResponse ¶ added in v0.11.10
type MciHandlingCommandCountResponse struct {
// MciId is the MCI identifier
MciId string `json:"mciId" example:"mci01"`
// VmHandlingCounts is a map of VM ID to handling command count
VmHandlingCounts map[string]int `json:"vmHandlingCounts"`
// TotalHandlingCount is the total number of handling commands across all VMs in the MCI
TotalHandlingCount int `json:"totalHandlingCount" example:"3"`
}
MciHandlingCommandCountResponse represents the response for MCI handling command count queries
type MciInfo ¶ added in v0.11.9
type MciInfo 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"` // systeam-given string message
PlacementAlgo string `json:"placementAlgo,omitempty"`
Description string `json:"description"`
Vm []VmInfo `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"`
// CreationErrors contains information about VM creation failures (if any)
CreationErrors *MciCreationErrors `json:"creationErrors,omitempty"`
}
MciInfo is struct for MCI info
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 []VmRecommendReq `json:"vmReq"`
PlacementAlgo string `json:"placementAlgo"`
PlacementParam []KeyValue `json:"placementParam"`
MaxResultNum string `json:"maxResultNum"`
}
MciRecommendReq is struct for MciRecommendReq
type MciReq ¶ added in v0.11.9
type MciReq 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"`
SubGroups []CreateSubGroupReq `json:"subGroups" validate:"required"`
// PostCommand is for the command to bootstrap the VMs
PostCommand MciCmdReq `json:"postCommand" validate:"omitempty"`
// PolicyOnPartialFailure determines how to handle VM creation failures
// - "continue": Continue with partial MCI creation (default)
// - "rollback": Cleanup entire MCI when any VM fails
// - "refine": Mark failed VMs for refinement
PolicyOnPartialFailure string `json:"policyOnPartialFailure" example:"continue" default:"continue" enums:"continue,rollback,refine"`
}
MciReq is struct for requirements to create MCI
type MciSnapshotResult ¶ added in v0.11.14
type MciSnapshotResult struct {
MciId string `json:"mciId" example:"mci01"`
Namespace string `json:"namespace" example:"default"`
SuccessCount int `json:"successCount" example:"3"`
FailCount int `json:"failCount" example:"0"`
Results []VmSnapshotResult `json:"results"`
}
MciSnapshotResult represents the result of creating snapshots for an entire MCI
type MciSshCmdResult ¶
type MciSshCmdResult struct {
Results []SshCmdResult `json:"results"`
}
MciSshCmdResult is struct for Set of SshCmd Results in terms of MCI
type MciSshCmdResultForAPI ¶ added in v0.11.9
type MciSshCmdResultForAPI struct {
Results []SshCmdResultForAPI `json:"results"`
}
MciSshCmdResultForAPI is struct for Set of SshCmd Results in terms of MCI for API response
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 []VmStatusInfo `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 *NLBListenerInfo `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 NLBAddRemoveVMReq ¶ added in v0.11.9
type NLBAddRemoveVMReq struct {
TargetGroup NLBTargetGroupInfo `json:"targetGroup"`
}
NLBAddRemoveVMReq is a struct to handle 'Add/Remove VMs to/from NLB' request toward CB-Tumblebug.
type NLBHealthCheckerInfo ¶ added in v0.11.9
type NLBHealthCheckerInfo 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 NLBHealthCheckerReq ¶ added in v0.11.9
type NLBHealthCheckerReq 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 NLBHealthInfo ¶ added in v0.11.9
type NLBInfo ¶ added in v0.11.9
type NLBInfo 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 NLBListenerInfo `json:"listener"`
TargetGroup NLBTargetGroupInfo `json:"targetGroup"`
HealthChecker NLBHealthCheckerInfo `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:""`
}
NLBInfo is a struct that represents TB nlb object.
type NLBListenerInfo ¶ added in v0.11.9
type NLBListenerInfo 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"`
}
NLBListenerInfo is a struct to handle NLB Listener information from the CB-Tumblebug's REST API response
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 NLBReq ¶ added in v0.11.9
type NLBReq 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 NLBTargetGroupReq `json:"targetGroup" validate:"required"`
// HealthChecker
HealthChecker NLBHealthCheckerReq `json:"healthChecker" validate:"required"`
}
NLBReq is a struct to handle 'Create nlb' request toward CB-Tumblebug.
type NLBTargetGroupInfo ¶ added in v0.11.9
type NLBTargetGroupReq ¶ added in v0.11.9
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"`
NlbMciSpecId string `yaml:"nlbMciSpecId"`
NlbMciImageId string `yaml:"nlbMciImageId"`
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 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"`
BasicImageRules *BasicImageRules `mapstructure:"basicImageRules" json:"basicImageRules,omitempty"`
}
OSTypeDetail is structure for OS type detail information
type Object ¶ added in v0.12.2
type Object struct {
Key string `json:"key" example:"test-object.txt"`
LastModified string `json:"lastModified" example:"2025-09-04T04:18:06Z"`
ETag string `json:"eTag" example:"9b2cf535f27731c974343645a3985328"`
Size int64 `json:"size" example:"1024"`
StorageClass string `json:"storageClass" example:"STANDARD"`
}
type ObjectStorageCreateRequest ¶ added in v0.12.2
type ObjectStorageGetCorsResponse ¶ added in v0.12.2
type ObjectStorageGetCorsResponse struct {
CorsRule []CorsRule `json:"corsRule"`
}
ObjectStorageGetCorsResponse represents the response structure for CORS configuration
type ObjectStorageGetVersioningResponse ¶ added in v0.12.2
type ObjectStorageGetVersioningResponse struct {
Status string `json:"status" example:"Enabled"`
}
ObjectStorageGetVersioningResponse represents the response structure for versioning configuration
type ObjectStorageInfo ¶ added in v0.10.2
type ObjectStorageInfo struct {
// ResourceType is the type of this resource
ResourceType string `json:"resourceType" example:"ObjectStorage"`
// Id is unique identifier for the object
Id string `json:"id" example:"globally-unique-bucket-name-12345"`
// 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:""`
// CspResourceId is resource identifier managed by CSP
CspResourceId string `json:"cspResourceId,omitempty" example:""`
// Variables for management of Object Storage resource in CB-Tumblebug
ConnectionName string `json:"connectionName"`
ConnectionConfig ConnConfig `json:"connectionConfig"`
Description string `json:"description" example:"this object storage is managed by CB-Tumblebug"`
Status string `json:"status"`
// Name is human-readable string to represent the object
Name string `json:"name" example:"globally-unique-bucket-name-12345"`
Prefix string `json:"prefix,omitempty" example:""`
Marker string `json:"marker,omitempty" example:""`
MaxKeys int `json:"maxKeys,omitempty" example:"1000"`
IsTruncated bool `json:"isTruncated,omitempty" example:"false"`
CreationDate string `json:"creationDate,omitempty" example:"2025-09-04T04:18:06Z"`
Contents []Object `json:"contents,omitempty"`
}
type ObjectStorageListObjectVersionsResponse ¶ added in v0.12.2
type ObjectStorageListObjectVersionsResponse struct {
Name string `json:"name" example:"example-bucket"`
Prefix string `json:"prefix" example:""`
KeyMarker string `json:"keyMarker" example:""`
VersionIdMarker string `json:"versionIdMarker" example:""`
NextKeyMarker string `json:"nextKeyMarker" example:""`
NextVersionIdMarker string `json:"nextVersionIdMarker" example:""`
MaxKeys int `json:"maxKeys" example:"1000"`
IsTruncated bool `json:"isTruncated" example:"false"`
Version []ObjectVersion `json:"version"`
DeleteMarker []ObjectVersion `json:"deleteMarker"`
}
ObjectStorageListObjectVersionsResponse represents the response structure for listing object versions in a bucket
type ObjectStorageListObjectsResponse ¶ added in v0.12.2
type ObjectStorageListObjectsResponse struct {
Objects []Object `json:"objects"`
}
ObjectStorageListObjectsResponse represents the response structure for listing objects in a bucket
type ObjectStorageListResponse ¶ added in v0.12.2
type ObjectStorageListResponse struct {
Owner Owner `json:"owner"`
Buckets Buckets `json:"buckets"`
}
ObjectStorageListResponse represents the response structure for listing S3 buckets
type ObjectStorageLocationResponse ¶ added in v0.12.2
type ObjectStorageLocationResponse struct {
LocationConstraint string `json:"locationConstraint" example:"ap-northeast-2"`
}
ObjectStorageLocationResponse represents the response structure for object storage location
type ObjectStoragePresignedUrlResponse ¶ added in v0.12.2
type ObjectStoragePresignedUrlResponse struct {
Expires int64 `json:"expires" example:"1693824000"`
Method string `json:"method" example:"GET"`
PreSignedURL string `json:"presignedURL" example:"https://example.com/presigned-url"`
}
ObjectStoragePresignedUrlResponse represents the response structure for presigned URL generation
type ObjectStorageSetCorsRequest ¶ added in v0.12.2
type ObjectStorageSetCorsRequest struct {
CorsRule []CorsRule `json:"corsRule" validate:"required"`
}
ObjectStorageSetCorsRequest represents the request structure to set CORS configuration
type ObjectStorageSetVersioningRequest ¶ added in v0.12.2
type ObjectStorageSetVersioningRequest struct {
Status string `json:"status" validate:"required" example:"Enabled"`
}
ObjectStorageSetVersioningRequest represents the request structure to set versioning configuration
type ObjectVersion ¶ added in v0.12.2
type ObjectVersion struct {
Key string `json:"key,omitempty" example:"test-object.txt"`
VersionId string `json:"versionId,omitempty" example:"3/L4kqtJlcpXroDTDmJ+rmSpXd3aIbrC"`
IsLatest bool `json:"isLatest,omitempty" example:"true"`
LastModified string `json:"lastModified,omitempty" example:"2025-09-04T04:18:06Z"`
ETag string `json:"eTag,omitempty" example:"9b2cf535f27731c974343645a3985328"`
Size int64 `json:"size,omitempty" example:"1024"`
StorageClass string `json:"storageClass,omitempty" example:"STANDARD"`
Owner Owner `json:"owner,omitempty"`
}
ObjectVersion represents a single object version in the list object versions response
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 OperationExample ¶ added in v0.11.9
type OperationExample struct {
Operator string `json:"operator" example:">="`
Operand string `json:"operand" example:"2"`
}
OperationExample provides example operations
type OptionalParameter ¶
OptionalParameter is struct for optional parameter for function (ex. VmId)
type OverallRiskInfo ¶ added in v0.11.3
type OverallRiskInfo struct {
// Level is the overall risk level: "low", "medium", "high"
Level string `json:"level"`
// Message explains the overall risk reasoning
Message string `json:"message"`
// PrimaryRiskFactor indicates what the main risk factor is: "spec", "image", "combination", "none"
PrimaryRiskFactor string `json:"primaryRiskFactor"`
}
OverallRiskInfo represents the combined risk assessment
type Owner ¶ added in v0.11.10
type Owner struct {
ID string `json:"id" example:"aws-ap-northeast-2"`
DisplayName string `json:"displayName" example:"aws-ap-northeast-2"`
}
Owner represents the owner information in S3 bucket list response
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 ParameterKeyValExample ¶ added in v0.11.9
type ParameterKeyValExample struct {
Key string `json:"key" example:"coordinateClose"`
Description string `json:"description" example:"Find specs closest to given coordinate"`
Val []string `json:"val" example:"37.5665/126.9780"`
}
ParameterKeyValExample provides example parameter key-value pairs
type ParameterOptionDetail ¶ added in v0.11.9
type ParameterOptionDetail struct {
Key string `json:"key" example:"coordinateClose"`
Description string `json:"description" example:"Find specs closest to given coordinate (latitude/longitude)"`
Format string `json:"format" example:"latitude/longitude"`
Example []string `json:"example" example:"37.5665/126.9780,35.6762/139.6503"`
}
ParameterOptionDetail provides details for parameter options
type ParameterOptionsInfo ¶ added in v0.11.9
type ParameterOptionsInfo struct {
LocationParameters []ParameterOptionDetail `json:"locationParameters" description:"Available parameter options for location-based prioritization"`
LatencyParameters []ParameterOptionDetail `json:"latencyParameters" description:"Available parameter options for latency-based prioritization"`
}
ParameterOptionsInfo provides parameter options for location and latency metrics
type PatternSet ¶ added in v0.11.22
type PatternSet struct {
Include []string `mapstructure:"include" json:"include,omitempty"`
Exclude []string `mapstructure:"exclude" json:"exclude,omitempty"`
}
PatternSet defines include and exclude patterns for basic image detection
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 PriorityConditionExample ¶ added in v0.11.9
type PriorityConditionExample struct {
Metric string `json:"metric" example:"cost"`
Description string `json:"description" example:"Prioritize by lowest cost"`
Weight string `json:"weight" example:"1.0"`
Parameter []ParameterKeyValExample `json:"parameter,omitempty"`
}
PriorityConditionExample provides example priority conditions
type PriorityInfo ¶
type PriorityInfo struct {
Policy []PriorityCondition `json:"policy"`
}
PriorityInfo is struct for .
type PriorityOptionsInfo ¶ added in v0.11.9
type PriorityOptionsInfo struct {
// Available metrics for prioritization
AvailableMetrics []string `` /* 129-byte string literal not displayed */
// Example priority policies
ExamplePolicies []PriorityConditionExample `json:"examplePolicies" description:"Example priority policies"`
// Parameter options for location and latency metrics
ParameterOptions ParameterOptionsInfo `json:"parameterOptions" description:"Available parameter options for location and latency metrics"`
}
PriorityOptionsInfo provides available priority metrics and their parameters
type ProvisioningEvent ¶ added in v0.11.3
type ProvisioningEvent struct {
// SpecId is the VM specification ID
SpecId string `json:"specId"`
// CspImageName is the CSP-specific image name used in this provisioning attempt
CspImageName string `json:"cspImageName"`
// IsSuccess indicates if the provisioning was successful
IsSuccess bool `json:"isSuccess"`
// ErrorMessage contains the error message if provisioning failed
ErrorMessage string `json:"errorMessage"`
// Timestamp is when this provisioning event occurred
Timestamp time.Time `json:"timestamp"`
// VmName is the name of the VM that was being provisioned
VmName string `json:"vmName"`
// MciId is the MCI ID that this VM belongs to
MciId string `json:"mciId"`
}
ProvisioningEvent represents a single provisioning event for logging
type ProvisioningLog ¶ added in v0.11.3
type ProvisioningLog struct {
// SpecId is the VM specification ID
SpecId string `json:"specId"`
// ConnectionName is the connection configuration name
ConnectionName string `json:"connectionName"`
// ProviderName is the cloud service provider name
ProviderName string `json:"providerName"`
// RegionName is the region name
RegionName string `json:"regionName"`
// FailureCount is the total number of provisioning failures
FailureCount int `json:"failureCount"`
// SuccessCount is the total number of provisioning successes (only recorded if there were previous failures)
SuccessCount int `json:"successCount"`
// FailureTimestamps contains list of failure timestamps
FailureTimestamps []time.Time `json:"failureTimestamps"`
// SuccessTimestamps contains list of success timestamps (only recorded if there were previous failures)
SuccessTimestamps []time.Time `json:"successTimestamps"`
// FailureMessages contains list of failure error messages
FailureMessages []string `json:"failureMessages"`
// FailureImages contains list of CSP image names that failed with this spec
FailureImages []string `json:"failureImages"`
// SuccessImages contains list of CSP image names that succeeded with this spec (only recorded if there were previous failures)
SuccessImages []string `json:"successImages"`
// LastUpdated is the timestamp of the last log update
LastUpdated time.Time `json:"lastUpdated"`
// AdditionalInfo contains any additional information about the provisioning attempts
AdditionalInfo map[string]string `json:"additionalInfo"`
}
ProvisioningLog represents provisioning history for a specific VM spec
type PublicKeyResponse ¶
type PublicKeyResponse struct {
PublicKeyTokenId string `json:"publicKeyTokenId"`
PublicKey string `json:"publicKey"`
}
PublicKeyResponse is struct for containing the public key response
type RecommendSpecReq ¶ added in v0.11.4
type RecommendSpecReq struct {
Filter FilterInfo `json:"filter"`
Priority PriorityInfo `json:"priority"`
Limit string `json:"limit" example:"5" enums:"1,2,30"`
}
RecommendSpecReq is struct for .
type RecommendSpecRequestOptions ¶ added in v0.11.9
type RecommendSpecRequestOptions struct {
// Filter options - available filtering fields and their example values
Filter FilterOptionsInfo `json:"filter" description:"Available filtering options for specs"`
// Priority options - available prioritization metrics and parameters
Priority PriorityOptionsInfo `json:"priority" description:"Available prioritization options for specs"`
// Limit options - example limit values
Limit []string `json:"limit" example:"5,10,20,50" description:"Example limit values for result count"`
}
RecommendSpecRequestOptions is struct for RecommendSpec Request Options
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"`
RepresentativeZone *string `mapstructure:"representativeZone" json:"representativeZone,omitempty"`
}
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 RegionIgnorePatterns ¶ added in v0.11.9
type RegionIgnorePatterns struct {
Patterns []string `yaml:",flow,omitempty"` // Direct array patterns for simplified YAML structure
}
RegionIgnorePatterns represents ignore patterns for a specific region within a CSP
type RegionInfo ¶
type RegionInfo struct {
Region string `json:"region" example:"us-east-1"`
Zone string `json:"zone,omitempty" example:"us-east-1a"`
}
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 RegisterSubnetReq ¶ added in v0.11.9
type RegisterVNetReq ¶ added in v0.11.9
type RegisterVNetReq struct {
ConnectionName string `json:"connectionName" validate:"required"`
CspResourceId string `json:"cspResourceId" validate:"required"`
Name string `json:"name" validate:"required"`
Description string `json:"description,omitempty"`
}
RegisterVNetReq RegisterVNetReq contains the information needed to register a vNet that has already been created via another external method.
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 RequiredAzureResourceForSqlDB ¶ added in v0.10.2
type RequiredAzureResourceForSqlDB struct {
ResourceGroup string `json:"resourceGroup,omitempty" example:"koreacentral"`
}
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
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 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 RestWrapperSecurityGroupUpdateResponse ¶ added in v0.11.9
type RestWrapperSecurityGroupUpdateResponse struct {
Response []SecurityGroupUpdateResponse `json:"response"`
Summary UpdateSummary `json:"summary"`
}
RestWrapperSecurityGroupUpdateResponse is a struct to handle 'Update security group' response toward CB-Tumblebug.
type RetrievedRegionList ¶ added in v0.9.10
type RetrievedRegionList struct {
Region []SpiderRegionZoneInfo `json:"region"`
}
RetrievedRegionList is array struct for Region
type ReviewMciDynamicReqInfo ¶ added in v0.11.3
type ReviewMciDynamicReqInfo struct {
// Overall assessment of the MCI request
OverallStatus string `json:"overallStatus" example:"Ready/Warning/Error"`
OverallMessage string `json:"overallMessage" example:"All VMs can be created successfully"`
CreationViable bool `json:"creationViable"`
EstimatedCost string `json:"estimatedCost,omitempty" example:"$0.50/hour"`
// MCI-level information
MciName string `json:"mciName"`
TotalVmCount int `json:"totalVmCount"`
// Failure policy analysis
PolicyOnPartialFailure string `json:"policyOnPartialFailure" example:"continue"`
PolicyDescription string `` /* 127-byte string literal not displayed */
PolicyRecommendation string `json:"policyRecommendation,omitempty" example:"Consider 'refine' policy for automatic cleanup of failed VMs"`
// VM-level validation results
VmReviews []ReviewSubGroupDynamicReqInfo `json:"vmReviews"`
// Resource availability summary
ResourceSummary ReviewResourceSummary `json:"resourceSummary"`
// Recommendations for improvement
Recommendations []string `json:"recommendations,omitempty"`
}
ReviewMciDynamicReqInfo is struct for review result of MCI dynamic request
type ReviewResourceSummary ¶ added in v0.11.3
type ReviewResourceSummary struct {
TotalProviders int `json:"totalProviders"`
TotalRegions int `json:"totalRegions"`
UniqueSpecs []string `json:"uniqueSpecs"`
UniqueImages []string `json:"uniqueImages"`
ConnectionNames []string `json:"connectionNames"`
// Provider and region details
ProviderNames []string `json:"providerNames"`
RegionNames []string `json:"regionNames"`
// Resource availability counts
AvailableSpecs int `json:"availableSpecs"`
AvailableImages int `json:"availableImages"`
}
ReviewResourceSummary is struct for overall resource summary
type ReviewResourceValidation ¶ added in v0.11.3
type ReviewResourceValidation struct {
ResourceId string `json:"resourceId"`
ResourceName string `json:"resourceName,omitempty"`
IsAvailable bool `json:"isAvailable"`
Status string `json:"status" example:"Available/Unavailable/Unknown"`
Message string `json:"message,omitempty"`
CspResourceId string `json:"cspResourceId,omitempty"`
}
ReviewResourceValidation is struct for resource validation details
type ReviewSubGroupDynamicReqInfo ¶ added in v0.11.9
type ReviewSubGroupDynamicReqInfo struct {
// VM request information
VmName string `json:"vmName"`
SubGroupSize string `json:"subGroupSize"`
// Validation status
Status string `json:"status" example:"Ready/Warning/Error"`
Message string `json:"message" example:"VM can be created successfully"`
CanCreate bool `json:"canCreate"`
// Resource validation details
SpecValidation ReviewResourceValidation `json:"specValidation"`
ImageValidation ReviewResourceValidation `json:"imageValidation"`
// Connection and region info
ConnectionName string `json:"connectionName"`
ProviderName string `json:"providerName"`
RegionName string `json:"regionName"`
// Cost estimation
EstimatedCost string `json:"estimatedCost,omitempty" example:"$0.10/hour"`
// General information and configuration notes
Info []string `json:"info,omitempty"`
// Warnings and errors
Warnings []string `json:"warnings,omitempty"`
Errors []string `json:"errors,omitempty"`
}
ReviewSubGroupDynamicReqInfo is struct for review result of individual VM in MCI dynamic request
type RiskAnalysis ¶ added in v0.11.3
type RiskAnalysis struct {
// SpecRisk contains spec-specific risk analysis
SpecRisk SpecRiskInfo `json:"specRisk"`
// ImageRisk contains image-specific risk analysis
ImageRisk ImageRiskInfo `json:"imageRisk"`
// OverallRisk contains overall combined risk assessment
OverallRisk OverallRiskInfo `json:"overallRisk"`
// Recommendations provides actionable guidance for users
Recommendations []string `json:"recommendations"`
// RecentFailureMessages contains recent failure messages for context (up to 5 most recent, unique messages)
RecentFailureMessages []string `json:"recentFailureMessages,omitempty"`
}
RiskAnalysis represents detailed risk analysis for provisioning
type RuntimeConfig ¶
RuntimeConfig is structure for global variable for cloud config
type ScaleOutSubGroupReq ¶ added in v0.11.9
type ScaleOutSubGroupReq struct {
// Define addtional VMs to scaleOut
NumVMsToAdd string `json:"numVMsToAdd" validate:"required" example:"2"`
}
CreateSubGroupReq is struct to get requirements to create a new server instance
type ScheduleJobListResponse ¶ added in v0.11.16
type ScheduleJobListResponse struct {
Jobs []ScheduleJobStatus `json:"jobs"`
}
ScheduleJobListResponse is struct for list of scheduled jobs
type ScheduleJobRequest ¶ added in v0.11.16
type ScheduleJobRequest struct {
JobType string `json:"jobType" validate:"required" example:"registerCspResources"` // Job type: registerCspResources, registerCspResourcesAll
NsId string `json:"nsId" validate:"required" example:"default"` // Namespace ID
IntervalSeconds int `json:"intervalSeconds" validate:"required,min=10" example:"60"` // Execution interval in seconds
// Job-specific parameters (for registerCspResources)
ConnectionName string `json:"connectionName,omitempty" example:"aws-ap-northeast-2"` // Connection configuration name
MciNamePrefix string `json:"mciNamePrefix,omitempty" example:"mci-01"` // MCI name prefix
Option string `json:"option,omitempty" example:"vNet,securityGroup"` // Resource types (csv): vNet, securityGroup, sshKey, vm, dataDisk, customImage. Empty: all
MciFlag string `json:"mciFlag,omitempty" example:"y"` // MCI flag: y or n
}
ScheduleJobRequest is struct for creating a scheduled job
type ScheduleJobStatus ¶ added in v0.11.16
type ScheduleJobStatus struct {
JobId string `json:"jobId" example:"registerCspResources-default-1698765432"`
JobType string `json:"jobType" example:"registerCspResources"`
NsId string `json:"nsId" example:"default"`
Status string `json:"status" example:"Scheduled"`
IntervalSeconds int `json:"intervalSeconds" example:"60"`
Enabled bool `json:"enabled" example:"true"`
CreatedAt time.Time `json:"createdAt" example:"2023-10-27T10:30:00Z"`
LastExecutedAt time.Time `json:"lastExecutedAt,omitempty" example:"2023-10-27T11:30:00Z"`
NextExecutionAt time.Time `json:"nextExecutionAt,omitempty" example:"2023-10-27T12:30:00Z"`
ExecutionCount int `json:"executionCount" example:"5"`
SuccessCount int `json:"successCount" example:"4"` // Total successful executions
FailureCount int `json:"failureCount" example:"1"` // Total failed executions
ConsecutiveFailures int `json:"consecutiveFailures" example:"0"` // Current consecutive failures
AutoDisabled bool `json:"autoDisabled" example:"false"` // Whether job was auto-disabled due to failures
LastError string `json:"lastError,omitempty" example:""`
LastResult string `json:"lastResult,omitempty" example:"Success (execution #5)"`
// Job-specific parameters
ConnectionName string `json:"connectionName,omitempty" example:"aws-ap-northeast-2"`
MciNamePrefix string `json:"mciNamePrefix,omitempty" example:"mci-01"`
Option string `json:"option,omitempty" example:""`
MciFlag string `json:"mciFlag,omitempty" example:"y"`
}
ScheduleJobStatus is struct for scheduled job status response
type SearchImageRequest ¶ added in v0.10.7
type SearchImageRequest struct {
// MatchedSpecId is the ID of the matched spec.
// If specified, only the images that match this spec will be returned.
// This is useful when the user wants to search images that match a specific spec.
MatchedSpecId string `` /* 179-byte string literal not displayed */
// 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."`
// IncludeBasicImageOnly is to return basic OS distribution only without additional applications.
// If true, the search results will include only the basic OS distribution without additional applications.
// If false or not specified, the search results will include images with additional applications installed.
IncludeBasicImageOnly *bool `json:"includeBasicImageOnly" example:"false" description:"Return basic OS distribution only without additional applications."`
// MaxResults is the maximum number of images to be returned in the search results.
// If not specified, all images will be returned.
// If specified, the number of images returned will be limited to the specified value.
MaxResults *int `` /* 155-byte string literal not displayed */
// 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 {
// MatchedSpecId is the ID of the matched spec.
// If specified, only the images that match this spec will be returned.
// This is useful when the user wants to search images that match a specific spec.
MatchedSpecId []string `` /* 169-byte string literal not displayed */
// 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."`
// MaxResults is the maximum number of images to be returned in the search results.
// If not specified, all images will be returned.
// If specified, the number of images returned will be limited to the specified value.
MaxResults []int `` /* 155-byte string literal not displayed */
// 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 []ImageInfo `json:"imageList"`
}
SearchImageResponse is struct for Search Image Request
type SecurityGroupInfo ¶ added in v0.11.9
type SecurityGroupInfo 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 []FirewallRuleInfo `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:""`
}
SecurityGroupInfo is a struct that represents TB security group object.
type SecurityGroupReq ¶ added in v0.11.9
type SecurityGroupReq struct {
Name string `json:"name" validate:"required"`
ConnectionName string `json:"connectionName" validate:"required"`
VNetId string `json:"vNetId" validate:"required"`
Description string `json:"description"`
FirewallRules *[]FirewallRuleReq `json:"firewallRules"` // validate:"required"`
// CspResourceId is required to register object from CSP (option=register)
CspResourceId string `json:"cspResourceId" example:"required for option=register only. ex: csp-06eb41e14121c550a"`
}
SecurityGroupReq is a struct to handle 'Create security group' request toward CB-Tumblebug.
type SecurityGroupUpdateReq ¶ added in v0.11.9
type SecurityGroupUpdateReq struct {
FirewallRules []FirewallRuleReq `json:"firewallRules"`
}
SecurityGroupUpdateReq is a struct to handle 'Update security group' request toward CB-Tumblebug.
type SecurityGroupUpdateResponse ¶ added in v0.11.9
type SecurityGroupUpdateResponse struct {
Id string `json:"id"`
Name string `json:"name"`
Success bool `json:"success"`
Message string `json:"message,omitempty"`
Updated SecurityGroupInfo `json:"updated,omitempty"`
Previous SecurityGroupInfo `json:"previous,omitempty"`
}
SecurityGroupUpdateResponse is a struct to handle 'Update security group' response toward CB-Tumblebug.
type SetK8sNodeGroupAutoscalingReq ¶ added in v0.11.9
type SetK8sNodeGroupAutoscalingReq struct {
OnAutoScaling string `json:"onAutoScaling" example:"true"`
}
SetK8sNodeGroupAutoscalingReq is a struct to handle 'Set K8sNodeGroup's Autoscaling' request toward CB-Tumblebug.
type SetK8sNodeGroupAutoscalingRes ¶ added in v0.11.9
type SetK8sNodeGroupAutoscalingRes struct {
Result string `json:"result" example:"true"`
}
SetK8sNodeGroupAutoscalingRes is a struct to handle 'Set K8sNodeGroup's Autoscaling' response from CB-Tumblebug.
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
type SnapshotReq ¶ added in v0.11.14
type SnapshotReq struct {
Name string `json:"name" example:"custom-image01" validate:"required"`
Description string `json:"description" example:"Description about this custom image"`
}
SnapshotReq is a struct to handle 'Create VM snapshot' request toward CB-Tumblebug.
type SpecAvailabilityBatchResult ¶ added in v0.11.9
type SpecAvailabilityBatchResult struct {
Provider string `json:"provider" example:"alibaba"`
SpecResults []SpecAvailabilityInfo `json:"specResults"`
TotalSpecs int `json:"totalSpecs" example:"10"`
SuccessfulQueries int `json:"successfulQueries" example:"8"`
FailedQueries int `json:"failedQueries" example:"2"`
TotalDurationMs int64 `json:"totalDurationMs" example:"12500"`
FastestQueryMs int64 `json:"fastestQueryMs" example:"850"`
SlowestQueryMs int64 `json:"slowestQueryMs" example:"2100"`
AverageQueryMs int64 `json:"averageQueryMs" example:"1250"`
}
SpecAvailabilityBatchResult represents the batch query result for multiple specs
type SpecAvailabilityInfo ¶ added in v0.11.9
type SpecAvailabilityInfo struct {
Provider string `json:"provider" example:"alibaba"`
CspSpecName string `json:"cspSpecName" example:"ecs.t5.large"`
AvailableRegions []SpecRegionZoneInfo `json:"availableRegions"`
QueryDurationMs int64 `json:"queryDurationMs" example:"1250"`
Success bool `json:"success" example:"true"`
ErrorMessage string `json:"errorMessage,omitempty" example:"Spec not available"`
}
SpecAvailabilityInfo represents the availability information for a spec
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 SpecCleanupResult ¶ added in v0.11.9
type SpecCleanupResult struct {
Provider string `json:"provider" example:"alibaba"`
Region string `json:"region" example:"ap-northeast-1"`
TotalSpecsChecked int `json:"totalSpecsChecked" example:"50"`
SpecsToDelete int `json:"specsToDelete" example:"5"`
SpecsDeleted int `json:"specsDeleted" example:"5"`
CleanupDurationMs int64 `json:"cleanupDurationMs" example:"15000"`
AvailabilityCheckMs int64 `json:"availabilityCheckMs" example:"12500"`
FailedDeletions []string `json:"failedDeletions,omitempty" example:"ecs.t5.large"`
AvailabilityResults SpecAvailabilityBatchResult `json:"availabilityResults"`
// Detailed information about specs that were identified for deletion
SpecsToIgnoreInfo *SpecsToIgnoreData `json:"specsToIgnoreInfo,omitempty"`
}
SpecCleanupResult represents the result of cleaning up unavailable specs
type SpecFetchOption ¶ added in v0.11.0
type SpecFetchOption struct {
// Specific providers to target for the spec fetching operation (ex: ["aws", "gcp"])
// If specified, only these providers will be processed (excludedProviders will be ignored)
TargetProviders []string `` /* 148-byte string literal not displayed */
// 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 SpecImagePairReviewReq ¶ added in v0.12.0
type SpecImagePairReviewReq struct {
SpecId string `json:"specId" validate:"required" example:"aws+ap-northeast-2+t3.nano"`
ImageId string `json:"imageId" validate:"required" example:"ami-01f71f215b23ba262"`
}
SpecImagePairReviewReq is struct for spec-image pair review request
type SpecImagePairReviewResult ¶ added in v0.12.0
type SpecImagePairReviewResult struct {
// Review summary
IsValid bool `json:"isValid"`
Status string `json:"status" example:"OK/Warning/Error"`
Message string `json:"message" example:"Spec and image pair is valid for provisioning"`
// Input parameters
SpecId string `json:"specId"`
ImageId string `json:"imageId"`
// Spec details
SpecValidation ReviewResourceValidation `json:"specValidation"`
SpecDetails *SpecInfo `json:"specDetails,omitempty"`
// Image details
ImageValidation ReviewResourceValidation `json:"imageValidation"`
ImageDetails *ImageInfo `json:"imageDetails,omitempty"`
// Connection info
ConnectionName string `json:"connectionName,omitempty"`
ProviderName string `json:"providerName,omitempty"`
RegionName string `json:"regionName,omitempty"`
// Cost estimation
EstimatedCost string `json:"estimatedCost,omitempty" example:"$0.0052/hour"`
// Additional info
Info []string `json:"info,omitempty"`
Warnings []string `json:"warnings,omitempty"`
Errors []string `json:"errors,omitempty"`
}
SpecImagePairReviewResult is struct for spec-image pair review result
type SpecInfo ¶ added in v0.11.9
type SpecInfo struct {
// Id is unique identifier for the object
Id string `json:"id" example:"aws+ap-southeast+csp-06eb41e14121c550a" 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"`
RegionLatitude float64 `json:"regionLatitude"`
RegionLongitude float64 `json:"regionLongitude"`
// 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"`
}
SpecInfo is a struct that represents TB spec object.
type SpecRegionZoneInfo ¶ added in v0.11.9
type SpecRegionZoneInfo struct {
RegionName string `json:"regionName" example:"ap-northeast-1"`
Zones []string `json:"zones" example:"ap-northeast-1a,ap-northeast-1b"`
}
SpecRegionZoneInfo represents the available zones for a specific region
type SpecReq ¶ added in v0.11.9
type SpecReq 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"`
}
SpecReq is a struct to handle 'Register spec' request toward CB-Tumblebug.
type SpecRiskInfo ¶ added in v0.11.3
type SpecRiskInfo struct {
// Level is the risk level: "low", "medium", "high"
Level string `json:"level"`
// Message explains the spec-specific risk reasoning
Message string `json:"message"`
// FailedImageCount is the number of different images that failed with this spec
FailedImageCount int `json:"failedImageCount"`
// SucceededImageCount is the number of different images that succeeded with this spec
SucceededImageCount int `json:"succeededImageCount"`
// TotalFailures is the total number of failures for this spec
TotalFailures int `json:"totalFailures"`
// TotalSuccesses is the total number of successes for this spec
TotalSuccesses int `json:"totalSuccesses"`
// FailureRate is the overall failure rate for this spec (0.0 to 1.0)
FailureRate float64 `json:"failureRate"`
}
SpecRiskInfo represents risk analysis specific to the VM specification
type SpecsToIgnoreData ¶ added in v0.11.9
type SpecsToIgnoreData struct {
LastUpdated time.Time `json:"last_updated"`
Description string `json:"description"`
GlobalIgnoreSpecs map[string][]string `json:"global_ignore_specs"`
RegionSpecificIgnore map[string]map[string][]string `json:"region_specific_ignore"`
}
SpecsToIgnoreData represents the structure for specs that should be ignored during availability checks
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 SpiderAllVpcInfoWrapper ¶ added in v0.11.3
type SpiderAllVpcInfoWrapper struct {
ResourceType string `json:"resourceType"`
AllListInfo SpiderAllVpcListInfo `json:"allListInfo"`
}
SpiderAllVpcInfoWrapper is struct for wrapping VPC info response from CB-Spider
type SpiderAllVpcListInfo ¶ added in v0.11.3
type SpiderAllVpcListInfo struct {
MappedInfoList []SpiderVpcInfo `json:"mappedInfoList"`
OnlySpiderList []SpiderVpcInfo `json:"onlySpiderList"`
OnlyCSPInfoList []SpiderVpcInfo `json:"onlyCSPInfoList"`
}
SpiderAllVpcListInfo is struct for VPC list info from CB-Spider
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 SpiderMyImageReq ¶
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 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 SpiderNameIdSystemId ¶
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 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" description:"Information about the VM spec"` // Information about the VM spec
VMSpecName string `json:"VMSpecName" example:"t2.micro"` // Name of 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 SpiderSubnetInfo ¶
type SpiderSubnetInfo struct {
IId IID `json:"iId"`
IPv4_CIDR string `json:"ipv4_CIDR"`
KeyValueList []KeyValue `json:"keyValueList"`
TagList []KeyValue `json:"tagList"`
}
SpiderSubnetInfo is struct for Subnet information from CB-Spider
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 SpiderVpcInfo ¶ added in v0.11.3
type SpiderVpcInfo struct {
IId IID `json:"iId"`
IPv4_CIDR string `json:"ipv4_CIDR"`
SubnetInfoList []SpiderSubnetInfo `json:"subnetInfoList"`
KeyValueList []KeyValue `json:"keyValueList"`
TagList []KeyValue `json:"tagList"`
}
SpiderVpcInfo is struct for VPC information from CB-Spider
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 SshCmdResultForAPI ¶ added in v0.11.9
type SshCmdResultForAPI 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"`
Error string `json:"error"` // String representation of error for JSON serialization
}
SshCmdResultForAPI is struct for SshCmd Result with string error for API response
type SshHostKeyInfo ¶ added in v0.12.2
type SshHostKeyInfo struct {
// HostKey is the SSH host public key (base64 encoded)
HostKey string `json:"hostKey,omitempty"`
// KeyType is the type of the SSH host key (e.g., ssh-rsa, ssh-ed25519, ecdsa-sha2-nistp256)
KeyType string `json:"keyType,omitempty" example:"ssh-ed25519"`
// Fingerprint is the SHA256 fingerprint of the SSH host key
Fingerprint string `json:"fingerprint,omitempty" example:"SHA256:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"`
// FirstUsedAt is the timestamp when the host key was first stored (TOFU moment)
FirstUsedAt string `json:"firstUsedAt,omitempty" example:"2024-01-15T10:30:00Z"`
}
SshHostKeyInfo is struct for SSH host key information (TOFU verification)
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 SshKeyInfo ¶ added in v0.11.9
type SshKeyInfo 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:""`
}
SshKeyInfo is a struct that represents TB SSH key object.
type SshKeyReq ¶ added in v0.11.9
type SshKeyReq 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"`
}
SshKeyReq is a struct to handle 'Create SSH key' request toward CB-Tumblebug.
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 SubGroupInfo ¶ added in v0.11.9
type SubGroupInfo 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"`
}
SubGroupInfo is struct to define an object that includes homogeneous VMs
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 SubnetInfo ¶ added in v0.11.9
type SubnetInfo 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"`
}
SubnetInfo is a struct that represents TB subnet object.
type SubnetReq ¶ added in v0.11.9
type SubnetReq 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"`
}
SubnetReq is a struct that represents TB subnet object.
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 TencentSpecificProperty ¶ added in v0.10.7
type TencentSpecificProperty struct {
}
* Note: nothing is needed for Tencent currently.
type UpdateScheduleJobRequest ¶ added in v0.11.16
type UpdateScheduleJobRequest struct {
IntervalSeconds *int `json:"intervalSeconds,omitempty" example:"60"` // New execution interval in seconds
Enabled *bool `json:"enabled,omitempty" example:"true"` // Enable or disable the job
}
UpdateScheduleJobRequest is struct for updating a scheduled job
type UpdateSpecListByAvailabilityRequest ¶ added in v0.11.9
type UpdateSpecListByAvailabilityRequest struct {
Provider string `json:"provider" validate:"required" example:"alibaba"`
}
type UpdateSummary ¶ added in v0.11.9
type UpdateSummary struct {
Total int `json:"total"`
Success int `json:"success"`
Failed int `json:"failed"`
AllSuccess bool `json:"allSuccess"`
}
UpdateSummary provides overall summary of the update operation
type UpgradeK8sClusterReq ¶ added in v0.11.9
type UpgradeK8sClusterReq struct {
Version string `json:"version" example:"1.30.1-alyun.1"`
}
UpgradeK8sClusterReq is a struct to handle 'Upgrade K8sCluster' request toward CB-Tumblebug.
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 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 VNetInfo ¶ added in v0.11.9
type VNetInfo 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 []SubnetInfo `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:""`
}
VNetInfo is a struct that represents TB vNet object.
type VNetReq ¶ added in v0.11.9
type VNetReq 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 []SubnetReq `json:"subnetInfoList"`
Description string `json:"description" example:"vnet00 managed by CB-Tumblebug"`
}
VNetReq is a struct to handle 'Create vNet' request toward CB-Tumblebug.
type VPNDetail ¶ added in v0.10.7
type VPNDetail struct {
GatewaySubnet GatewaySubnetDetail `mapstructure:"gateway-subnet" json:"gatewaySubnet"`
}
VPNDetail is structure for VPN configuration
type VmCreationError ¶ added in v0.11.3
type VmCreationError struct {
// VmName is the name of the VM that failed
VmName string `json:"vmName"`
// Error is the error message
Error string `json:"error"`
// Phase indicates when the error occurred
Phase string `json:"phase"` // "object_creation", "vm_creation"
// Timestamp when the error occurred
Timestamp string `json:"timestamp"`
}
VmCreationError represents a single VM creation error
type VmInfo ¶ added in v0.11.9
type VmInfo 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"`
// SshHostKeyInfo contains SSH host key information for TOFU (Trust On First Use) verification
SshHostKeyInfo *SshHostKeyInfo `json:"sshHostKeyInfo,omitempty"`
// CommandStatus stores the status and history of remote commands executed on this VM
CommandStatus []CommandStatusInfo `json:"commandStatus,omitempty"`
AddtionalDetails []KeyValue `json:"addtionalDetails,omitempty"`
}
type VmPriority ¶ added in v0.11.9
VmPriority is struct for VmPriority
type VmRecommendInfo ¶ added in v0.11.9
type VmRecommendInfo struct {
VmReq VmRecommendReq `json:"vmReq"`
VmPriority []VmPriority `json:"vmPriority"`
PlacementAlgo string `json:"placementAlgo"`
PlacementParam []KeyValue `json:"placementParam"`
}
VmRecommendInfo is struct for VmRecommendInfo
type VmRecommendReq ¶ added in v0.11.9
type VmRecommendReq 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"`
}
VmRecommendReq is struct for VmRecommendReq
type VmSnapshotResult ¶ added in v0.11.14
type VmSnapshotResult struct {
SubGroupId string `json:"subGroupId" example:"g1"`
VmId string `json:"vmId" example:"g1-1"`
VmName string `json:"vmName" example:"aws-ap-northeast-2-g1-1"`
Status string `json:"status" example:"Success" enums:"Success,Failed"`
ImageId string `json:"imageId,omitempty" example:"custom-image-g1"`
ImageInfo ImageInfo `json:"imageInfo,omitempty"`
Error string `json:"error,omitempty"`
}
VmSnapshotResult represents the result of creating a snapshot for a single VM
type VmStatusInfo ¶ added in v0.11.9
type VmStatusInfo 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"`
}
VmStatusInfo is to define simple information of VM with updated status
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"`
}