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 model is to handle object of CB-Tumblebug ¶
Package infra is to handle REST API for infra ¶
Package model is to handle object of CB-Tumblebug ¶
Package model is to handle object of CB-Tumblebug ¶
Package infra is to handle REST API for infra ¶
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 infra is to handle REST API for infra
Index ¶
- Constants
- Variables
- func BatchStoreLatencyInfo(latencyData []LatencyInfo) error
- func DeriveObjectStorageStatus(conditions []Condition) string
- func DeriveSubnetStatus(conditions []Condition) string
- func DeriveVNetStatus(conditions []Condition) string
- func DeriveVpnStatus(conditions []Condition) string
- func GetLabelConstantsMap() map[string]string
- func GetLabelTypes() []string
- func GetLatencyValue(sourceRegion, targetRegion string) (float64, error)
- func IsConditionTrue(conditions []Condition, condType ConditionType) bool
- func IsDefaultDiskType(rootDiskType string) bool
- func NormalizeDiskTypeForQuery(rootDiskType string) string
- func SetCondition(conditions *[]Condition, condType ConditionType, status ConditionStatus, ...)
- func ShouldRestoreToAvailable(conditions []Condition) bool
- func StoreLatencyInfo(sourceRegion, targetRegion string, latencyMs float64) error
- type AgentInstallContent
- type AgentInstallContentWrapper
- type AlibabaSpecificProperty
- type AlternativeNodeConfigCandidate
- type AssetsSummaryResponse
- type AttachDetachDataDiskReq
- type AutoAction
- type AutoCondition
- type AvailabilityQuery
- type AvailabilityResult
- type AvailableZonesError
- type AvailableZonesInfo
- type AwsSpecificProperty
- type AzureBgpPeeringCidrs
- 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 CSPImageIgnorePatterns
- type CSPNetworkDetail
- type CancelTaskRequest
- type CancelTaskResponse
- type ChangeK8sNodeGroupAutoscaleSizeReq
- type ChangeK8sNodeGroupAutoscaleSizeRes
- type CheckInfraDynamicReqInfo
- type CheckK8sClusterDynamicReqInfo
- type CheckNodeDynamicReqInfo
- type CheckNodeGroupDynamicReqInfo
- type Cloud
- type CloudDriverInfo
- type CloudImageIgnoreConfig
- type CloudInfo
- type CloudNetworkInfo
- type CloudSetting
- type CloudSpecIgnoreConfig
- type CommandDoneSummary
- type CommandExecutionStatus
- type CommandLogEntry
- type CommandStatusFilter
- type CommandStatusInfo
- type CommandStatusListResponse
- type CommandStreamEvent
- type CommandStreamEventType
- type Condition
- type ConditionStatus
- type ConditionType
- type ConfigInfo
- type ConfigReq
- type ConnConfig
- type ConnConfigList
- type ContextKey
- type ControlNodeResult
- type ControlNodeResultWrapper
- type CorsRule
- type CreateNodeGroupDynamicReq
- type CreateNodeGroupReq
- type Credential
- type CredentialHolderInfo
- type CredentialHolderList
- type CredentialInfo
- type CredentialReq
- type CspResourceStatusRequest
- type CspResourceStatusResponse
- type CspSpecificProperty
- type CustomImageReq
- type CustomImageStatus
- type DataDiskInfo
- type DataDiskNodeReq
- type DataDiskReq
- type DataDiskUpsizeReq
- type DfAgentInstallReq
- type DiskStatus
- type ExecCredential
- type ExecCredentialStatus
- type ExecutionTask
- type ExecutionTaskList
- type ExecutionTaskListResponse
- type ExtractPatterns
- type ExtractPatternsInfo
- type FileDownloadReq
- 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 GlobalDnsBulkDeleteReq
- type GlobalDnsBulkDeleteResponse
- type GlobalDnsBulkDeleteResult
- type GlobalDnsDeleteReq
- type GlobalDnsIPSource
- type GlobalDnsInfraSource
- type GlobalDnsLabelSource
- type GlobalDnsRecordInfo
- type GlobalDnsRecordReq
- type GlobalIgnorePatterns
- type HandlingCommandCountResponse
- type HostedZoneInfo
- type IID
- type IdList
- type IdNameInDetailInfo
- type ImageFetchOption
- type ImageInfo
- type ImageReq
- type ImageRiskInfo
- type ImageSourceCommandHistory
- type ImageStatus
- type ImageSummary
- type InfraAccessInfo
- type InfraAssociatedResourceList
- type InfraClusterInfo
- type InfraClusterList
- type InfraCmdReq
- type InfraConnectionConfigCandidatesReq
- type InfraCreationErrors
- type InfraDynamicReq
- type InfraDynamicTemplateInfo
- type InfraDynamicTemplateListResponse
- type InfraDynamicTemplateReq
- type InfraFileTransferAndCmdResult
- type InfraFileTransferAndCmdResultForAPI
- type InfraHandlingCommandCountResponse
- type InfraInfo
- type InfraNodeAccessInfo
- type InfraNodeGroupAccessInfo
- type InfraPolicyInfo
- type InfraPolicyReq
- type InfraRecommendReq
- type InfraReq
- type InfraSnapshotResult
- type InfraSshCmdResult
- type InfraSshCmdResultForAPI
- type InfraStatusInfo
- 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 K8sClusterDynamicTemplateInfo
- type K8sClusterDynamicTemplateListResponse
- type K8sClusterDynamicTemplateReq
- type K8sClusterFailedInfo
- type K8sClusterInfo
- type K8sClusterKubeconfigResponse
- 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 K8sClusterTemplateApplyReq
- type K8sClusterTokenResponse
- 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 MatchPolicy
- type McNetConfigurationDetails
- type McNlbInfo
- type MonAgentInstallReq
- type MonResultSimple
- type MonResultSimpleResponse
- type MultihostBenchmarkReq
- type NLBAddRemoveNodeReq
- type NLBFeatureSupport
- type NLBHealthCheckerInfo
- type NLBHealthCheckerReq
- type NLBHealthInfo
- type NLBInfo
- type NLBListenerInfo
- type NLBListenerReq
- type NLBReq
- type NLBSupportResponse
- type NLBTargetGroupInfo
- type NLBTargetGroupReq
- type NlbSetting
- type Nlbsw
- type NodeCreationError
- type NodeGroupInfo
- type NodeInfo
- type NodePriority
- type NodeRecommendInfo
- type NodeRecommendReq
- type NodeSnapshotResult
- type NodeStatusInfo
- type NsInfo
- type NsReq
- type OSArchitecture
- type OSPlatform
- type OSTypeDetail
- type Object
- type ObjectStorageCreateRequest
- type ObjectStorageFeatureSupport
- type ObjectStorageGetCorsResponse
- type ObjectStorageGetVersioningResponse
- type ObjectStorageInfo
- type ObjectStorageListBucketsResponse
- type ObjectStorageListObjectVersionsResponse
- type ObjectStorageListObjectsResponse
- type ObjectStorageListResponse
- type ObjectStorageLocationResponse
- type ObjectStoragePresignedUrlResponse
- type ObjectStorageReconcileResponse
- type ObjectStorageSetCorsRequest
- type ObjectStorageSetVersioningRequest
- type ObjectStorageSupportResponse
- type ObjectVersion
- type OpenStackSpecificProperty
- 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 ProviderAssetSummary
- type ProvisioningEvent
- type ProvisioningLog
- type PublicKeyResponse
- type Range
- type ReadyzResponse
- type RecommendAlternativeNodeConfigReq
- type RecommendAlternativeNodeConfigResponse
- 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 RegistrationOverview
- type RequiredAWSResourceForSqlDB
- type RequiredAzureResourceForSqlDB
- type RequiredCSPResourceForSqlDB
- type RequiredNCPResourceForSqlDB
- type ReservedIPsDetail
- type ResourceCountOverview
- type ResourceDeleteResult
- type ResourceDeleteResults
- type ResourceDetail
- type ResourceIds
- type ResourceOnCsp
- type ResourceOnCspInfo
- type ResourceOnSpider
- type ResourceOnSpiderInfo
- type ResourceOnTumblebug
- type ResourceOnTumblebugInfo
- type ResourceReconcileResult
- type ResourceReconcileResults
- type ResourceStatusInfo
- type ResourcesByManageType
- type Response
- type RestGetGlobalDnsRecordResponse
- type RestGetHostedZonesResponse
- type RestPostSqlDBRequest
- type RestPostVpnRequest
- type RestWrapperSecurityGroupUpdateResponse
- type RetrievedRegionList
- type ReviewInfraDynamicReqInfo
- type ReviewNodeGroupDynamicReqInfo
- type ReviewResourceSummary
- type ReviewResourceValidation
- type RiskAnalysis
- type RuntimeConfig
- type ScaleOutNodeGroupReq
- type ScheduleJobListResponse
- type ScheduleJobRequest
- type ScheduleJobStatus
- type SearchImageRequest
- type SearchImageRequestOptions
- type SearchImageResponse
- type SecurityGroupInfo
- type SecurityGroupReq
- type SecurityGroupTemplateApplyReq
- type SecurityGroupTemplateInfo
- type SecurityGroupTemplateListResponse
- type SecurityGroupTemplateReq
- 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 SpecDiff
- type SpecFetchOption
- type SpecImagePairReviewReq
- type SpecImagePairReviewResult
- type SpecInfo
- type SpecMatchCriteria
- type SpecRegionZoneInfo
- type SpecReq
- type SpecRiskInfo
- type SpecSummary
- type SpecsToIgnoreData
- type SpiderAccessInfo
- type SpiderAddonsInfo
- type SpiderAllList
- type SpiderAllListWrapper
- type SpiderAllVpcInfoWrapper
- type SpiderAllVpcListInfo
- type SpiderBooleanInfo
- 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 SpiderNLBNodeGroupInfo
- type SpiderNLBNodeGroupReq
- type SpiderNLBReqInfo
- type SpiderNLBReqInfoWrapper
- 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 SshKeyComplementReq
- type SshKeyInfo
- type SshKeyReq
- type SshKeyUpdateReq
- type StatusCountInfo
- type SubnetDetail
- type SubnetInfo
- type SubnetReq
- type SystemLabelInfo
- type TemplateApplyReq
- type UpdateScheduleJobRequest
- type UpdateSpecListByAvailabilityRequest
- type UpdateSummary
- type UpgradeK8sClusterReq
- type VNetDesignRequest
- type VNetDesignResponse
- type VNetDetail
- type VNetDetails
- type VNetInfo
- type VNetPolicy
- type VNetReq
- type VNetTemplateApplyReq
- type VNetTemplateInfo
- type VNetTemplateListResponse
- type VNetTemplateReq
- type VPNDetail
- type VpnHealthCheckRequest
- type VpnHealthCheckResponse
- type VpnHealthCheckSourceNodeInfo
- type VpnHealthCheckTargetNodeInfo
- type VpnIdList
- type VpnInfo
- type VpnInfoList
- type VpnPingDirectionResult
- type VpnPingStats
- type VpnReconcileResponse
- type VpnSiteDetail
- type ZoneAvailability
Constants ¶
const ( StrManager string = "cb-tumblebug" StrUidPrefix string = "tb" 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" StrSpiderAPIUsername string = "TB_SPIDER_USERNAME" StrSpiderAPIPassword string = "TB_SPIDER_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" StrVaultAddr string = "VAULT_ADDR" StrVaultToken string = "VAULT_TOKEN" 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" StrNode string = "node" StrSpiderVM string = "vm" // CB-Spider uses "vm" as the resource type for VMs StrInfra string = "infra" StrNodeGroup string = "nodeGroup" StrK8s string = "k8s" StrK8sCluster string = "k8sCluster" StrKubernetes string = "kubernetes" StrCluster string = "cluster" StrContainer string = "container" StrNamespace string = "ns" StrTemplate string = "template" StrCommon string = "common" StrGlobalDns string = "globalDns" StrEmpty string = "" // SystemCommonNs is const for SystemCommon NameSpace ID SystemCommonNs string = "system" // CredentialHolderHeaderKey is the HTTP header key for specifying credential holder CredentialHolderHeaderKey string = "x-credential-holder" )
const ( // Common reasons for Ready condition ReasonCreating = "Creating" ReasonCreationFailed = "CreationFailed" ReasonDeleting = "Deleting" ReasonDeletionFailed = "DeletionFailed" ReasonRegistering = "Registering" ReasonRegisterFailed = "RegisterFailed" ReasonDeregistering = "Deregistering" ReasonDeregisterFailed = "DeregisterFailed" ReasonAvailable = "Available" // Reasons for Synced condition ReasonResourceNotFound = "ResourceNotFound" ReasonSyncCheckFailed = "SyncCheckFailed" // ReasonRestored indicates the resource status was restored to Available // by Reconcile after a previously failed terminal operation // (e.g., DeletionFailed) when the CSP resource was confirmed to still exist. ReasonRestored = "Restored" // Reasons for ChildrenReady condition ReasonNoChildren = "NoChildren" ReasonAllReady = "AllReady" ReasonSubnetFailed = "SubnetFailed" ReasonSubnetInProgress = "SubnetInProgress" )
Reason constants for Condition.Reason field (CamelCase, machine-readable)
const ( ResourceStatusAvailable = "Available" ResourceStatusCreating = "Creating" ResourceStatusDeleting = "Deleting" ResourceStatusFailed = "Failed" ResourceStatusRegistering = "Registering" ResourceStatusDeregistering = "Deregistering" ResourceStatusUnknown = "Unknown" )
--------------------------------------------------------------------------- Resource Status Constants --------------------------------------------------------------------------- Common status values shared across all resource types (VNet, Subnet, VPN, ObjectStorage, SqlDB, etc.). Each resource domain re-exports these as domain-specific aliases so that (1) code reads naturally in its own context, (2) a domain can introduce unique statuses without affecting others, and (3) existing code remains unchanged.
const ( NetworkStatusAvailable = ResourceStatusAvailable NetworkStatusCreating = ResourceStatusCreating NetworkStatusDeleting = ResourceStatusDeleting NetworkStatusFailed = ResourceStatusFailed NetworkStatusRegistering = ResourceStatusRegistering NetworkStatusDeregistering = ResourceStatusDeregistering NetworkStatusUnknown = ResourceStatusUnknown )
-- Network resource status aliases -- Network resources (VNet, Subnet, VPN) use all common statuses. VPN does not use Registering/Deregistering but the aliases are kept for consistency.
const ( StorageStatusAvailable = ResourceStatusAvailable StorageStatusCreating = ResourceStatusCreating StorageStatusDeleting = ResourceStatusDeleting StorageStatusFailed = ResourceStatusFailed StorageStatusUnknown = ResourceStatusUnknown )
-- Storage/DB resource status aliases -- Storage resources (ObjectStorage, SqlDB) do not support Register/Deregister operations.
const ( AttachDataDisk string = "attach" DetachDataDisk string = "detach" AvailableDataDisk string = "available" )
type DataDiskCmd string
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" // StatusRegistering is const for Registering (when registering existing CSP Node) StatusRegistering string = "Registering" // StatusUndefined is const for Undefined StatusUndefined string = "Undefined" // StatusEmpty is const for Empty (Infra has no Nodes) StatusEmpty string = "Empty" // StatusComplete is const for Complete StatusComplete string = "None" )
const ( // PolicyContinue continues with partial Infra creation when some Nodes fail PolicyContinue string = "continue" // PolicyRollback cleans up entire Infra when any Node creation fails PolicyRollback string = "rollback" // PolicyRefine marks failed Nodes 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 infra automation
const ( // AutoActionScaleOut is const for "ScaleOut" action. AutoActionScaleOut string = "ScaleOut" // AutoActionScaleIn is const for "ScaleIn" action. AutoActionScaleIn string = "ScaleIn" )
Action for infra automation
const ( // SSHConnectionTimeoutSeconds is the timeout for establishing SSH connection SSHConnectionTimeoutSeconds = 30 // SSHCommandDefaultTimeoutMinutes is the default timeout for SSH command execution SSHCommandDefaultTimeoutMinutes = 30 // SSHCommandMaxTimeoutMinutes is the maximum allowed timeout for SSH command execution SSHCommandMaxTimeoutMinutes = 120 // SSHCommandMinTimeoutMinutes is the minimum allowed timeout for SSH command execution SSHCommandMinTimeoutMinutes = 1 )
SSH Command Timeout Constants
const ( LabelSystemPrefix string = "sys." 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" LabelInfraId string = "sys.infraId" LabelInfraName string = "sys.infraName" LabelInfraUid string = "sys.infraUid" LabelInfraDescription string = "sys.infraDescription" LabelNodeGroupId string = "sys.nodeGroupId" 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" LabelSubnetId string = "sys.subnetId" LabelPlaceholder string = "sys.placeholder" LabelRequiresComplement string = "sys.requiresComplement" )
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() any{ StrSSHKey: func() any { return &SshKeyInfo{} }, StrImage: func() any { return &ImageInfo{} }, StrCustomImage: func() any { return &ImageInfo{} }, StrSecurityGroup: func() any { return &SecurityGroupInfo{} }, StrSpec: func() any { return &SpecInfo{} }, StrVNet: func() any { return &VNetInfo{} }, StrSubnet: func() any { return &SubnetInfo{} }, StrDataDisk: func() any { return &DataDiskInfo{} }, StrNLB: func() any { return &NLBInfo{} }, StrNode: func() any { return &NodeInfo{} }, StrInfra: func() any { return &InfraInfo{} }, StrK8s: func() any { return &K8sClusterInfo{} }, StrNamespace: func() any { return &NsInfo{} }, StrVPN: func() any { return &VpnInfo{} }, StrGlobalDns: func() any { return &GlobalDnsRecordInfo{} }, }
ResourceTypeRegistry is map for Resource type
var SelfEndpoint string
var SpiderAPIPassword string
var SpiderAPIUsername string
var SpiderRestUrl string
var SshDefaultUserName = []string{"cb-user", "ubuntu", "root", "ec2-user"}
SshDefaultUserName is array for temporal constants
var StartTime string
var SystemInitialized bool
SystemInitialized indicates whether the system has been fully initialized (e.g., credentials and connection configs registered via init.py) This is set to true when PUT /readyz/init is called after init.py completes
var SystemReady bool
SystemReady is global variable for checking SystemReady status
var TerrariumRestUrl string
var VaultAddr string
var VaultToken string
Functions ¶
func BatchStoreLatencyInfo ¶ added in v0.11.9
func BatchStoreLatencyInfo(latencyData []LatencyInfo) error
BatchStoreLatencyInfo stores multiple latency records in a single transaction
func DeriveObjectStorageStatus ¶ added in v0.12.6
DeriveObjectStorageStatus derives the ObjectStorage status from its Conditions.
func DeriveSubnetStatus ¶ added in v0.12.6
DeriveSubnetStatus derives the Subnet status from its Conditions.
func DeriveVNetStatus ¶ added in v0.12.6
DeriveVNetStatus derives the VNet status from its Conditions.
func DeriveVpnStatus ¶ added in v0.12.6
DeriveVpnStatus derives the VPN status from its Conditions.
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 IsConditionTrue ¶ added in v0.12.6
func IsConditionTrue(conditions []Condition, condType ConditionType) bool
IsConditionTrue returns true if the condition with the given type has status True.
func IsDefaultDiskType ¶ added in v0.12.7
IsDefaultDiskType reports whether the given root-disk-type value should be treated as "let the CSP/Spider pick its default" (i.e. no explicit disk category). cb-tumblebug accepts both "" and "default" (case-insensitive) as the special "use default" sentinel; everything else is a CSP-native disk category that should be honored as-is.
func NormalizeDiskTypeForQuery ¶ added in v0.12.7
NormalizeDiskTypeForQuery returns a value suitable for AvailabilityQuery. SystemDiskCategory: "" when the input is the "default" sentinel (so the checker queries availability across all categories), otherwise the trimmed value as-is.
func SetCondition ¶ added in v0.12.6
func SetCondition(conditions *[]Condition, condType ConditionType, status ConditionStatus, reason, message string)
SetCondition sets or updates a condition in the conditions slice. If a condition with the same Type already exists and has a different Status, it is updated (including LastTransitionTime). If only Reason/Message changed, those are updated without changing LastTransitionTime.
func ShouldRestoreToAvailable ¶ added in v0.12.10
ShouldRestoreToAvailable reports whether a resource is in a terminal-failure state (Ready=False with Reason ∈ {DeletionFailed, DeregisterFailed}) that can be safely restored to Available by Reconcile when the CSP resource is confirmed to still exist.
In-flight states (Creating, Deleting, Registering, Deregistering) and CreationFailed are intentionally excluded — restoring those could mask concurrent operations or partially-created resources.
func StoreLatencyInfo ¶ added in v0.11.9
StoreLatencyInfo stores latency information to database
Types ¶
type AgentInstallContent ¶
type AgentInstallContent struct {
InfraId string `json:"infraId"`
NodeId string `json:"nodeId"`
NodeIp string `json:"nodeIp"`
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 AlternativeNodeConfigCandidate ¶ added in v0.12.14
type AlternativeNodeConfigCandidate struct {
// Rank is 1-based; lower rank = higher similarity.
Rank int `json:"rank"`
// SimilarityScore is 0.0–100.0; computed from "preferred" fields only.
SimilarityScore float64 `json:"similarityScore"`
Spec SpecInfo `json:"spec"`
SpecDiff SpecDiff `json:"specDiff"`
// PrimaryImage is the best-matched image for the candidate spec.
// For GPU specs: prefers isBasicGpuImage=true, then isGPUImage=true.
// For non-GPU specs: prefers isBasicImage=true.
// Nil when no image is found.
PrimaryImage *ImageInfo `json:"primaryImage,omitempty"`
// AlternativeImages are additional image options (up to ImageAlternativeLimit).
AlternativeImages []ImageInfo `json:"alternativeImages,omitempty"`
}
AlternativeNodeConfigCandidate is one ranked result in RecommendAlternativeNodeConfigResponse.
type AssetsSummaryResponse ¶ added in v0.12.6
type AssetsSummaryResponse struct {
NamespaceID string `json:"namespaceId" example:"system"`
TotalSpecCount int64 `json:"totalSpecCount" example:"45000"`
PricedSpecCount int64 `json:"pricedSpecCount" example:"43000"`
UnpricedSpecCount int64 `json:"unpricedSpecCount" example:"2000"`
TotalImageCount int64 `json:"totalImageCount" example:"18000"`
Providers []ProviderAssetSummary `json:"providers"`
}
AssetsSummaryResponse is a namespace-level summary of specs and images.
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"`
NodeGroupDynamicReq CreateNodeGroupDynamicReq `json:"nodeGroupDynamicReq"`
// PostCommand is field for providing command to Nodes after their 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 InfraCmdReq `json:"postCommand"`
PlacementAlgo string `json:"placementAlgo" example:"random"`
}
AutoAction is struct for Infra auto-control action.
type AutoCondition ¶
type AutoCondition struct {
Metric string `json:"metric" example:"cpu"`
Operator string `json:"operator" example:">=" enums:"<,<=,>,>="`
Operand float64 `json:"operand" example:"80"`
EvaluationPeriod int `json:"evaluationPeriod" example:"10"`
EvaluationValue []string `json:"evaluationValue"`
}
AutoCondition is struct for Infra auto-control condition.
type AvailabilityQuery ¶ added in v0.12.7
type AvailabilityQuery struct {
Provider string // CSP identifier (e.g., "alibaba", "azure")
Region string // CSP-native region (e.g., "cn-qingdao")
InstanceType string // CSP-native instance type (e.g., "ecs.gn6i-c4g1.xlarge")
SystemDiskCategory string // CSP-native disk category (optional, e.g., "cloud_essd")
PreferredZone string // optional zone hint
ImageId string // optional image id (some CSPs validate compatibility)
}
AvailabilityQuery is the provider-agnostic input for a pre-flight availability check against a CSP. Implementations of the underlying checker may use a subset of these fields depending on what their CSP API supports.
type AvailabilityResult ¶ added in v0.12.7
type AvailabilityResult struct {
Provider string `json:"provider"`
Region string `json:"region"`
InstanceType string `json:"instanceType"`
Available bool `json:"available"`
Zones []ZoneAvailability `json:"zones,omitempty"`
Reason string `json:"reason,omitempty"` // explanation when Available is false (or when no checker)
Source string `json:"source,omitempty"` // checker identifier for tracing (e.g., "alibaba:DescribeAvailableResource")
Cached bool `json:"cached,omitempty"` // true if served from cache
QueriedAt time.Time `json:"queriedAt"` // time of original (uncached) query
}
AvailabilityResult is the provider-agnostic output of a pre-flight availability check. The Available field is the OR of all zones; callers can inspect Zones to choose a specific zone or disk category.
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 AzureBgpPeeringCidrs ¶ added in v0.12.3
type AzureBgpPeeringCidrs struct {
ToAws []string `json:"toAws,omitempty" example:"169.254.21.0/30,169.254.21.4/30,169.254.22.0/30,169.254.22.4/30"`
ToGcp []string `json:"toGcp,omitempty" example:"169.254.21.8/30,169.254.21.12/30,169.254.22.8/30,169.254.22.12/30"`
ToAlibaba []string `json:"toAlibaba,omitempty" example:"169.254.21.16/30,169.254.21.20/30,169.254.22.16/30,169.254.22.20/30"`
ToTencent []string `json:"toTencent,omitempty" example:"169.254.21.24/30,169.254.21.28/30,169.254.22.24/30,169.254.22.28/30"`
ToIbm []string `json:"toIbm,omitempty" example:"169.254.21.32/30,169.254.21.36/30,169.254.22.32/30,169.254.22.36/30"`
}
type AzureSpecificProperty ¶ added in v0.10.7
type AzureSpecificProperty struct {
GatewaySubnetCidr string `json:"gatewaySubnetCidr,omitempty" default:"" example:"xxx.xxx.xxx.xxx/xx"`
BgpAsn string `json:"bgpAsn,omitempty" default:"65531" example:"65531"`
VpnSku string `json:"vpnSku,omitempty" default:"VpnGw1AZ" example:"VpnGw1AZ"`
BgpPeeringCidrs *AzureBgpPeeringCidrs `json:"bgpPeeringCidrs,omitempty"`
}
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 {
NodeId []string `json:"nodeId"`
}
BastionInfo is struct for bastion info
type BastionNode ¶
type BastionNode struct {
NsId string `json:"nsId,omitempty"`
InfraId string `json:"infraId"`
NodeId string `json:"nodeId"`
}
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 {
// Infra configuration for creating the infrastructure
SourceInfraReq InfraDynamicReq `json:"sourceInfraReq" validate:"required"`
// Snapshot configuration for creating custom images
SnapshotReq SnapshotReq `json:"snapshotReq" validate:"required"`
// Whether to cleanup (terminate) Infra after snapshot creation
CleanupInfraAfterSnapshot bool `json:"cleanupInfraAfterSnapshot" example:"true" default:"true"`
}
BuildAgnosticImageReq is a struct to handle 'Build Agnostic Image' request This combines Infra creation and snapshot creation into a single workflow
type BuildAgnosticImageResult ¶ added in v0.11.14
type BuildAgnosticImageResult struct {
// Infra information
InfraId string `json:"infraId" example:"infra01"`
Namespace string `json:"namespace" example:"default"`
InfraStatus string `json:"infraStatus" example:"Running"`
InfraCleanedUp bool `json:"infraCleanedUp" example:"true"`
// Snapshot results
SnapshotResult InfraSnapshotResult `json:"snapshotResult"`
// Overall summary
TotalDuration string `json:"totalDuration" example:"15m30s"`
Message string `json:"message" example:"Successfully created 3 custom images from Infra"`
}
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"`
CloudPlatform string `mapstructure:"cloudPlatform" json:"cloudPlatform,omitempty"`
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 CSPImageIgnorePatterns ¶ added in v0.12.14
type CSPImageIgnorePatterns struct {
Description string `yaml:"description,omitempty"`
GlobalPatterns []string `yaml:"global_patterns,omitempty"`
Regions map[string]RegionIgnorePatterns `yaml:"regions,omitempty"`
}
CSPImageIgnorePatterns 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 CancelTaskRequest ¶ added in v0.12.3
type CancelTaskRequest struct {
// Reason is an optional reason for cancellation
Reason string `json:"reason,omitempty" example:"User requested cancellation"`
}
CancelTaskRequest represents a request to cancel an execution task
type CancelTaskResponse ¶ added in v0.12.3
type CancelTaskResponse struct {
// TaskId is the cancelled task ID
TaskId string `json:"taskId" example:"cmd-g1-1-req123-1"`
// Success indicates whether the cancellation was successful
Success bool `json:"success" example:"true"`
// Status is the new status after cancellation (Cancelled)
Status CommandExecutionStatus `json:"status,omitempty" example:"Cancelled"`
// Message provides additional information about the cancellation
Message string `json:"message" example:"Task cancelled successfully"`
// CancelledAt is when the task was cancelled (RFC3339 format)
CancelledAt string `json:"cancelledAt,omitempty" example:"2024-01-15T10:32:00Z"`
}
CancelTaskResponse represents the response after cancelling a task
type ChangeK8sNodeGroupAutoscaleSizeReq ¶ added in v0.11.9
type ChangeK8sNodeGroupAutoscaleSizeReq struct {
DesiredNodeSize int `json:"desiredNodeSize" example:"1"`
MinNodeSize int `json:"minNodeSize" example:"1"`
MaxNodeSize int `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 CheckInfraDynamicReqInfo ¶ added in v0.12.6
type CheckInfraDynamicReqInfo struct {
ReqCheck []CheckNodeGroupDynamicReqInfo `json:"reqCheck" validate:"required"`
}
CheckInfraDynamicReqInfo is struct to check requirements to create a new Infra instance dynamically (with default resource option)
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 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 CheckNodeGroupDynamicReqInfo ¶ added in v0.12.6
type CheckNodeGroupDynamicReqInfo 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
}
CheckNodeGroupDynamicReqInfo 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 CloudImageIgnoreConfig ¶ added in v0.12.14
type CloudImageIgnoreConfig struct {
Global GlobalIgnorePatterns `yaml:"global"`
CSPs map[string]CSPImageIgnorePatterns `yaml:"csps,omitempty"`
}
CloudImageIgnoreConfig represents the structure of cloudimage_ignore.yaml
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 CommandDoneSummary ¶ added in v0.12.3
type CommandDoneSummary struct {
// TotalNodes is the number of Nodes that were targeted
TotalNodes int `json:"totalNodes" example:"3"`
// CompletedNodes is the number of Nodes that completed successfully
CompletedNodes int `json:"completedNodes" example:"2"`
// FailedNodes is the number of Nodes that failed
FailedNodes int `json:"failedNodes" example:"1"`
// ElapsedSeconds is total wall-clock time for the entire command execution
ElapsedSeconds int64 `json:"elapsedSeconds" example:"45"`
// Error is set when the command execution failed before reaching Nodes (e.g., preprocessing error)
Error string `json:"error,omitempty" example:"built-in function GetPublicIP error: no Node found"`
}
CommandDoneSummary is sent as the final SSE event when all Nodes finish
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" // CommandStatusCancelled indicates the command was cancelled by user request CommandStatusCancelled CommandExecutionStatus = "Cancelled" // CommandStatusInterrupted indicates the command was interrupted (e.g., system restart) CommandStatusInterrupted CommandExecutionStatus = "Interrupted" )
type CommandLogEntry ¶ added in v0.12.3
type CommandLogEntry struct {
// Stream indicates the source: "stdout" or "stderr"
Stream string `json:"stream" example:"stdout"`
// Line is the log line content (truncated at 4096 chars)
Line string `json:"line" example:"total 8"`
// LineNumber is the sequential line number within this stream for this Node
LineNumber int `json:"lineNumber" example:"1"`
}
CommandLogEntry represents a single log line from SSH command execution
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 Node (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 seconds
ElapsedTime int64 `json:"elapsedTime,omitempty" example:"120"`
// 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 CommandStreamEvent ¶ added in v0.12.3
type CommandStreamEvent struct {
// Type indicates the kind of event
Type CommandStreamEventType `json:"type" example:"CommandLog"`
// NodeId identifies which Node this event belongs to
NodeId string `json:"nodeId" example:"g1-1"`
// CommandIndex is the command status index in NodeInfo.CommandStatus
CommandIndex int `json:"commandIndex" example:"1"`
// Timestamp is when the event was generated (RFC3339)
Timestamp string `json:"timestamp" example:"2024-01-15T10:30:05Z"`
// Status is populated for EventCommandStatus events (reuses existing CommandStatusInfo)
Status *CommandStatusInfo `json:"status,omitempty"`
// Log is populated for EventCommandLog events
Log *CommandLogEntry `json:"log,omitempty"`
// Summary is populated for EventCommandDone events
Summary *CommandDoneSummary `json:"summary,omitempty"`
}
CommandStreamEvent is a single SSE event sent to streaming clients
type CommandStreamEventType ¶ added in v0.12.3
type CommandStreamEventType string
CommandStreamEventType represents the type of SSE event for command streaming
const ( // EventCommandStatus is sent when a command's status changes (Queued→Handling→Completed etc.) EventCommandStatus CommandStreamEventType = "CommandStatus" // EventCommandLog is sent for real-time stdout/stderr log lines during SSH execution EventCommandLog CommandStreamEventType = "CommandLog" // EventCommandDone is sent when all Nodes have finished execution (terminal event) EventCommandDone CommandStreamEventType = "CommandDone" )
type Condition ¶ added in v0.12.6
type Condition struct {
Type ConditionType `json:"type"`
Status ConditionStatus `json:"status"`
Reason string `json:"reason,omitempty"`
Message string `json:"message,omitempty"`
LastTransitionTime string `json:"lastTransitionTime,omitempty"`
}
Condition represents an observation about a resource's state
func GetCondition ¶ added in v0.12.6
func GetCondition(conditions []Condition, condType ConditionType) *Condition
GetCondition returns the condition with the given type, or nil if not found.
type ConditionStatus ¶ added in v0.12.6
type ConditionStatus string
ConditionStatus represents the status of a condition
const ( ConditionTrue ConditionStatus = "True" ConditionFalse ConditionStatus = "False" ConditionUnknown ConditionStatus = "Unknown" )
type ConditionType ¶ added in v0.12.6
type ConditionType string
ConditionType represents the type of a condition observation
const ( // ConditionReady indicates whether the resource itself is usable ConditionReady ConditionType = "Ready" // ConditionSynced indicates whether the resource is in sync with the CSP/Spider ConditionSynced ConditionType = "Synced" // ConditionChildrenReady indicates whether all child resources are healthy (e.g., VNet's Subnets) ConditionChildrenReady ConditionType = "ChildrenReady" )
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 ContextKey ¶ added in v0.12.4
type ContextKey string
ContextKey is a typed key for context values to prevent collisions with keys defined in other packages, following Go best practices.
const ( // CtxKeyCredentialHolder is the context.Context key for credential holder CtxKeyCredentialHolder ContextKey = "credentialHolder" // CtxKeyRequestID is the context.Context key for request ID CtxKeyRequestID ContextKey = "requestID" )
type ControlNodeResult ¶ added in v0.12.6
type ControlNodeResult struct {
NodeId string `json:"nodeId"`
Status string `json:"Status"`
Error error `json:"Error"`
}
ControlNodeResult is struct for result of Node control
type ControlNodeResultWrapper ¶ added in v0.12.6
type ControlNodeResultWrapper struct {
ResultArray []ControlNodeResult `json:"resultarray"`
}
ControlNodeResultWrapper is struct for array of results of Node 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 CreateNodeGroupDynamicReq ¶ added in v0.12.6
type CreateNodeGroupDynamicReq struct {
// NodeGroup name, actual Node name will be generated with -N postfix.
Name string `json:"name" example:"g1"`
// NodeGroupSize is the number of Nodes to create in this NodeGroup. If > 0, nodeGroup will be generated. Default is 1.
NodeGroupSize int `json:"nodeGroupSize" example:"3"`
// 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 int `json:"rootDiskSize,omitempty" example:"50"` // Root disk size in GB. 0 = use CSP default.
NodeUserPassword string `json:"nodeUserPassword,omitempty" example:"" default:""`
// if ConnectionName is given, the Node 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 Node placement.
// If specified, subnet will be created in this zone for resources like GPU Nodes
// that may only be available in specific zones. If empty, auto-selection applies.
Zone string `json:"zone,omitempty" example:"ap-northeast-2a" default:""`
// VNetTemplateId overrides the Infra-level VNetTemplateId for this NodeGroup.
// If empty, inherits the VNetTemplateId from the parent InfraDynamicReq.
VNetTemplateId string `json:"vNetTemplateId,omitempty" example:""`
// SgTemplateId overrides the Infra-level SgTemplateId for this NodeGroup.
// If empty, inherits the SgTemplateId from the parent InfraDynamicReq.
SgTemplateId string `json:"sgTemplateId,omitempty" example:""`
}
CreateNodeGroupDynamicReq is struct to get requirements to create a new server instance dynamically (with default resource option)
type CreateNodeGroupReq ¶ added in v0.12.6
type CreateNodeGroupReq struct {
// NodeGroup name of Nodes. Actual Node 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"`
// NodeGroupSize is the number of Nodes to create in this NodeGroup. If > 0, nodeGroup will be generated.
NodeGroupSize int `json:"nodeGroupSize" example:"3"`
// 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"`
// CspImageName is the CSP-side image identifier pre-resolved by EnsureImageAvailable
// at nodegroup level (Alibaba/Azure latest-version resolution included). When non-empty
// and the image is not a custom image, CreateNode skips the redundant per-VM GetImage
// DB call, significantly reducing concurrent DB load during large infra creation.
// Custom images always go through the full GetImage path (this field stays empty for them).
CspImageName string `json:"cspImageName,omitempty"`
VNetId string `json:"vNetId" validate:"required"`
SubnetId string `json:"subnetId" validate:"required"`
SecurityGroupIds []string `json:"securityGroupIds" validate:"required"`
SshKeyId string `json:"sshKeyId" validate:"required"`
NodeUserName string `json:"nodeUserName,omitempty"`
NodeUserPassword string `json:"nodeUserPassword,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 int `json:"rootDiskSize,omitempty" example:"50"` // Root disk size in GB. 0 = use CSP default.
DataDiskIds []string `json:"dataDiskIds"`
}
CreateNodeGroupReq is struct to get requirements to create a new server instance
type Credential ¶
type CredentialHolderInfo ¶ added in v0.12.4
type CredentialHolderInfo struct {
// CredentialHolder is the holder identifier (e.g., "admin", "team-a")
CredentialHolder string `json:"credentialHolder" example:"admin"`
// Providers is the list of cloud providers registered under this holder
Providers []string `json:"providers" example:"aws,gcp,azure"`
// ConnectionCount is the total number of connection configs for this holder
ConnectionCount int `json:"connectionCount" example:"42"`
// VerifiedConnectionCount is the number of verified connections for this holder
VerifiedConnectionCount int `json:"verifiedConnectionCount" example:"38"`
// IsDefault indicates whether this holder is the system default
IsDefault bool `json:"isDefault" example:"true"`
}
CredentialHolderInfo is struct for credential holder summary derived from registered connections. @Description Credential holder summary with associated providers and connection counts.
type CredentialHolderList ¶ added in v0.12.4
type CredentialHolderList struct {
CredentialHolderList []CredentialHolderInfo `json:"credentialHolderList"`
}
CredentialHolderList is struct for containing a list of credential holder summaries @Description List of credential holder summaries
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"`
// Tencent *TencentSpecificProperty `json:"tencent,omitempty"`
// Ibm *IbmSpecificProperty `json:"ibm,omitempty"`
OpenStack *OpenStackSpecificProperty `json:"openstack,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"`
SourceNodeId string `json:"sourceNodeId"`
Description string `json:"description"`
}
CustomImageReq is a struct to handle a request for Create custom image (Node 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 int `json:"diskSize" example:"77"` // Disk size in GB
Status DiskStatus `json:"status" example:"Available"` // Available, Unavailable, Attached, ...
AssociatedObjectList []string `json:"associatedObjectList" example:"/ns/default/infra/infra01/node/aws-ap-southeast-1-1"`
CreatedTime time.Time `json:"createdTime" 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 DataDiskNodeReq ¶ added in v0.12.6
type DataDiskNodeReq struct {
Name string `json:"name" validate:"required" example:"aws-ap-southeast-1-datadisk"`
DiskType string `json:"diskType" example:"default"`
DiskSize int `json:"diskSize" validate:"required" example:"77"` // Disk size in GB
Description string `json:"description,omitempty"`
}
DataDiskNodeReq is a struct to handle 'Provisioning dataDisk to Node' request toward CB-Tumblebug.
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 int `json:"diskSize" validate:"required" example:"77"` // Disk size in GB
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 int `json:"diskSize" validate:"required"` // Disk size in GB
Description string `json:"description"`
}
DataDiskUpsizeReq is a struct to handle 'Upsize dataDisk' request toward CB-Tumblebug.
type DfAgentInstallReq ¶
type DfAgentInstallReq struct {
NsId string `json:"ns_id"`
InfraId string `json:"infra_id"`
NodeId string `json:"node_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 ExecCredential ¶ added in v0.12.3
type ExecCredential struct {
ApiVersion string `json:"apiVersion"`
Kind string `json:"kind"`
Status ExecCredentialStatus `json:"status"`
}
ExecCredential mirrors the Kubernetes ExecCredential format (client.authentication.k8s.io/v1). kubectl parses this structure when an exec-based kubeconfig is used. Ref: https://kubernetes.io/docs/reference/config-api/client-authentication.v1/
type ExecCredentialStatus ¶ added in v0.12.3
type ExecCredentialStatus struct {
Token string `json:"token"`
}
ExecCredentialStatus holds credentials for the transport to use. Mirrors the Kubernetes ExecCredentialStatus (client.authentication.k8s.io/v1).
type ExecutionTask ¶ added in v0.12.3
type ExecutionTask struct {
// TaskId is the unique identifier for this execution task (format: xRequestId:nodeId:index)
TaskId string `json:"taskId" example:"req-12345678:node-01:1"`
// XRequestId is the X-Request-ID header value, the unique identifier for the request
XRequestId string `json:"xRequestId,omitempty" example:"req-12345678"`
// NsId is the namespace ID
NsId string `json:"nsId" example:"default"`
// InfraId is the Infra ID
InfraId string `json:"infraId" example:"infra01"`
// NodeId is the target Node ID
NodeId string `json:"nodeId,omitempty" example:"g1-1"`
// CommandIndex is the index of this command in the Node's command history
CommandIndex int `json:"commandIndex,omitempty" example:"1"`
// NodeGroupId is the target nodegroup ID (empty if not specified)
NodeGroupId string `json:"nodeGroupId,omitempty" example:"g1"`
// Command is the command being executed
Command []string `json:"command" example:"apt update && apt install -y docker.io"`
// Status is the current status of the task (uses CommandExecutionStatus: Queued, Handling, Completed, etc.)
Status CommandExecutionStatus `json:"status" example:"Handling"`
// StartedAt is when the task started (RFC3339 format)
StartedAt string `json:"startedAt" example:"2024-01-15T10:30:00Z"`
// CompletedAt is when the task completed (RFC3339 format), empty if still running
CompletedAt string `json:"completedAt,omitempty" example:"2024-01-15T10:35:00Z"`
// TimeoutMinutes is the timeout setting for this task
TimeoutMinutes int `json:"timeoutMinutes" example:"30"`
// ElapsedSeconds is the elapsed time in seconds
ElapsedSeconds int64 `json:"elapsedSeconds" example:"120"`
// Message provides additional status information
Message string `json:"message,omitempty" example:"Executing command on 3 Nodes"`
// TargetNodeCount is the number of Nodes targeted by this task
TargetNodeCount int `json:"targetNodeCount" example:"3"`
// CompletedNodeCount is the number of Nodes that have completed execution
CompletedNodeCount int `json:"completedNodeCount" example:"1"`
}
ExecutionTask represents a running or completed command execution task This is used for tracking and cancelling long-running SSH command executions Status uses CommandExecutionStatus (Queued, Handling, Completed, Failed, Timeout, Cancelled, Interrupted)
type ExecutionTaskList ¶ added in v0.12.3
type ExecutionTaskList struct {
// Tasks is the list of execution tasks
Tasks []*ExecutionTask `json:"tasks"`
}
ExecutionTaskList represents a list of execution tasks
type ExecutionTaskListResponse ¶ added in v0.12.3
type ExecutionTaskListResponse struct {
// Tasks is the list of execution tasks
Tasks []ExecutionTask `json:"tasks"`
// Total is the total number of tasks
Total int `json:"total" example:"5"`
}
ExecutionTaskListResponse represents the response for execution task list queries
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"`
GPUExcludePatterns []string `mapstructure:"gpuExcludePatterns" json:"gpu_exclude_patterns"`
BasicGpuImageRules *BasicImageRules `mapstructure:"basicGpuImageRules" json:"basic_gpu_image_rules,omitempty"`
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 FileDownloadReq ¶ added in v0.12.3
type FileDownloadReq struct {
SourcePath string `json:"sourcePath" validate:"required" example:"/home/cb-user/result.json"` // Full path of the file on the remote VM
}
FileDownloadReq is struct for file download request from a Node
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 GlobalDnsBulkDeleteReq ¶ added in v0.12.4
type GlobalDnsBulkDeleteReq struct {
Records []GlobalDnsDeleteReq `json:"records" validate:"required" description:"List of records to delete"`
}
GlobalDnsBulkDeleteReq is a struct to handle 'Bulk delete globalDns records' request.
type GlobalDnsBulkDeleteResponse ¶ added in v0.12.4
type GlobalDnsBulkDeleteResponse struct {
TotalRequested int `json:"totalRequested" example:"5"`
Succeeded int `json:"succeeded" example:"4"`
Failed int `json:"failed" example:"1"`
Results []GlobalDnsBulkDeleteResult `json:"results"`
}
GlobalDnsBulkDeleteResponse is a struct to handle 'Bulk delete globalDns records' response.
type GlobalDnsBulkDeleteResult ¶ added in v0.12.4
type GlobalDnsBulkDeleteResult struct {
RecordName string `json:"recordName" example:"infra.example.com"`
RecordType string `json:"recordType" example:"A"`
SetIdentifier string `json:"setIdentifier,omitempty"`
Success bool `json:"success" example:"true"`
Message string `json:"message" example:"deleted successfully"`
}
GlobalDnsBulkDeleteResult represents the result of one record deletion in a bulk operation.
type GlobalDnsDeleteReq ¶ added in v0.12.4
type GlobalDnsDeleteReq struct {
DomainName string `json:"domainName" validate:"required" example:"example.com" description:"Managed Domain Name in Route53"`
RecordName string `json:"recordName" validate:"required" example:"infra.example.com" description:"Record Name (FQDN) to delete"`
RecordType string `json:"recordType" example:"A" enums:"A,AAAA,CNAME,TXT" description:"DNS Record Type"`
SetIdentifier string `json:"setIdentifier,omitempty" example:"" description:"SetIdentifier for specific record (empty = delete all matching)"`
}
GlobalDnsDeleteReq is a struct to handle 'Delete globalDns record' request.
type GlobalDnsIPSource ¶ added in v0.12.4
type GlobalDnsIPSource struct {
Infra *GlobalDnsInfraSource `json:"infra,omitempty" description:"(Method 1) Infra ID source"`
Label *GlobalDnsLabelSource `json:"label,omitempty" description:"(Method 2) Label Selector source"`
Ips []string `json:"ips,omitempty" example:"[\"1.2.3.4\"]" description:"(Method 3) Manual IP addresses"`
}
GlobalDnsIPSource defines the source for IP addresses.
type GlobalDnsInfraSource ¶ added in v0.12.6
type GlobalDnsInfraSource struct {
NsId string `json:"nsId" validate:"required" example:"default" description:"Namespace ID"`
InfraId string `json:"infraId" validate:"required" example:"infra-01" description:"Infra ID"`
}
GlobalDnsInfraSource defines Infra ID and its namespace.
type GlobalDnsLabelSource ¶ added in v0.12.4
type GlobalDnsLabelSource struct {
NsId string `json:"nsId" validate:"required" example:"default" description:"Namespace ID"`
LabelSelector string `` /* 149-byte string literal not displayed */
}
GlobalDnsLabelSource defines Label Selector and its namespace.
type GlobalDnsRecordInfo ¶ added in v0.12.4
type GlobalDnsRecordInfo struct {
Name string `json:"name" example:"infra.example.com"`
Type string `json:"type" example:"A"`
TTL int64 `json:"ttl" example:"300"`
Values []string `json:"values" example:"[\"1.2.3.4\"]"`
SetIdentifier string `json:"setIdentifier,omitempty" example:""`
RoutingPolicy string `json:"routingPolicy,omitempty" example:"simple"`
GeoLatitude string `json:"geoLatitude,omitempty" example:"37.56"`
GeoLongitude string `json:"geoLongitude,omitempty" example:"126.97"`
}
GlobalDnsRecordInfo is a struct to handle DNS record information.
type GlobalDnsRecordReq ¶ added in v0.12.4
type GlobalDnsRecordReq struct {
// --- DNS Record Settings ---
DomainName string `json:"domainName" validate:"required" example:"example.com" description:"Managed Domain Name in Route53"`
RecordName string `json:"recordName" example:"infra.example.com" description:"Record Name (FQDN) to update"`
RecordType string `json:"recordType" example:"A" enums:"A,AAAA,CNAME,TXT" description:"DNS Record Type"`
TTL int64 `json:"ttl" example:"300" description:"Time To Live (seconds)"`
RoutingPolicy string `` /* 131-byte string literal not displayed */
// --- IP Source Selection ---
SetBy GlobalDnsIPSource `json:"setBy" validate:"required" description:"IP source selection (Choose exactly one)"`
}
GlobalDnsRecordReq is a struct to handle 'Update globalDns record' request toward CB-Tumblebug. Users must choose EXACTLY ONE of the three IP source methods in 'setBy'.
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 {
// NodeId is the Node identifier
NodeId string `json:"nodeId" example:"g1-1"`
// HandlingCount is the number of commands currently in 'Handling' status
HandlingCount int `json:"handlingCount" example:"3"`
}
HandlingCommandCountResponse represents the response for Node handling command count queries
type HostedZoneInfo ¶ added in v0.12.4
type HostedZoneInfo struct {
ZoneId string `json:"zoneId" example:"/hostedzone/Z1234567890"`
Name string `json:"name" example:"example.com."`
RecordCount int64 `json:"recordCount" example:"10"`
}
HostedZoneInfo is a struct to handle hosted zone information.
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 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" 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"`
// SourceNodeUid is the UID of the source Node from which this image was created
SourceNodeUid string `json:"sourceNodeUid" 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 `` /* 232-byte string literal not displayed */
IsBasicImage bool `` /* 192-byte string literal not displayed */
IsBasicGpuImage bool `` /* 240-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 ( // ImageCreating indicates the image is being created (e.g., snapshot in progress) // This is a CB-Tumblebug managed state, independent of CB-Spider's status ImageCreating ImageStatus = "Creating" // ImageAvailable indicates the image is ready and can be used ImageAvailable ImageStatus = "Available" // ImageFailed indicates the image creation failed // This is a terminal state - no further status updates needed ImageFailed ImageStatus = "Failed" // This may transition to Available or Failed ImageUnavailable ImageStatus = "Unavailable" // ImageDeleting indicates the image is being deleted ImageDeleting ImageStatus = "Deleting" // ImageDeprecated indicates the image is deprecated and should not be used ImageDeprecated ImageStatus = "Deprecated" // ImageNA indicates the status is not applicable or unknown ImageNA ImageStatus = "NA" )
type ImageSummary ¶ added in v0.12.3
type ImageSummary struct {
ResourceType string `json:"resourceType,omitempty" example:"image" description:"image or customImage"`
CspImageName string `json:"cspImageName,omitempty" example:"ami-0123456789abcdef0"`
OSType string `json:"osType" gorm:"column:os_type" example:"ubuntu 22.04" description:"Simplified OS name and version string"`
OSArchitecture OSArchitecture `json:"osArchitecture,omitempty" example:"x86_64"`
OSDistribution string `json:"osDistribution,omitempty" example:"Ubuntu 22.04"`
}
ImageSummary is a lightweight struct containing essential image information for NodeInfo
type InfraAccessInfo ¶ added in v0.12.6
type InfraAccessInfo struct {
InfraId string
InfraNlbListener *InfraAccessInfo `json:"infraNlbListener,omitempty"`
InfraNodeGroupAccessInfo []InfraNodeGroupAccessInfo
}
InfraAccessInfo is struct to retrieve overall access information of a Infra
type InfraAssociatedResourceList ¶ added in v0.12.6
type InfraAssociatedResourceList struct {
ConnectionNames []string `json:"connectionNames"`
ProviderNames []string `json:"providerNames"`
NodeGroupIds []string `json:"nodeGroupIds"`
NodeIds []string `json:"nodeIds"`
CspNodeNames []string `json:"cspNodeNames"`
CspNodeIds []string `json:"cspNodeIds"`
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"`
}
InfraAssociatedResourceList is struct for associated resource IDs of an Infra
type InfraClusterInfo ¶ added in v0.12.6
type InfraClusterInfo struct {
// Id is a deterministic cluster identifier generated from grouping attributes.
Id string `json:"id"`
// Name is a human-readable cluster name. Currently same as Id.
Name string `json:"name"`
// InfraId is the parent Infra ID.
InfraId string `json:"infraId"`
// VNetId is the shared VNet boundary used for implicit clustering.
VNetId string `json:"vNetId,omitempty"`
// ConnectionNames are unique connection names included in this cluster.
ConnectionNames []string `json:"connectionNames"`
// ProviderNames are unique CSP providers included in this cluster.
ProviderNames []string `json:"providerNames"`
// RegionNames are unique regions included in this cluster.
RegionNames []string `json:"regionNames"`
// NodeGroupIds are NodeGroups that belong to this implicit cluster.
NodeGroupIds []string `json:"nodeGroupIds"`
// NodeIds are Nodes that belong to this implicit cluster.
NodeIds []string `json:"nodeIds"`
// NodeGroupCount is the number of NodeGroups in this cluster.
NodeGroupCount int `json:"nodeGroupCount"`
// NodeCount is the number of Nodes in this cluster.
NodeCount int `json:"nodeCount"`
// RepresentativeNodeGroupId is a representative NodeGroup ID for quick inspection.
RepresentativeNodeGroupId string `json:"representativeNodeGroupId,omitempty"`
// RepresentativeNodeId is a representative Node ID for quick inspection.
RepresentativeNodeId string `json:"representativeNodeId,omitempty"`
}
InfraClusterInfo is a lightweight, on-demand cluster view synthesized from Infra NodeGroups and Nodes. A cluster is implicitly formed by NodeGroups that share the same network boundary (currently VNet-centric grouping).
type InfraClusterList ¶ added in v0.12.6
type InfraClusterList struct {
Cluster []InfraClusterInfo `json:"cluster"`
}
InfraClusterList is a response wrapper for listing implicit clusters in an Infra.
type InfraCmdReq ¶ added in v0.12.6
type InfraCmdReq struct {
// UserName is the SSH username to use for command execution
UserName string `json:"userName" example:"cb-user" default:""`
// Command is the list of commands to execute
Command []string `` /* 128-byte string literal not displayed */
// TimeoutMinutes is the timeout for command execution in minutes (default: 30, min: 1, max: 120)
// If not specified or set to 0, the default timeout (30 minutes) will be used
TimeoutMinutes int `json:"timeoutMinutes,omitempty" example:"30" default:"30"`
}
InfraCmdReq is struct for remote command
func (*InfraCmdReq) GetEffectiveTimeout ¶ added in v0.12.6
func (req *InfraCmdReq) GetEffectiveTimeout() int
GetEffectiveTimeout returns the effective timeout duration for command execution It validates and normalizes the timeout value within allowed bounds
type InfraConnectionConfigCandidatesReq ¶ added in v0.12.6
type InfraConnectionConfigCandidatesReq 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"`
}
InfraConnectionConfigCandidatesReq is struct for a request to check requirements to create a new Infra instance dynamically (with default resource option)
type InfraCreationErrors ¶ added in v0.12.6
type InfraCreationErrors struct {
// NodeObjectCreationErrors contains errors from Node object creation phase
NodeObjectCreationErrors []NodeCreationError `json:"nodeObjectCreationErrors,omitempty"`
// NodeCreationErrors contains errors from actual Node creation phase
NodeCreationErrors []NodeCreationError `json:"nodeCreationErrors,omitempty"`
// TotalNodeCount is the total number of Nodes that were supposed to be created
TotalNodeCount int `json:"totalNodeCount"`
// SuccessfulNodeCount is the number of Nodes that were successfully created
SuccessfulNodeCount int `json:"successfulNodeCount"`
// FailedNodeCount is the number of Nodes that failed to be created
FailedNodeCount int `json:"failedNodeCount"`
// FailureHandlingStrategy indicates how failures were handled
FailureHandlingStrategy string `json:"failureHandlingStrategy,omitempty"` // "rollback", "refine", "continue"
}
InfraCreationErrors represents errors that occurred during Infra creation
type InfraDynamicReq ¶ added in v0.12.6
type InfraDynamicReq struct {
Name string `json:"name" validate:"required" example:"infra01"`
// PolicyOnPartialFailure determines how to handle Node creation failures
// - "continue": Continue with partial Infra creation (default)
// - "rollback": Cleanup entire Infra when any Node fails
// - "refine": Mark failed Nodes 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
// NodeGroups is array of Node requests for multi-cloud infrastructure
// Example: Multiple Node groups across different CSPs
// [
// {
// "name": "aws-group",
// "nodeGroupSize": "3",
// "specId": "aws+ap-northeast-2+t3.nano",
// "imageId": "ami-01f71f215b23ba262",
// "rootDiskSize": "50",
// "label": {"role": "worker", "csp": "aws"}
// },
// {
// "name": "azure-group",
// "nodeGroupSize": "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",
// "nodeGroupSize": "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"}
// }
// ]
NodeGroups []CreateNodeGroupDynamicReq `json:"nodeGroups" validate:"required"`
// PostCommand is for the command to bootstrap the Nodes
PostCommand InfraCmdReq `json:"postCommand"`
// SystemLabel is for describing the infra 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"`
// VNetTemplateId specifies the vNet template ID (from system namespace) to use when
// auto-creating shared vNet resources. Propagates to all NodeGroups unless overridden
// at the NodeGroup level. If empty, the default hard-coded CIDR behavior is used.
VNetTemplateId string `json:"vNetTemplateId,omitempty" example:"vnet-default"`
// SgTemplateId specifies the SecurityGroup template ID (from system namespace) to use
// when auto-creating shared SecurityGroup resources. Propagates to all NodeGroups unless
// overridden at the NodeGroup level. If empty, the default all-open behavior is used.
SgTemplateId string `json:"sgTemplateId,omitempty" example:"sg-default"`
}
InfraDynamicReq is struct for requirements to create Infra dynamically (with default resource option)
type InfraDynamicTemplateInfo ¶ added in v0.12.6
type InfraDynamicTemplateInfo struct {
// ResourceType is the type of the resource
ResourceType string `json:"resourceType" example:"infra"`
// Id is unique identifier for the template
Id string `json:"id" example:"my-template"`
// Name is human-readable string to represent the template
Name string `json:"name" example:"my-template"`
// Description of the template
Description string `json:"description" example:"3-tier web application template"`
// Source indicates where this template was created from
// - "user": manually created by user
// - "infra:{nsId}/{infraId}": extracted from an existing Infra
Source string `json:"source" example:"user"`
// CreatedAt is the creation timestamp
CreatedAt string `json:"createdAt" example:"2024-01-01T00:00:00Z"`
// UpdatedAt is the last update timestamp
UpdatedAt string `json:"updatedAt" example:"2024-01-01T00:00:00Z"`
// InfraDynamicReq is the template body (Infra dynamic request)
InfraDynamicReq InfraDynamicReq `json:"infraDynamicReq"`
}
InfraDynamicTemplateInfo is struct for Infra Dynamic Template information stored in ETCD
type InfraDynamicTemplateListResponse ¶ added in v0.12.6
type InfraDynamicTemplateListResponse struct {
Templates []InfraDynamicTemplateInfo `json:"templates"`
}
InfraDynamicTemplateListResponse is struct for listing Infra Dynamic Templates
type InfraDynamicTemplateReq ¶ added in v0.12.6
type InfraDynamicTemplateReq struct {
// Name is the template ID and name
Name string `json:"name" validate:"required" example:"my-template"`
// Description of the template
Description string `json:"description" example:"3-tier web application template"`
// InfraDynamicReq is the template body (Infra dynamic request configuration)
InfraDynamicReq InfraDynamicReq `json:"infraDynamicReq" validate:"required"`
}
InfraDynamicTemplateReq is struct for creating/updating an Infra Dynamic Template
type InfraFileTransferAndCmdResult ¶ added in v0.12.6
type InfraFileTransferAndCmdResult struct {
FileTransferResults []SshCmdResult `json:"fileTransferResults"`
CmdResults []SshCmdResult `json:"cmdResults,omitempty"`
}
InfraFileTransferAndCmdResult is struct for combined file transfer and optional command execution result (internal)
type InfraFileTransferAndCmdResultForAPI ¶ added in v0.12.6
type InfraFileTransferAndCmdResultForAPI struct {
FileTransferResults InfraSshCmdResultForAPI `json:"fileTransferResults"`
CmdResults *InfraSshCmdResultForAPI `json:"cmdResults,omitempty"`
}
InfraFileTransferAndCmdResultForAPI is the API-friendly version of InfraFileTransferAndCmdResult
type InfraHandlingCommandCountResponse ¶ added in v0.12.6
type InfraHandlingCommandCountResponse struct {
// InfraId is the Infra identifier
InfraId string `json:"infraId" example:"infra01"`
// NodeHandlingCounts is a map of Node ID to handling command count
NodeHandlingCounts map[string]int `json:"nodeHandlingCounts"`
// TotalHandlingCount is the total number of handling commands across all Nodes in the Infra
TotalHandlingCount int `json:"totalHandlingCount" example:"3"`
}
InfraHandlingCommandCountResponse represents the response for Infra handling command count queries
type InfraInfo ¶ added in v0.12.6
type InfraInfo 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 infra 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"`
Node []NodeInfo `json:"node"`
// Cluster is the list of implicit clusters synthesized at query-time from Nodes.
Cluster []InfraClusterInfo `json:"cluster,omitempty"`
// List of IDs for new nodes. Return IDs if the nodes are newly added. This field should be used for return body only.
NewNodeList []string `json:"newNodeList"`
// PostCommand is for the command to bootstrap the Nodes
PostCommand InfraCmdReq `json:"postCommand"`
// PostCommandResult is the result of the command for bootstraping the Nodes
PostCommandResult InfraSshCmdResult `json:"postCommandResult"`
// CreationErrors contains information about Node creation failures (if any)
CreationErrors *InfraCreationErrors `json:"creationErrors,omitempty"`
}
InfraInfo is struct for Infra info
type InfraNodeAccessInfo ¶ added in v0.12.6
type InfraNodeAccessInfo struct {
NodeId string `json:"nodeId"`
PublicIP string `json:"publicIP"`
PrivateIP string `json:"privateIP"`
SSHPort int `json:"sshPort"`
PrivateKey string `json:"privateKey,omitempty"`
NodeUserName string `json:"nodeUserName,omitempty"`
NodeUserPassword string `json:"nodeUserPassword,omitempty"`
ConnectionConfig ConnConfig `json:"connectionConfig"`
}
InfraNodeAccessInfo is struct for InfraNodeAccessInfo
type InfraNodeGroupAccessInfo ¶ added in v0.12.6
type InfraNodeGroupAccessInfo struct {
NodeGroupId string
NlbListener *NLBListenerInfo `json:"nlbListener,omitempty"`
BastionNodeId string
NodeAccessInfo []InfraNodeAccessInfo
}
InfraNodeGroupAccessInfo is struct for InfraNodeGroupAccessInfo
type InfraPolicyInfo ¶ added in v0.12.6
type InfraPolicyInfo struct {
Name string `json:"Name"` //Infra Name (for request)
Id string `json:"Id"` //Infra Id (generated ID by the Name)
Policy []Policy `json:"policy"`
ActionLog string `json:"actionLog"`
Description string `json:"description" example:"Description"`
}
InfraPolicyInfo is struct for Infra auto-control Policy object.
type InfraPolicyReq ¶ added in v0.12.6
type InfraPolicyReq struct {
Policy []Policy `json:"policy"`
Description string `json:"description" example:"Description"`
}
InfraPolicyReq is struct for Infra auto-control Policy Request.
type InfraRecommendReq ¶ added in v0.12.6
type InfraRecommendReq struct {
NodeReq []NodeRecommendReq `json:"nodeReq"`
PlacementAlgo string `json:"placementAlgo"`
PlacementParam []KeyValue `json:"placementParam"`
MaxResultNum string `json:"maxResultNum"`
}
InfraRecommendReq is struct for InfraRecommendReq
type InfraReq ¶ added in v0.12.6
type InfraReq struct {
Name string `json:"name" validate:"required" example:"infra01"`
// 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 infra 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"`
NodeGroups []CreateNodeGroupReq `json:"nodeGroups" validate:"required"`
// PostCommand is for the command to bootstrap the Nodes
PostCommand InfraCmdReq `json:"postCommand" validate:"omitempty"`
// PolicyOnPartialFailure determines how to handle Node creation failures
// - "continue": Continue with partial Infra creation (default)
// - "rollback": Cleanup entire Infra when any Node fails
// - "refine": Mark failed Nodes for refinement
PolicyOnPartialFailure string `json:"policyOnPartialFailure" example:"continue" default:"continue" enums:"continue,rollback,refine"`
}
InfraReq is struct for requirements to create Infra
type InfraSnapshotResult ¶ added in v0.12.6
type InfraSnapshotResult struct {
InfraId string `json:"infraId" example:"infra01"`
Namespace string `json:"namespace" example:"default"`
SuccessCount int `json:"successCount" example:"3"`
FailCount int `json:"failCount" example:"0"`
Results []NodeSnapshotResult `json:"results"`
}
InfraSnapshotResult represents the result of creating snapshots for an entire Infra
type InfraSshCmdResult ¶ added in v0.12.6
type InfraSshCmdResult struct {
Results []SshCmdResult `json:"results"`
}
InfraSshCmdResult is struct for Set of SshCmd Results in terms of Infra
type InfraSshCmdResultForAPI ¶ added in v0.12.6
type InfraSshCmdResultForAPI struct {
Results []SshCmdResultForAPI `json:"results"`
}
InfraSshCmdResultForAPI is struct for Set of SshCmd Results in terms of Infra for API response
type InfraStatusInfo ¶ added in v0.12.6
type InfraStatusInfo 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
MasterNodeId string `json:"masterNodeId" example:"node-asiaeast1-cb-01"`
MasterIp string `json:"masterIp" example:"32.201.134.113"`
MasterSSHPort int `json:"masterSSHPort"`
// Label is for describing the object by keywords
Label map[string]string `json:"label"`
// SystemLabel is for describing the infra in a keyword (any string can be used) for special System purpose
SystemLabel string `json:"systemLabel" example:"Managed by CB-Tumblebug" default:""`
Node []NodeStatusInfo `json:"node"`
}
InfraStatusInfo is struct to define simple information of Infra with updated status of all Nodes
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,node"`
}
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"`
// InitialNodeGroupManagedByCluster indicates that the initial node group created during
// cluster creation is lifecycle-bound to the cluster and cannot be deleted independently
// via the node group API (e.g., Alibaba ACK, Tencent TKE).
InitialNodeGroupManagedByCluster bool `mapstructure:"initialNodeGroupManagedByCluster" json:"initial_nodegroup_managed_by_cluster"`
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 int `json:"rootDiskSize,omitempty" example:"30"` // Root disk size in GB. 0 = use CSP default.
OnAutoScaling string `json:"onAutoScaling,omitempty" default:"true" example:"true"`
DesiredNodeSize int `json:"desiredNodeSize,omitempty" example:"1"`
MinNodeSize int `json:"minNodeSize,omitempty" example:"1"`
MaxNodeSize int `json:"maxNodeSize,omitempty" 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 K8sClusterDynamicTemplateInfo ¶ added in v0.12.15
type K8sClusterDynamicTemplateInfo struct {
// ResourceType is the type of the resource
ResourceType string `json:"resourceType" example:"k8sCluster"`
// Id is unique identifier for the template
Id string `json:"id" example:"k8s-across-global"`
// Name is human-readable string to represent the template
Name string `json:"name" example:"k8s-across-global"`
// Description of the template
Description string `json:"description" example:"Multi-cloud K8s cluster template"`
// Source indicates where this template was created from
// - "user": manually created by user
// - "k8sCluster:{nsId}/{k8sClusterId}": extracted from an existing K8sCluster
Source string `json:"source" example:"user"`
// CreatedAt is the creation timestamp
CreatedAt string `json:"createdAt" example:"2024-01-01T00:00:00Z"`
// UpdatedAt is the last update timestamp
UpdatedAt string `json:"updatedAt" example:"2024-01-01T00:00:00Z"`
// K8sMultiClusterDynamicReq is the template body (K8s multi-cluster dynamic request)
K8sMultiClusterDynamicReq K8sMultiClusterDynamicReq `json:"k8sMultiClusterDynamicReq"`
}
K8sClusterDynamicTemplateInfo is struct for K8s Cluster Dynamic Template information stored in ETCD
type K8sClusterDynamicTemplateListResponse ¶ added in v0.12.15
type K8sClusterDynamicTemplateListResponse struct {
Templates []K8sClusterDynamicTemplateInfo `json:"templates"`
}
K8sClusterDynamicTemplateListResponse is struct for listing K8s Cluster Dynamic Templates
type K8sClusterDynamicTemplateReq ¶ added in v0.12.15
type K8sClusterDynamicTemplateReq struct {
// Name is the template ID and name
Name string `json:"name" validate:"required" example:"k8s-across-global"`
// Description of the template
Description string `json:"description" example:"Multi-cloud K8s cluster template"`
// K8sMultiClusterDynamicReq is the template body (K8s multi-cluster dynamic request configuration)
K8sMultiClusterDynamicReq K8sMultiClusterDynamicReq `json:"k8sMultiClusterDynamicReq" validate:"required"`
}
K8sClusterDynamicTemplateReq is struct for creating/updating a K8s Cluster Dynamic Template
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"`
}
K8sClusterInfo is a struct that represents TB K8sCluster object.
type K8sClusterKubeconfigResponse ¶ added in v0.12.6
type K8sClusterKubeconfigResponse struct {
Kubeconfig string `json:"kubeconfig" example:"apiVersion: v1\nkind: Config\n..."`
}
K8sClusterKubeconfigResponse is the response struct for the K8sCluster kubeconfig API.
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 K8sClusterTemplateApplyReq ¶ added in v0.12.15
type K8sClusterTemplateApplyReq struct {
// NamePrefix for the new K8s clusters to be created from the template (maps to K8sMultiClusterDynamicReq.NamePrefix)
NamePrefix string `json:"namePrefix" validate:"required" example:"my-k8s"`
// Description for the new K8s clusters (optional, propagated to all clusters)
Description string `json:"description" example:"K8s clusters created from template"`
}
K8sClusterTemplateApplyReq is struct for applying a K8s Cluster template to provision multi-cluster Phase 1: Only namePrefix and description overrides are supported
type K8sClusterTokenResponse ¶ added in v0.12.3
type K8sClusterTokenResponse struct {
ExecCredential ExecCredential `json:"execCredential"`
}
K8sClusterTokenResponse is the response struct for the K8sCluster token API. It wraps an ExecCredential object that kubectl can use directly for exec-based auth.
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 int `json:"rootDiskSize,omitempty" example:"30"` // Root disk size in GB. 0 = use CSP default.
OnAutoScaling string `json:"onAutoScaling,omitempty" default:"true" example:"true"`
DesiredNodeSize int `json:"desiredNodeSize,omitempty" example:"1"`
MinNodeSize int `json:"minNodeSize,omitempty" example:"1"`
MaxNodeSize int `json:"maxNodeSize,omitempty" 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 int `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"`
// IsInitialNodeGroup indicates whether this node group was created during cluster creation.
// For some CSPs (Alibaba ACK, Tencent TKE), this node group cannot be deleted independently;
// it is automatically removed when the cluster is deleted.
IsInitialNodeGroup bool `json:"isInitialNodeGroup,omitempty"`
// 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"`
}
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 int `json:"rootDiskSize" example:"40"` // Root disk size in GB. 0 = use CSP default.
SshKeyId string `json:"sshKeyId" example:"sshkey-01"`
// autoscale config.
OnAutoScaling string `json:"onAutoScaling" example:"true"`
DesiredNodeSize int `json:"desiredNodeSize" example:"1"`
MinNodeSize int `json:"minNodeSize" example:"1"`
MaxNodeSize int `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 MatchPolicy ¶ added in v0.12.14
type MatchPolicy string
MatchPolicy defines how strictly a spec field is matched during alternative node config recommendation.
const ( // MatchRequired enforces exact match (tolerance = 0%). String fields must equal exactly. // Required fields are applied as DB filters; they do not contribute to the similarity score // because all returned candidates are guaranteed to satisfy them. MatchRequired MatchPolicy = "required" // MatchPreferred applies the global TolerancePercent as a range filter and contributes // to the similarity score proportionally. MatchPreferred MatchPolicy = "preferred" // MatchOpen skips both the filter and the similarity score for this field. // The field still appears in SpecDiff for informational comparison. MatchOpen MatchPolicy = "open" )
type McNetConfigurationDetails ¶ added in v0.9.18
type McNetConfigurationDetails struct {
Csp string `json:"csp"`
Regions []RegionDetails `json:"regions"`
}
type McNlbInfo ¶
type McNlbInfo struct {
InfraAccessInfo *InfraAccessInfo `json:"infraAccessInfo"`
McNlbHostInfo *InfraInfo `json:"mcNlbHostInfo"`
DeploymentLog InfraSshCmdResult `json:"deploymentLog"`
}
McNlbInfo is a struct for response of CreateMcSwNlb
type MonAgentInstallReq ¶
type MonAgentInstallReq struct {
NsId string `json:"nsId,omitempty"`
InfraId string `json:"infraId,omitempty"`
NodeId string `json:"nodeId,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"`
NodeId string `json:"nodeId"`
Value string `json:"value"`
Err string `json:"err"`
}
MonResultSimple struct is for containing node monitoring results
type MonResultSimpleResponse ¶
type MonResultSimpleResponse struct {
NsId string `json:"nsId"`
InfraId string `json:"infraId"`
InfraMonitoring []MonResultSimple `json:"infraMonitoring"`
}
MonResultSimpleResponse struct is for containing Infra monitoring results
type MultihostBenchmarkReq ¶
type MultihostBenchmarkReq struct {
Multihost []BenchmarkReq `json:"multihost"`
}
MultihostBenchmarkReq is struct for MultihostBenchmarkReq
type NLBAddRemoveNodeReq ¶ added in v0.12.6
type NLBAddRemoveNodeReq struct {
TargetGroup NLBTargetGroupInfo `json:"targetGroup"`
}
NLBAddRemoveNodeReq is a struct to handle 'Add/Remove Nodes to/from NLB' request toward CB-Tumblebug.
type NLBFeatureSupport ¶ added in v0.12.19
type NLBFeatureSupport struct {
CustomHealthCheckerInterval bool `json:"customHealthCheckerInterval" example:"true"`
CustomHealthCheckerTimeout bool `json:"customHealthCheckerTimeout" example:"false"`
CustomHealthCheckerThreshold bool `json:"customHealthCheckerThreshold" example:"true"`
}
NLBFeatureSupport indicates which health checker configuration fields are supported by a cloud provider. A false value means the cloud ignores or rejects custom values for that field (e.g., AWS TCP NLB ignores timeout).
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 node when no response.
Threshold int `json:"threshold" example:"3"` // num, The number of continuous health checks to change the node status.
KeyValueList []KeyValue `json:"keyValueList"`
}
type NLBHealthCheckerReq ¶ added in v0.11.9
type NLBHealthCheckerReq struct {
Interval int `json:"interval" example:"10"` // secs, Interval time between health checks. 0 = use default.
Timeout int `json:"timeout" example:"10"` // secs, Waiting time to decide an unhealthy VM when no response. 0 = use default.
Threshold int `json:"threshold" example:"3"` // num, The number of continuous health checks to change the VM status. 0 = use default.
}
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 NLBSupportResponse ¶ added in v0.12.19
type NLBSupportResponse struct {
ResourceType string `json:"resourceType" example:"nlb"`
Supports map[string]NLBFeatureSupport `json:"supports,omitempty"`
}
NLBSupportResponse is the response body for the NLB support information API.
type NLBTargetGroupInfo ¶ added in v0.11.9
type NLBTargetGroupReq ¶ added in v0.11.9
type NlbSetting ¶
type NlbSetting struct {
Enable string `yaml:"enable"`
Interval int `yaml:"interval"`
Timeout int `yaml:"timeout"`
Threshold int `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"`
NlbInfraSpecId string `yaml:"nlbInfraSpecId"`
NlbInfraImageId string `yaml:"nlbInfraImageId"`
NlbInfraNodeGroupSize int `yaml:"nlbInfraNodeGroupSize"`
}
Nlbsw is structure for NLB setting
type NodeCreationError ¶ added in v0.12.6
type NodeCreationError struct {
// NodeName is the name of the Node that failed
NodeName string `json:"nodeName"`
// 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"`
}
NodeCreationError represents a single Node creation error
type NodeGroupInfo ¶ added in v0.12.6
type NodeGroupInfo 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"`
NodeId []string `json:"nodeId"`
NodeGroupSize int `json:"nodeGroupSize"`
}
NodeGroupInfo is struct to define an object that includes homogeneous Nodes
type NodeInfo ¶ added in v0.12.6
type NodeInfo 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 Node is in a group
NodeGroupId string `json:"nodeGroupId"`
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 int `json:"sshPort"`
PublicDNS string `json:"publicDNS"`
PrivateIP string `json:"privateIP"`
PrivateDNS string `json:"privateDNS"`
RootDiskType string `json:"rootDiskType"`
RootDiskSize int `json:"rootDiskSize"`
RootDeviceName string `json:"RootDeviceName"`
ConnectionName string `json:"connectionName"`
ConnectionConfig ConnConfig `json:"connectionConfig"`
SpecId string `json:"specId"`
CspSpecName string `json:"cspSpecName"`
Spec SpecSummary `json:"spec"`
ImageId string `json:"imageId"`
CspImageName string `json:"cspImageName"`
Image ImageSummary `json:"image"`
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"`
NodeUserName string `json:"nodeUserName,omitempty"`
NodeUserPassword string `json:"nodeUserPassword,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 Node
CommandStatus []CommandStatusInfo `json:"commandStatus,omitempty"`
AddtionalDetails []KeyValue `json:"addtionalDetails,omitempty"`
}
type NodePriority ¶ added in v0.12.6
NodePriority is struct for NodePriority
type NodeRecommendInfo ¶ added in v0.12.6
type NodeRecommendInfo struct {
NodeReq NodeRecommendReq `json:"nodeReq"`
NodePriorityList []NodePriority `json:"nodePriority"`
PlacementAlgo string `json:"placementAlgo"`
PlacementParam []KeyValue `json:"placementParam"`
}
NodeRecommendInfo is struct for NodeRecommendInfo
type NodeRecommendReq ¶ added in v0.12.6
type NodeRecommendReq 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"`
}
NodeRecommendReq is struct for NodeRecommendReq
type NodeSnapshotResult ¶ added in v0.12.6
type NodeSnapshotResult struct {
NodeGroupId string `json:"nodeGroupId" example:"g1"`
NodeId string `json:"nodeId" example:"g1-1"`
NodeName string `json:"nodeName" 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"`
Error string `json:"error,omitempty"`
}
NodeSnapshotResult represents the result of creating a snapshot for a single Node
type NodeStatusInfo ¶ added in v0.12.6
type NodeStatusInfo 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 int `json:"sshPort"`
Location Location `json:"location"`
}
NodeStatusInfo is to define simple information of Node with updated status
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 ObjectStorageFeatureSupport ¶ added in v0.12.3
type ObjectStorageFeatureSupport struct {
Cors bool `json:"cors" example:"true"`
Versioning bool `json:"versioning" example:"true"`
PresignedUrl bool `json:"presignedUrl" example:"true"`
}
ObjectStorageFeatureSupport represents the feature support information for a CSP. Tumblebug focuses on Bucket control/utilization APIs. Object upload/download is supported to the extent of PresignedURL. Multipart upload and Delete Markers are excluded from Tumblebug policy.
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"`
SystemMessage string `json:"systemMessage,omitempty"`
Conditions []Condition `json:"conditions,omitempty"`
// 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 ObjectStorageListBucketsResponse ¶ added in v0.12.3
type ObjectStorageListBucketsResponse struct {
Owner Owner `json:"owner"`
Buckets Buckets `json:"buckets"`
}
ObjectStorageListBucketsResponse represents the response structure for listing S3 buckets (legacy)
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 {
ObjectStorage []ObjectStorageInfo `json:"objectStorage"`
}
ObjectStorageListResponse represents the response structure for listing object storages
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"`
RequiredHeaders map[string]string `json:"requiredHeaders,omitempty" example:"x-ms-blob-type:BlockBlob"`
}
ObjectStoragePresignedUrlResponse represents the response structure for presigned URL generation
type ObjectStorageReconcileResponse ¶ added in v0.12.9
type ObjectStorageReconcileResponse struct {
// ObjectStorageId is the Tumblebug resource ID that was reconciled
ObjectStorageId string `json:"objectStorageId" example:"test-add-object-tencent"`
// MetadataStatus indicates whether Tumblebug metadata was found in the key-value store
// Possible values: "Found", "NotFound"
MetadataStatus string `json:"metadataStatus" example:"Found"`
// CspResourceStatus indicates whether the corresponding CSP resource actually exists
// Possible values: "Exists", "NotFound", "Skipped"
// "Skipped" means the CSP check was not performed because the metadata had no CSP resource ID (Uid is empty)
CspResourceStatus string `json:"cspResourceStatus" example:"NotFound"`
// Action describes what corrective action was taken
// Possible values: "NoActionNeeded", "MetadataRemoved", "MetadataUpdated", "StatusRestored"
// "StatusRestored" means the resource status was restored to Available because
// the CSP resource still exists but Tumblebug metadata was stuck in a terminal
// failure state (e.g., DeletionFailed) — typically caused by a dependency that
// has since been resolved.
Action string `json:"action" example:"MetadataRemoved"`
// Message provides a human-readable description of the reconcile result
Message string `json:"message" example:"Orphaned metadata removed: CSP resource does not exist"`
}
ObjectStorageReconcileResponse represents the result of a reconcile operation on an object storage resource. Reconcile checks for discrepancies between Tumblebug metadata and the actual CSP resource, then takes corrective action (e.g., removing orphaned metadata when the CSP bucket no longer exists).
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 ObjectStorageSupportResponse ¶ added in v0.12.3
type ObjectStorageSupportResponse struct {
ResourceType string `json:"resourceType" example:"objectStorage"`
Supports map[string]ObjectStorageFeatureSupport `json:"supports,omitempty"`
}
ObjectStorageSupportResponse represents the response structure for CSP support information
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"`
}
ObjectVersion represents a single object version in the list object versions response
type OpenStackSpecificProperty ¶ added in v0.12.6
type OpenStackSpecificProperty struct {
BgpAsn string `json:"bgpAsn,omitempty" default:"65000" example:"65000"`
}
type Operation ¶
type Operation struct {
Operator string `json:"operator" example:"<=" enums:">=,<=,=="` // >=, <=, ==
Operand string `json:"operand" example:"4"` // 10, 70, 80, 98, ... or string values like "aws", "x86_64"
}
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. NodeId)
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 Infra 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 float64 `json:"weight" example:"0.3"`
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 ProviderAssetSummary ¶ added in v0.12.6
type ProviderAssetSummary struct {
ProviderName string `json:"providerName" example:"aws"`
SpecCount int64 `json:"specCount" example:"11234"`
PricedSpecCount int64 `json:"pricedSpecCount" example:"11000"`
UnpricedSpecCount int64 `json:"unpricedSpecCount" example:"234"`
ImageCount int64 `json:"imageCount" example:"5234"`
}
ProviderAssetSummary is a provider-level summary of fetched assets.
type ProvisioningEvent ¶ added in v0.11.3
type ProvisioningEvent struct {
// SpecId is the Node 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"`
// NodeName is the name of the VM that was being provisioned
NodeName string `json:"nodeName"`
// InfraId is the Infra ID that this VM belongs to
InfraId string `json:"infraId"`
}
ProvisioningEvent represents a single provisioning event for logging
type ProvisioningLog ¶ added in v0.11.3
type ProvisioningLog struct {
// SpecId is the Node 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 Node spec
type PublicKeyResponse ¶
type PublicKeyResponse struct {
PublicKeyTokenId string `json:"publicKeyTokenId"`
PublicKey string `json:"publicKey"`
}
PublicKeyResponse is struct for containing the public key response
type ReadyzResponse ¶ added in v0.12.3
type ReadyzResponse struct {
Message string `json:"message" example:"CB-Tumblebug is ready"`
Ready bool `json:"ready" example:"true"`
Initialized bool `json:"initialized" example:"false"`
}
ReadyzResponse is struct for readyz API response
type RecommendAlternativeNodeConfigReq ¶ added in v0.12.14
type RecommendAlternativeNodeConfigReq struct {
// SourceSpecId is the TB spec ID of the existing nodegroup (e.g., "aws+us-east-2+p4d.24xlarge").
SourceSpecId string `json:"sourceSpecId" validate:"required" example:"aws+us-east-2+p4d.24xlarge"`
// SourceImageId is the CSP image name or TB image ID used in the source nodegroup.
// When provided, its osType is used to guide image recommendation in the target CSP.
SourceImageId string `json:"sourceImageId,omitempty" example:"ami-00b02e8f2be5634d2"`
// TargetProviderName is the CSP to search in (e.g., "gcp", "azure").
TargetProviderName string `json:"targetProviderName" validate:"required" example:"gcp"`
// TargetRegionName constrains the search to a specific region.
// When omitted, all regions of the target CSP are searched.
TargetRegionName string `json:"targetRegionName,omitempty" example:"us-central1"`
// TolerancePercent is the ±% range applied to fields with "preferred" policy (default: 20).
TolerancePercent int `json:"tolerancePercent,omitempty" example:"20"`
// MatchCriteria overrides the default per-field match policy.
// Omitted fields use their documented defaults.
MatchCriteria SpecMatchCriteria `json:"matchCriteria,omitempty"`
// SpecCandidateLimit is the maximum number of candidate specs to return (default: 5).
SpecCandidateLimit int `json:"specCandidateLimit,omitempty" example:"5"`
// ImageAlternativeLimit is the number of alternative images to return per candidate (default: 3).
ImageAlternativeLimit int `json:"imageAlternativeLimit,omitempty" example:"3"`
// OSType overrides the OS type for image search (e.g., "ubuntu").
// When omitted, the osType of SourceImageId is used; if that is also unavailable, no OS filter is applied.
OSType string `json:"osType,omitempty" example:"ubuntu"`
}
RecommendAlternativeNodeConfigReq is the request body for /recommendAlternativeNodeConfig.
type RecommendAlternativeNodeConfigResponse ¶ added in v0.12.14
type RecommendAlternativeNodeConfigResponse struct {
SourceSpec SpecInfo `json:"sourceSpec"`
SourceImage *ImageInfo `json:"sourceImage,omitempty"`
Candidates []AlternativeNodeConfigCandidate `json:"candidates"`
}
RecommendAlternativeNodeConfigResponse is the response of /recommendAlternativeNodeConfig.
type RecommendSpecReq ¶ added in v0.11.4
type RecommendSpecReq struct {
Filter FilterInfo `json:"filter"`
Priority PriorityInfo `json:"priority"`
Limit int `json:"limit" example:"5"`
}
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"`
RegistrationOverview RegistrationOverview `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"`
RegistrationOverview RegistrationOverview `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 RegistrationOverview ¶ added in v0.12.13
type RegistrationOverview struct {
VNet int `json:"vNet"`
SecurityGroup int `json:"securityGroup"`
SshKey int `json:"sshKey"`
DataDisk int `json:"dataDisk"`
CustomImage int `json:"customImage"`
Node int `json:"node"`
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"`
Azure RequiredAzureResourceForSqlDB `json:"azure"`
NCP RequiredNCPResourceForSqlDB `json:"ncp"`
}
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 ResourceDeleteResult ¶ added in v0.12.3
type ResourceDeleteResult struct {
// Resource type (e.g., "securityGroup", "sshKey", "vNet")
ResourceType string `json:"resourceType" example:"securityGroup"`
// Resource ID
ResourceId string `json:"resourceId" example:"default-shared-aws-ap-northeast-2"`
// Whether the deletion was successful
Success bool `json:"success" example:"true"`
// Descriptive message (error detail on failure, empty on success)
Message string `json:"message" example:"Cannot delete resource because it is still referenced by ..."`
}
ResourceDeleteResult represents the result of a single resource deletion operation.
type ResourceDeleteResults ¶ added in v0.12.3
type ResourceDeleteResults struct {
// Total number of resources processed
Total int `json:"total" example:"10"`
// Number of successfully deleted resources
SuccessCount int `json:"successCount" example:"8"`
// Number of failed deletions
FailedCount int `json:"failedCount" example:"2"`
// Individual results per resource
Results []ResourceDeleteResult `json:"results"`
}
ResourceDeleteResults represents the aggregated results of a batch resource deletion operation.
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"`
InfraId string `json:"infraId,omitempty"`
ObjectKey string `json:"objectKey"`
}
ResourceOnTumblebugInfo is struct for Resource on Tumblebug Info
type ResourceReconcileResult ¶ added in v0.12.14
type ResourceReconcileResult struct {
// Resource type (e.g., "vNet", "securityGroup", "sshKey")
ResourceType string `json:"resourceType" example:"vNet"`
// Resource ID
ResourceId string `json:"resourceId" example:"vnet00"`
// Connection name
ConnectionName string `json:"connectionName" example:"aws-ap-northeast-2"`
// Whether the reconciliation was successful
Success bool `json:"success" example:"true"`
// Elapsed time in seconds (numeric, 2 decimal places)
ElapsedSeconds float64 `json:"elapsedSeconds" example:"2.31"`
// Human-readable elapsed time
Elapsed string `json:"elapsed" example:"2.3s"`
// Descriptive message about the reconciliation outcome
Message string `` /* 165-byte string literal not displayed */
// Error detail if reconciliation failed
Error string `json:"error,omitempty" example:"failed to get CSP status: connection timeout"`
}
ResourceReconcileResult represents the result of a single resource reconciliation operation.
type ResourceReconcileResults ¶ added in v0.12.14
type ResourceReconcileResults struct {
// Total number of resources processed
Total int `json:"total" example:"10"`
// Number of successfully reconciled resources
SuccessCount int `json:"successCount" example:"9"`
// Number of failed reconciliations
FailedCount int `json:"failedCount" example:"1"`
// Total elapsed time in seconds (numeric, 2 decimal places)
ElapsedSeconds float64 `json:"elapsedSeconds" example:"106.43"`
// Human-readable total elapsed time
Elapsed string `json:"elapsed" example:"1m 46s"`
// Individual results per resource
Results []ResourceReconcileResult `json:"results"`
}
ResourceReconcileResults represents the aggregated results of a batch resource reconciliation operation.
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]any `json:"object,omitempty"`
List []any `json:"list,omitempty"`
}
type RestGetGlobalDnsRecordResponse ¶ added in v0.12.4
type RestGetGlobalDnsRecordResponse struct {
Record []GlobalDnsRecordInfo `json:"record"`
}
RestGetGlobalDnsRecordResponse is a struct to handle 'Get globalDns record' response toward CB-Tumblebug.
type RestGetHostedZonesResponse ¶ added in v0.12.4
type RestGetHostedZonesResponse struct {
HostedZones []HostedZoneInfo `json:"hostedZones"`
}
RestGetHostedZonesResponse is a struct to handle 'Get hosted zones' response.
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"`
}
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 ReviewInfraDynamicReqInfo ¶ added in v0.12.6
type ReviewInfraDynamicReqInfo struct {
// Overall assessment of the Infra request
OverallStatus string `json:"overallStatus" example:"Ready/Warning/Error"`
OverallMessage string `json:"overallMessage" example:"All Nodes can be created successfully"`
CreationViable bool `json:"creationViable"`
EstimatedCost string `json:"estimatedCost,omitempty" example:"$0.50/hour"`
// Infra-level information
InfraName string `json:"infraName"`
TotalNodeCount int `json:"totalNodeCount"`
// Failure policy analysis
PolicyOnPartialFailure string `json:"policyOnPartialFailure" example:"continue"`
PolicyDescription string `` /* 133-byte string literal not displayed */
PolicyRecommendation string `json:"policyRecommendation,omitempty" example:"Consider 'refine' policy for automatic cleanup of failed Nodes"`
// Node-level validation results
NodeReviews []ReviewNodeGroupDynamicReqInfo `json:"nodeReviews"`
// Resource availability summary
ResourceSummary ReviewResourceSummary `json:"resourceSummary"`
// Recommendations for improvement
Recommendations []string `json:"recommendations,omitempty"`
}
ReviewInfraDynamicReqInfo is struct for review result of Infra dynamic request
type ReviewNodeGroupDynamicReqInfo ¶ added in v0.12.6
type ReviewNodeGroupDynamicReqInfo struct {
// Node request information
NodeName string `json:"nodeName"`
NodeGroupSize int `json:"nodeGroupSize"`
// Validation status
Status string `json:"status" example:"Ready/Warning/Error"`
Message string `json:"message" example:"Node 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"`
}
ReviewNodeGroupDynamicReqInfo is struct for review result of individual Node in Infra 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 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 ScaleOutNodeGroupReq ¶ added in v0.12.6
type ScaleOutNodeGroupReq struct {
// Define additional Nodes to scaleOut
NumNodesToAdd int `json:"numNodesToAdd" validate:"required" example:"2"`
}
CreateNodeGroupReq 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"` // (Deprecated) Connection configuration name. Use Provider/Region/Zone instead
Provider string `json:"provider,omitempty" example:"aws"` // Cloud provider name. Empty: all providers
Region string `json:"region,omitempty" example:"ap-northeast-2"` // Region name. Requires Provider. Empty: all regions for the provider
Zone string `json:"zone,omitempty" example:"ap-northeast-2a"` // Zone name. Requires Provider and Region. Empty: all zones for the region
InfraNamePrefix string `json:"infraNamePrefix,omitempty" example:"infra-01"` // Infra name prefix
Option string `json:"option,omitempty" example:"vNet,securityGroup"` // Resource types (csv): vNet, securityGroup, sshKey, vm, dataDisk, customImage. Empty: all
InfraFlag string `json:"infraFlag,omitempty" example:"y"` // Infra 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" example:"2023-10-27T11:30:00Z"`
NextExecutionAt time.Time `json:"nextExecutionAt" 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"` // (Deprecated)
Provider string `json:"provider,omitempty" example:"aws"`
Region string `json:"region,omitempty" example:"ap-northeast-2"`
Zone string `json:"zone,omitempty" example:"ap-northeast-2a"`
InfraNamePrefix string `json:"infraNamePrefix,omitempty" example:"infra-01"`
Option string `json:"option,omitempty" example:""`
InfraFlag string `json:"infraFlag,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 this image can be used to create K8s nodes.
// For AWS/GCP, only type identifiers registered in cloudimage.csv are true.
// 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."`
// IsBasicGpuImage filters for GPU images with GPU drivers pre-installed.
// Note: images with isBasicGpuImage=true always have isBasicImage=false (they are mutually exclusive on returned image objects).
// If not specified, both true and false images will be included in the search results.
IsBasicGpuImage *bool `` /* 162-byte string literal not displayed */
// 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 `` /* 164-byte string literal not displayed */
// 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"` // Optional for registration: some CSPs (e.g., Azure, Tencent, NHN) don't bind SG to VPC
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 SecurityGroupTemplateApplyReq ¶ added in v0.12.3
type SecurityGroupTemplateApplyReq struct {
// Name for the new SecurityGroup to be created from the template
Name string `json:"name" validate:"required" example:"my-new-sg"`
// Description for the new SecurityGroup (optional, overrides template description)
Description string `json:"description" example:"SecurityGroup created from template"`
}
SecurityGroupTemplateApplyReq is struct for applying a SecurityGroup template Phase 1: Only name and description overrides are supported
type SecurityGroupTemplateInfo ¶ added in v0.12.3
type SecurityGroupTemplateInfo struct {
// ResourceType is the type of the resource
ResourceType string `json:"resourceType" example:"securityGroup"`
// Id is unique identifier for the template
Id string `json:"id" example:"my-sg-template"`
// Name is human-readable string to represent the template
Name string `json:"name" example:"my-sg-template"`
// Description of the template
Description string `json:"description" example:"Standard web server security group template"`
// Source indicates where this template was created from
// - "user": manually created by user
Source string `json:"source" example:"user"`
// CreatedAt is the creation timestamp
CreatedAt string `json:"createdAt" example:"2024-01-01T00:00:00Z"`
// UpdatedAt is the last update timestamp
UpdatedAt string `json:"updatedAt" example:"2024-01-01T00:00:00Z"`
// SecurityGroupReq is the template body (SecurityGroup creation request)
SecurityGroupReq SecurityGroupReq `json:"securityGroupReq"`
}
SecurityGroupTemplateInfo is struct for SecurityGroup Template information stored in ETCD
type SecurityGroupTemplateListResponse ¶ added in v0.12.3
type SecurityGroupTemplateListResponse struct {
Templates []SecurityGroupTemplateInfo `json:"templates"`
}
SecurityGroupTemplateListResponse is struct for listing SecurityGroup Templates
type SecurityGroupTemplateReq ¶ added in v0.12.3
type SecurityGroupTemplateReq struct {
// Name is the template ID and name
Name string `json:"name" validate:"required" example:"my-sg-template"`
// Description of the template
Description string `json:"description" example:"Standard web server security group template"`
// SecurityGroupReq is the template body (SecurityGroup creation request configuration)
SecurityGroupReq SecurityGroupReq `json:"securityGroupReq" validate:"required"`
}
SecurityGroupTemplateReq is struct for creating/updating a SecurityGroup Template
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"`
Previous SecurityGroupInfo `json:"previous"`
}
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"`
}
type SitesInfo ¶ added in v0.9.22
type SitesInfo struct {
NsId string `json:"nsId" example:"ns-01"`
InfraId string `json:"infraId" example:"infra-01"`
Count int `json:"count" example:"3"`
Sites sites `json:"sites"`
}
SitesInfo struct represents the overall site information including namespace and Infra 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 Node 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 SpecDiff ¶ added in v0.12.14
type SpecDiff struct {
VCPUDiff int `json:"vCPUDiff"` // candidate.vCPU - source.vCPU
MemoryGiBDiff float32 `json:"memoryGiBDiff"` // candidate.memoryGiB - source.memoryGiB
CostPerHourDiff float32 `json:"costPerHourDiff"` // negative = cheaper in target CSP
ArchitectureMatch bool `json:"architectureMatch"`
AccelTypeMatch bool `json:"accelTypeMatch"`
AccelModelMatch bool `json:"accelModelMatch"`
AccelCountDiff int `json:"accelCountDiff"` // candidate - source
AccelMemGBDiff float32 `json:"accelMemGBDiff"` // candidate - source
}
SpecDiff captures the field-by-field delta between a candidate spec and the source spec. Positive numeric values mean the candidate has more than the source.
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" 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"`
RootDiskType string `json:"rootDiskType,omitempty" example:"default"` // "", "default", or CSP-native disk category (e.g., "cloud_essd")
Zone string `json:"zone,omitempty" example:""` // optional CSP-native zone id; empty = all zones in region
}
SpecImagePairReviewReq is struct for spec-image pair review request.
RootDiskType and Zone are OPTIONAL and used to make the availability pre-check more precise:
- RootDiskType: when empty or "default", the checker queries availability across all disk categories supported in the region (CSP/Spider will pick its own default at provision time). When a specific category is given (e.g., "cloud_essd"), the result reflects stock for that exact disk type, allowing the UI to flag combinations that will fail.
- Zone: when set, the checker scopes the availability query to that single zone (so SuggestedSystemDisk and Available reflect that zone only). When empty, the result spans all zones in the region.
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"`
// Pre-flight availability (zone × disk-category) from CSP-specific checker.
// Populated when a checker is registered for the provider; nil otherwise.
Availability *AvailabilityResult `json:"availability,omitempty"`
// SuggestedZone is a zone picked from Availability.Zones that has stock and
// supports the requested (or any) system-disk category. Empty when no
// suggestion is possible (e.g., provider has no checker, or every zone is
// out of stock). Callers can use this to pre-fill ZoneId for VM creation
// to improve 1-shot success rate.
SuggestedZone string `json:"suggestedZone,omitempty"`
// SuggestedSystemDisk is a system-disk category that is currently
// available in SuggestedZone. Empty when no suggestion is possible.
SuggestedSystemDisk string `json:"suggestedSystemDisk,omitempty"`
// RequestedRootDiskType echoes the input RootDiskType (after normalization:
// empty/"default" -> ""). Useful for UI to confirm what was checked.
RequestedRootDiskType string `json:"requestedRootDiskType,omitempty"`
// RequestedZone echoes the input Zone. Empty means region-wide check.
RequestedZone string `json:"requestedZone,omitempty"`
// 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 int `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 SpecMatchCriteria ¶ added in v0.12.14
type SpecMatchCriteria struct {
// Default: required — mixing architectures breaks binary compatibility
Architecture MatchPolicy `json:"architecture,omitempty" example:"required" enums:"required,preferred,open"`
// Default: preferred
VCPU MatchPolicy `json:"vCPU,omitempty" example:"preferred" enums:"required,preferred,open"`
// Default: preferred
MemoryGiB MatchPolicy `json:"memoryGiB,omitempty" example:"preferred" enums:"required,preferred,open"`
// Default: required — GPU vs non-GPU is a fundamental workload difference
AcceleratorType MatchPolicy `json:"acceleratorType,omitempty" example:"required" enums:"required,preferred,open"`
// Default: open — constrain only when a specific GPU model is needed (e.g., "A100")
AcceleratorModel MatchPolicy `json:"acceleratorModel,omitempty" example:"open" enums:"required,open"`
// Default: preferred (applied only when source spec has a GPU)
AcceleratorCount MatchPolicy `json:"acceleratorCount,omitempty" example:"preferred" enums:"required,preferred,open"`
// Default: preferred (applied only when source spec has a GPU)
AcceleratorMemoryGB MatchPolicy `json:"acceleratorMemoryGB,omitempty" example:"preferred" enums:"required,preferred,open"`
// Default: open — used only for ranking, not filtering
CostPerHour MatchPolicy `json:"costPerHour,omitempty" example:"open" enums:"required,preferred,open"`
}
SpecMatchCriteria holds per-field match policies for RecommendAlternativeNodeConfig. Fields left as zero-value ("") use their default policy (see field comments).
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 SpecSummary ¶ added in v0.12.3
type SpecSummary struct {
CspSpecName string `json:"cspSpecName,omitempty" example:"t3.medium"`
VCPU uint16 `json:"vCPU,omitempty" example:"2"`
MemoryGiB float32 `json:"memoryGiB,omitempty" example:"4"`
AcceleratorModel string `json:"acceleratorModel,omitempty" example:"NVIDIA Tesla V100"`
AcceleratorCount uint8 `json:"acceleratorCount,omitempty" example:"1"`
AcceleratorMemoryGB float32 `json:"acceleratorMemoryGB,omitempty" example:"16"`
AcceleratorType string `json:"acceleratorType,omitempty" example:"GPU"`
CostPerHour float32 `json:"costPerHour,omitempty" example:"0.0416"`
}
SpecSummary is a lightweight struct containing essential spec information for NodeInfo
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 SpiderBooleanInfo ¶ added in v0.12.3
type SpiderBooleanInfo struct {
Result string `json:"Result"`
}
SpiderBooleanInfo is struct for boolean type response from CB-Spider DELETE operations Spider returns {"Result": "true"} or {"Result": "false"} for delete operations
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
OwnerNode IID // When the Status is DiskAttached
CreatedTime time.Time
KeyValueList []KeyValue
}
SpiderDiskInfo is a struct to create JSON body of 'Get disk request'
type SpiderDiskReqInfoWrapper ¶
type SpiderDiskReqInfoWrapper struct {
ConnectionName string
ReqInfo SpiderDiskInfo
}
SpiderDiskReqInfoWrapper is a wrapper struct to create JSON body of 'Get disk request'
type SpiderDiskUpsizeReq ¶
type SpiderDiskUpsizeReq struct {
Size string // "", "default", "50", "1000" # (GB)
}
SpiderDiskUpsizeReq is a struct to create JSON body of 'Upsize disk request'
type SpiderDiskUpsizeReqWrapper ¶
type SpiderDiskUpsizeReqWrapper struct {
ConnectionName string
ReqInfo SpiderDiskUpsizeReq
}
SpiderDiskUpsizeReqWrapper is a wrapper struct to create JSON body of 'Upsize disk request'
type SpiderGpuInfo ¶
type SpiderGpuInfo struct {
Count string `json:"Count" validate:"required" example:"2"` // Number of GPUs, "-1" when not applicable
Mfr string `json:"Mfr,omitempty" validate:"omitempty" example:"NVIDIA"` // Manufacturer of the GPU, NA when not applicable
Model string `json:"Model,omitempty" validate:"omitempty" example:"Tesla K80"` // Model of the GPU, NA when not applicable
MemSizeGB string `json:"MemSizeGB,omitempty" validate:"omitempty" example:"12"` // Memory size of the GPU in GB, "-1" when not applicable
TotalMemSizeGB string `json:"TotalMemSizeGB,omitempty" validate:"omitempty" example:"24"` // Total Memory size of the GPU in GB, "-1" when not applicable
}
SpiderGpuInfo is a struct to handle GPU Info from CB-Spider.
type SpiderImageInfo ¶
type SpiderImageInfo struct {
IId IID `json:"IId" description:"The ID of the image."` // {NameId, SystemId}, {ami-00aa5a103ddf4509f, ami-00aa5a103ddf4509f}
Name string `json:"Name" example:"ami-00aa5a103ddf4509f" description:"The name of the image."` // ami-00aa5a103ddf4509f
OSArchitecture OSArchitecture `json:"OSArchitecture" example:"x86_64" description:"The architecture of the operating system of the image."` // arm64, x86_64 etc.
OSPlatform OSPlatform `json:"OSPlatform" example:"Linux/UNIX" description:"The platform of the operating system of the image."` // Linux/UNIX, Windows, NA
OSDistribution string `json:"OSDistribution" example:"Ubuntu 22.04~" description:"The distribution of the operating system of the image."` // Ubuntu 22.04~, CentOS 8 etc.
OSDiskType string `json:"OSDiskType" example:"HDD" description:"The type of the OS disk of for the VM being created."` // ebs, HDD, etc.
OSDiskSizeGB string `json:"OSDiskSizeGB" example:"50" description:"The (minimum) OS disk size in GB for the VM being created."` // 10, 50, 100 etc.
ImageStatus ImageStatus `json:"ImageStatus" example:"Available" description:"The status of the image, e.g., Available or Unavailable."` // Available, Unavailable
KeyValueList []KeyValue `json:"KeyValueList,omitempty" validate:"omitempty" description:"A list of key-value pairs associated with the image."`
}
SpiderImageInfo represents the information of an Image.
type SpiderImageList ¶
type SpiderImageList struct {
Image []SpiderImageInfo `json:"image"`
}
SpiderImageList is struct for Spider Image List
type SpiderImageReqInfoWrapper ¶
type SpiderImageReqInfoWrapper struct {
ConnectionName string
ReqInfo SpiderImageInfo
}
SpiderImageReqInfoWrapper is a wrapper struct to create JSON body of 'Get image request'
type SpiderImageType ¶
type SpiderImageType string
const ( PublicImage SpiderImageType = "PublicImage" MyImage SpiderImageType = "MyImage" )
type SpiderKeyPairInfo ¶
type SpiderKeyPairInfo struct {
// Fields for request
Name string
CSPId string
// Fields for response
IId IID // {NameId, SystemId}
Fingerprint string
PublicKey string
PrivateKey string
VMUserID string
KeyValueList []KeyValue
}
SpiderKeyPairInfo is a struct to create JSON body of 'Create keypair request'
type SpiderKeyPairReqInfoWrapper ¶
type SpiderKeyPairReqInfoWrapper struct {
ConnectionName string
ReqInfo SpiderKeyPairInfo
}
SpiderKeyPairReqInfoWrapper is a wrapper struct to create JSON body of 'Create keypair request'
type SpiderMeta ¶ added in v0.10.7
type SpiderMeta struct {
Version string `json:"Version" validate:"required" example:"1.0"` // Version of the pricing data
Description string `json:"Description,omitempty" example:"Cloud price data"` // Description of the pricing data
}
SpiderMeta contains metadata information about the price data.
type SpiderMyImageInfo ¶
type SpiderMyImageInfo struct {
IId IID // {NameId, SystemId}
// SourceNode is the CSP VM (Node) the image was created from. The JSON tag
// MUST remain "SourceVM" to match CB-Spider's MyImageInfo response field.
SourceNode IID `json:"SourceVM"`
Status CustomImageStatus // Available | Deleting
CreatedTime time.Time
KeyValueList []KeyValue
}
type SpiderMyImageReq ¶
type SpiderMyImageReq struct {
ConnectionName string
ReqInfo struct {
Name string
// SourceNode carries the CSP VM (Node) identifier. The JSON tag MUST
// remain "SourceVM" because CB-Spider's /myimage (SnapshotVM) API
// contract expects the "SourceVM" field. Renaming the wire field
// causes CB-Spider to receive an empty VM id ("VM ” does not exist").
SourceNode string `json:"SourceVM"`
}
}
type SpiderNLBAddRemoveVMReqInfoWrapper ¶
type SpiderNLBAddRemoveVMReqInfoWrapper struct {
ConnectionName string
ReqInfo SpiderNLBNodeGroupReq
}
SpiderNLBAddRemoveVMReqInfoWrapper is a wrapper struct to create JSON body of 'Add/Remove Nodes 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 SpiderNLBNodeGroupInfo
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 SpiderNLBNodeGroupInfo ¶ added in v0.12.6
type SpiderNLBNodeGroupInfo 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"`
}
SpiderNLBNodeGroupInfo is a struct from NLBNodeGroupInfo from Spider
type SpiderNLBNodeGroupReq ¶ added in v0.12.6
type SpiderNLBReqInfo ¶
type SpiderNLBReqInfo struct {
Name string
VPCName string
Type string // PUBLIC(V) | INTERNAL
Scope string // REGION(V) | GLOBAL
Listener NLBListenerReq
VMGroup SpiderNLBNodeGroupReq
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 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
RootDeviceName 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 // Node ID given by CSP (required for registering Node)
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 Node 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 any `json:"details"`
}
type SshCmdResult ¶
type SshCmdResult struct {
InfraId string `json:"infraId"`
NodeId string `json:"nodeId"`
NodeIp string `json:"nodeIp"`
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 {
InfraId string `json:"infraId"`
NodeId string `json:"nodeId"`
NodeIp string `json:"nodeIp"`
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 SshKeyComplementReq ¶ added in v0.12.3
type SshKeyComplementReq struct {
Username string `json:"username"`
PrivateKey string `json:"privateKey"`
}
SshKeyComplementReq is a struct for updating SSH key fields for reactivating remote command.
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 SshKeyUpdateReq ¶ added in v0.12.3
type SshKeyUpdateReq struct {
Description string `json:"description"`
Fingerprint string `json:"fingerprint"`
Username string `json:"username"`
VerifiedUsername string `json:"verifiedUsername"`
PublicKey string `json:"publicKey"`
PrivateKey string `json:"privateKey"`
}
UpdatableSshKeyInfo is a struct for updating SSH key fields via PUT.
type StatusCountInfo ¶
type StatusCountInfo struct {
// CountTotal is for Total Nodes
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"`
// CountRegistering is for counting Registering
CountRegistering int `json:"countRegistering"`
// CountUndefined is for counting Undefined
CountUndefined int `json:"countUndefined"`
}
StatusCountInfo is struct to count the number of Nodes in each status. ex: Running=4, Suspended=8.
type SubnetDetail ¶ added in v0.10.7
type SubnetDetail struct {
PrefixLength PrefixLengthDetail `mapstructure:"prefix-length" json:"prefixLength"`
ReservedIPs ReservedIPsDetail `mapstructure:"reserved-ips" json:"reservedIPs"`
}
SubnetDetail is structure for subnet configuration
type 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"`
SystemMessage string `json:"systemMessage,omitempty"`
Conditions []Condition `json:"conditions,omitempty"`
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 TemplateApplyReq ¶ added in v0.12.3
type TemplateApplyReq struct {
// Name for the new Infra to be created from the template
Name string `json:"name" validate:"required" example:"my-new-infra"`
// Description for the new Infra (optional, overrides template description)
Description string `json:"description" example:"Infra created from template"`
}
TemplateApplyReq is struct for applying a template to create an Infra Phase 1: Only name and description overrides are supported
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"`
SystemMessage string `json:"systemMessage,omitempty"`
Conditions []Condition `json:"conditions,omitempty"`
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 VNetPolicy ¶ added in v0.12.4
type VNetPolicy struct {
// CidrBlock for the VPC. Use "auto" to assign a unique /16 block automatically
// (based on connection index: 10.{i}.0.0/16), or specify an explicit CIDR.
// For CSPs that do not support VPC-level CIDR (e.g. GCP), this field is ignored.
CidrBlock string `json:"cidrBlock" example:"auto"`
// SubnetCount is the desired number of subnets.
// CSP-specific caps apply automatically:
// IBM → always capped to 1 (VPC/subnet architecture limitation)
// Others → up to 2 subnets are supported; values > 2 are capped to 2
SubnetCount int `json:"subnetCount" example:"2"`
// MultiZone requests that subnets be spread across different availability zones
// when the region has more than one zone.
// Set to false to place all subnets in the same zone (required for some workloads).
// NCP → always forced to false (all subnets must reside in the same zone).
MultiZone bool `json:"multiZone" example:"true"`
}
VNetPolicy defines a CSP-agnostic intent for VNet creation. The policy is converted to a CSP-specific VNetReq at provisioning time, respecting per-CSP constraints automatically (e.g. IBM single-subnet, NCP same-zone).
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 VNetTemplateApplyReq ¶ added in v0.12.3
type VNetTemplateApplyReq struct {
// Name for the new vNet to be created from the template
Name string `json:"name" validate:"required" example:"my-new-vnet"`
// Description for the new vNet (optional, overrides template description)
Description string `json:"description" example:"vNet created from template"`
}
VNetTemplateApplyReq is struct for applying a vNet template to create a vNet Phase 1: Only name and description overrides are supported
type VNetTemplateInfo ¶ added in v0.12.3
type VNetTemplateInfo struct {
// ResourceType is the type of the resource
ResourceType string `json:"resourceType" example:"vNet"`
// Id is unique identifier for the template
Id string `json:"id" example:"my-vnet-template"`
// Name is human-readable string to represent the template
Name string `json:"name" example:"my-vnet-template"`
// Description of the template
Description string `json:"description" example:"Standard 3-subnet VPC template"`
// Source indicates where this template was created from
// - "user": manually created by user
Source string `json:"source" example:"user"`
// CreatedAt is the creation timestamp
CreatedAt string `json:"createdAt" example:"2024-01-01T00:00:00Z"`
// UpdatedAt is the last update timestamp
UpdatedAt string `json:"updatedAt" example:"2024-01-01T00:00:00Z"`
// VNetPolicy is a CSP-agnostic VNet intent (policy mode).
// Mutually exclusive with VNetReq.
// Used for dynamic provisioning where CSP-specific details are auto-resolved.
VNetPolicy *VNetPolicy `json:"vNetPolicy,omitempty"`
// VNetReq is the raw VNet creation request (raw mode).
// Mutually exclusive with VNetPolicy.
// Used when precise control over CIDR and subnet layout is required.
VNetReq *VNetReq `json:"vNetReq,omitempty"`
}
VNetTemplateInfo is struct for vNet Template information stored in ETCD
type VNetTemplateListResponse ¶ added in v0.12.3
type VNetTemplateListResponse struct {
Templates []VNetTemplateInfo `json:"templates"`
}
VNetTemplateListResponse is struct for listing vNet Templates
type VNetTemplateReq ¶ added in v0.12.3
type VNetTemplateReq struct {
// Name is the template ID and name
Name string `json:"name" validate:"required" example:"my-vnet-template"`
// Description of the template
Description string `json:"description" example:"Standard 3-subnet VPC template"`
// VNetPolicy is a CSP-agnostic VNet intent (policy mode).
// Mutually exclusive with VNetReq. Exactly one must be provided.
VNetPolicy *VNetPolicy `json:"vNetPolicy,omitempty"`
// VNetReq is the raw VNet creation request (raw mode).
// Mutually exclusive with VNetPolicy. Exactly one must be provided.
VNetReq *VNetReq `json:"vNetReq,omitempty"`
}
VNetTemplateReq is struct for creating/updating a vNet Template
type VPNDetail ¶ added in v0.10.7
type VPNDetail struct {
GatewaySubnet GatewaySubnetDetail `mapstructure:"gateway-subnet" json:"gatewaySubnet"`
}
VPNDetail is structure for VPN configuration
type VpnHealthCheckRequest ¶ added in v0.12.6
type VpnHealthCheckRequest struct {
// UserName is the SSH username (default: cb-user)
UserName string `json:"userName,omitempty" example:"cb-user" default:"cb-user"`
// PingCount is the number of ping packets to send per attempt (default: 4, min: 1, max: 10)
PingCount int `json:"pingCount,omitempty" example:"4" default:"4"`
// IntervalSec is the interval in seconds between ping attempts (default: 15, min: 3, max: 120)
IntervalSec int `json:"intervalSec,omitempty" example:"15" default:"15"`
// MaxAttempts is the maximum number of ping attempts (default: 20, min: 1, max: 50)
MaxAttempts int `json:"maxAttempts,omitempty" example:"20" default:"20"`
}
VpnHealthCheckRequest is the request body for VPN health check
func (*VpnHealthCheckRequest) GetEffectiveValues ¶ added in v0.12.6
func (r *VpnHealthCheckRequest) GetEffectiveValues() (pingCount, intervalSec, maxAttempts int)
GetEffectiveValues returns sanitized values with defaults applied
type VpnHealthCheckResponse ¶ added in v0.12.6
type VpnHealthCheckResponse struct {
VpnId string `json:"vpnId" example:"vpn01"`
Reachable bool `json:"reachable" example:"true"`
Message string `json:"message" example:"Bidirectional VPN health check succeeded"`
Results []VpnPingDirectionResult `json:"results"`
}
VpnHealthCheckResponse is the response for VPN health check
type VpnHealthCheckSourceNodeInfo ¶ added in v0.12.6
type VpnHealthCheckSourceNodeInfo struct {
NodeId string `json:"nodeId" example:"aws-ap-northeast-2-1"`
PrivateIP string `json:"privateIp" example:"10.1.0.4"`
CSP string `json:"csp" example:"aws"`
}
VpnHealthCheckSourceNodeInfo is source Node info used in health check
type VpnHealthCheckTargetNodeInfo ¶ added in v0.12.6
type VpnHealthCheckTargetNodeInfo struct {
NodeId string `json:"nodeId" example:"gcp-asia-northeast3-1"`
PrivateIP string `json:"privateIp" example:"10.2.0.4"`
CSP string `json:"csp" example:"gcp"`
}
VpnHealthCheckTargetNodeInfo is target Node info used in health check
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"`
SystemMessage string `json:"systemMessage,omitempty"`
Conditions []Condition `json:"conditions,omitempty"`
VpnSites []VpnSiteDetail `json:"vpnSites"`
}
type VpnInfoList ¶ added in v0.9.22
type VpnInfoList struct {
VpnInfoList []VpnInfo `json:"vpnInfoList"`
}
type VpnPingDirectionResult ¶ added in v0.12.6
type VpnPingDirectionResult struct {
Direction string `json:"direction" example:"site1→site2"`
SourceNode VpnHealthCheckSourceNodeInfo `json:"sourceNode"`
TargetNode VpnHealthCheckTargetNodeInfo `json:"targetNode"`
Reachable bool `json:"reachable" example:"true"`
Attempts int `json:"attempts" example:"3"`
PingStats VpnPingStats `json:"pingStats"`
Message string `json:"message" example:"Ping succeeded on attempt 3/20"`
}
VpnPingDirectionResult is the result of a single-direction ping test
type VpnPingStats ¶ added in v0.12.6
type VpnPingStats struct {
PacketLoss string `json:"packetLoss" example:"0%"`
MinRtt string `json:"minRtt,omitempty" example:"1.234 ms"`
AvgRtt string `json:"avgRtt,omitempty" example:"2.345 ms"`
MaxRtt string `json:"maxRtt,omitempty" example:"3.456 ms"`
}
VpnPingStats holds parsed ping statistics
type VpnReconcileResponse ¶ added in v0.12.10
type VpnReconcileResponse struct {
// VpnId is the Tumblebug resource ID that was reconciled
VpnId string `json:"vpnId" example:"vpn01"`
// MetadataStatus indicates whether Tumblebug metadata was found in the key-value store
// Possible values: "Found", "NotFound"
MetadataStatus string `json:"metadataStatus" example:"Found"`
// CspResourceStatus indicates whether the corresponding Terrarium/CSP resource actually exists
// Possible values: "Exists", "NotFound", "Skipped"
// "Skipped" means the check was not performed because the metadata had no Uid (terrarium ID).
CspResourceStatus string `json:"cspResourceStatus" example:"NotFound"`
// Action describes what corrective action was taken
// Possible values: "NoActionNeeded", "MetadataRemoved", "StatusRestored"
Action string `json:"action" example:"MetadataRemoved"`
// Message provides a human-readable description of the reconcile result
Message string `json:"message" example:"Orphaned metadata removed: Terrarium resource does not exist"`
}
VpnReconcileResponse represents the result of a reconcile operation on a site-to-site VPN. Reconcile checks for discrepancies between Tumblebug metadata and the actual Terrarium/CSP resource, then takes corrective action (e.g., removing orphaned metadata when the Terrarium resource no longer exists, or restoring the status to Available when the resource is alive but metadata is stuck in a terminal-failure state).
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"`
}
type ZoneAvailability ¶ added in v0.12.7
type ZoneAvailability struct {
ZoneId string `json:"zoneId"`
Available bool `json:"available"`
SupportedDisks []string `json:"supportedDisks,omitempty"` // disk categories currently available in this zone
Status string `json:"status,omitempty"` // CSP-native status (e.g., "WithStock", "ClosedWithStock")
Reason string `json:"reason,omitempty"` // why not available, when applicable
}
ZoneAvailability describes per-zone availability for the queried instance type, including which system-disk categories are currently available in that zone.