controller

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2025 License: Apache-2.0 Imports: 29 Imported by: 1

Documentation

Overview

Package controller has handlers and their request/response bodies for migration APIs

Package controller has handlers and their request/response bodies for migration APIs

Package controller has handlers and their request/response bodies for migration APIs

Package common is to handle REST API for common funcitonalities

Package common is to handle REST API for common funcitonalities

Package common is to handle REST API for common funcitonalities

Package controller provides REST API controllers for migration reports

Package controller has handlers for infrastructure summary APIs

Package controller contains the handlers for REST API

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckHTTPVersion added in v0.4.6

func CheckHTTPVersion(c echo.Context) error

CheckHTTPVersion godoc @ID CheckHTTPVersion @Summary Check HTTP version of incoming request @Description Checks and returns the HTTP protocol version of the incoming request. @Description @Description [Note] @Description - The X-Request-Id header value (auto-generated if not provided) is propagated to Tumblebug when Beetle calls its APIs for distributed tracing. @Tags [Admin] API Request Management @Accept json @Produce json @Param X-Request-Id header string false "Unique request ID (auto-generated if not provided). Used for tracking request status and correlating logs." @Success 200 {object} common.SimpleMsg @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /httpVersion [get]

func CreateMigratedSSHKey added in v0.3.1

func CreateMigratedSSHKey(c echo.Context) error

CreateMigratedSSHKey godoc @ID CreateMigratedSSHKey @Summary Create a migrated SSH key @Description Create a new migrated SSH key in the namespace @Tags [Migration] Resources for VM infrastructure @Accept json @Produce json @Param nsId path string true "Namespace ID" default(mig01) @Param option query string false "Option: [required params for register] connectionName, name, cspKeyId" Enums(register) @Param sshKeyReq body tbmodel.SshKeyReq true "Details for an SSH key object" @Success 200 {object} tbmodel.SshKeyInfo @Failure 404 {object} tbmodel.SimpleMsg @Failure 500 {object} tbmodel.SimpleMsg @Router /migration/ns/{nsId}/resources/sshKey [post]

func CreateMigratedSecurityGroup added in v0.3.1

func CreateMigratedSecurityGroup(c echo.Context) error

CreateMigratedSecurityGroup godoc @ID CreateMigratedSecurityGroup @Summary Create a migrated security group @Description Create a new migrated security group in the namespace @Tags [Migration] Resources for VM infrastructure @Accept json @Produce json @Param nsId path string true "Namespace ID" default(mig01) @Param option query string false "Option: [required params for register] connectionName, name, vNetId, cspResourceId" Enums(register) @Param securityGroupReq body tbmodel.SecurityGroupReq true "Details for an securityGroup object" @Success 200 {object} tbmodel.SecurityGroupInfo @Failure 404 {object} tbmodel.SimpleMsg @Failure 500 {object} tbmodel.SimpleMsg @Router /migration/ns/{nsId}/resources/securityGroup [post]

func CreateVNet added in v0.3.1

func CreateVNet(c echo.Context) error

CreateVNet godoc @ID CreateVNet @Summary Create a migrated virtual network @Description Create a new migrated virtual network in the namespace @Tags [Migration] Resources for VM infrastructure @Accept json @Produce json @Param nsId path string true "Namespace ID" default(mig01) @Param vNetReq body tbmodel.VNetReq true "Virtual Network creation request" @Success 200 {object} tbmodel.VNetInfo @Failure 400 {object} tbmodel.SimpleMsg @Failure 500 {object} tbmodel.SimpleMsg @Router /migration/ns/{nsId}/resources/vNet [post]

func DeleteInfra added in v0.1.1

func DeleteInfra(c echo.Context) error

DeleteInfra godoc @ID DeleteInfra @Summary Delete the migrated mult-cloud infrastructure (MCI) @Description Delete the migrated mult-cloud infrastructure (MCI) @Tags [Migration] Infrastructure @Accept json @Produce json @Param nsId path string true "Namespace ID" default(mig01) @Param mciId path string true "Migrated Multi-Cloud Infrastructure (MCI) ID" default(mmci01) @Param option query string false "Option for deletion" Enums(terminate,force) default(terminate) @Param X-Request-Id header string false "Unique request ID (auto-generated if not provided). Used for tracking request status and correlating logs." @Success 200 {object} model.Response "The result of deleting the migrated multi-cloud infrastructure (MCI)" @Failure 404 {object} model.Response @Failure 500 {object} model.Response @Router /migration/ns/{nsId}/mci/{mciId} [delete]

func DeleteMigratedSSHKey added in v0.3.1

func DeleteMigratedSSHKey(c echo.Context) error

DeleteMigratedSSHKey godoc @ID DeleteMigratedSSHKey @Summary Delete a migrated SSH key @Description Delete a specific migrated SSH key in the namespace @Tags [Migration] Resources for VM infrastructure @Accept json @Produce json @Param nsId path string true "Namespace ID" default(mig01) @Param sshKeyId path string true "SSH Key ID" default(mig-sshkey-01) @Success 200 {object} tbmodel.SimpleMsg @Failure 404 {object} tbmodel.SimpleMsg @Failure 500 {object} tbmodel.SimpleMsg @Router /migration/ns/{nsId}/resources/sshKey/{sshKeyId} [delete]

func DeleteMigratedSecurityGroup added in v0.3.1

func DeleteMigratedSecurityGroup(c echo.Context) error

DeleteMigratedSecurityGroup godoc @ID DeleteMigratedSecurityGroup @Summary Delete a migrated security group @Description Delete a specific migrated security group in the namespace @Tags [Migration] Resources for VM infrastructure @Accept json @Produce json @Param nsId path string true "Namespace ID" default(mig01) @Param sgId path string true "Security Group ID" default(mig-sg-01) @Success 200 {object} tbmodel.SimpleMsg @Failure 404 {object} tbmodel.SimpleMsg @Failure 500 {object} tbmodel.SimpleMsg @Router /migration/ns/{nsId}/resources/securityGroup/{sgId} [delete]

func DeleteMigratedSecurityGroups added in v0.3.8

func DeleteMigratedSecurityGroups(c echo.Context) error

DeleteMigratedSecurityGroups godoc @ID DeleteMigratedSecurityGroups @Summary Delete multiple migrated security groups @Description Delete multiple migrated security groups in the namespace @Tags [Migration] Resources for VM infrastructure @Accept json @Produce json @Param nsId path string true "Namespace ID" default(mig01) @Param match query string false "Delete resources containing matched ID-substring only" default() @Success 200 {object} tbmodel.IdList @Failure 404 {object} tbmodel.SimpleMsg @Router /migration/ns/{nsId}/resources/securityGroup [delete]

func DeleteMigratedVNet added in v0.3.1

func DeleteMigratedVNet(c echo.Context) error

DeleteMigratedVNet godoc @ID DeleteMigratedVNet @Summary Delete a migrated virtual network @Description Delete a specific migrated virtual network in the namespace @Tags [Migration] Resources for VM infrastructure @Accept json @Produce json @Param nsId path string true "Namespace ID" default(mig01) @Param vNetId path string true "Virtual Network ID" default(mig-vnet-01) @Param action query string false "Action" Enums(withsubnets,refine,force) @Success 200 {object} tbmodel.SimpleMsg @Failure 404 {object} tbmodel.SimpleMsg @Router /migration/ns/{nsId}/resources/vNet/{vNetId} [delete]

func DeleteObjectStorage added in v0.4.2

func DeleteObjectStorage(c echo.Context) error

DeleteObjectStorage godoc @ID DeleteObjectStorage @Summary Delete object storage (bucket) @Description Delete a specific object storage (bucket) @Description @Description [Note] @Description - Connection name format: `{csp}-{region}` (e.g., aws-ap-northeast-2) @Description - The bucket must be empty before deletion @Tags [Migration] Managed middleware (preview) @Accept json @Produce json @Param objectStorageName path string true "Object Storage Name (bucket name)" @Param csp query string true "Cloud service provider" Enums(aws,alibaba) default(aws) @Param region query string true "Cloud region" default(ap-northeast-2) @Param X-Request-Id header string false "Unique request ID (auto-generated if not provided). Used for tracking request status and correlating logs." @Success 200 "OK - Object storage deleted successfully" @Failure 400 {object} common.SimpleMsg "Invalid request" @Failure 404 {object} common.SimpleMsg "Object storage not found" @Failure 500 {object} common.SimpleMsg "Internal server error" @Router /migration/middleware/objectStorage/{objectStorageName} [delete]

func ExistObjectStorage added in v0.4.2

func ExistObjectStorage(c echo.Context) error

ExistObjectStorage godoc @ID ExistObjectStorage @Summary Check object storage (bucket) existence @Description Check if a specific object storage (bucket) exists @Description @Description [Note] @Description - Connection name format: `{csp}-{region}` (e.g., aws-ap-northeast-2) @Description - Returns 200 OK if the bucket exists, 404 Not Found if it doesn't exist @Tags [Migration] Managed middleware (preview) @Accept json @Produce json @Param objectStorageName path string true "Object Storage Name (bucket name)" @Param csp query string true "Cloud service provider" Enums(aws,alibaba) default(aws) @Param region query string true "Cloud region" default(ap-northeast-2) @Param X-Request-Id header string false "Unique request ID (auto-generated if not provided). Used for tracking request status and correlating logs." @Success 200 "OK - Object storage exists" @Failure 400 {object} common.SimpleMsg "Invalid request" @Failure 404 {object} common.SimpleMsg "Object storage not found" @Failure 500 {object} common.SimpleMsg "Internal server error" @Router /migration/middleware/objectStorage/{objectStorageName} [head]

func GenerateConnectionName added in v0.4.2

func GenerateConnectionName(csp, region string) (string, error)

func GenerateMigrationReport added in v0.4.3

func GenerateMigrationReport(c echo.Context) error

GenerateMigrationReport godoc @ID GenerateMigrationReport @Summary Generate migration report (with source-target correlation analysis) @Description Generate a comprehensive migration report comparing source infrastructure with target cloud VMs, including resource mappings, network/security analysis, cost summary, and recommendations in Markdown or HTML format @Tags Summary/Report Infrastructure Analysis for Migration @Accept json @Produce text/markdown @Produce text/html @Param nsId path string true "Namespace ID" example("mig01") default(mig01) @Param mciId path string true "MCI ID" example("mmci01") default(mmci01) @Param format query string false "Report format: md or html" Enums(md,html) default(md) @Param download query string false "Download as file: true for file download, false for inline display (only affects browsers/Swagger UI, not curl)" Enums(true,false) default(false) @Param onpremiseInfraModel body controller.GenerateMigrationReportRequest true "Source infrastructure data from on-premise" @Success 200 {string} string "Migration report in markdown or HTML format" @Header 200 {string} Content-Disposition "inline; filename=\"migration-report.md\" or \"migration-report.html\" (or attachment when download=true)" @Header 200 {string} Content-Type "text/markdown; charset=utf-8 or text/html; charset=utf-8" @Failure 400 {object} model.Response "Invalid request" @Failure 500 {object} model.Response "Internal server error" @Router /report/migration/ns/{nsId}/mci/{mciId} [post]

func GenerateSourceInfraSummary added in v0.4.3

func GenerateSourceInfraSummary(c echo.Context) error

GenerateSourceInfraSummary godoc @ID GenerateSourceInfraSummary @Summary Generate source infrastructure summary @Description Generate a comprehensive source infrastructure summary from on-premise data in JSON, Markdown, or HTML format @Tags Summary/Report Infrastructure Analysis for Migration @Accept json @Produce json @Produce text/markdown @Produce text/html @Param format query string false "Summary format: json, md, or html" Enums(json,md,html) default(md) @Param download query string false "Download as file: true for file download, false for inline display (only affects browsers/Swagger UI, not curl)" Enums(true,false) default(false) @Param X-Request-Id header string false "Unique request ID (auto-generated if not provided). Used for tracking request status and correlating logs." @Param Request body controller.GenerateSourceInfraSummaryRequest true "Source infrastructure data" @Success 200 {object} JSONResult{[MARKDOWN]=string,[HTML]=string,[JSON]=summary.SourceInfraSummary} "Different return types: json format returns SourceInfraSummary object, md format returns markdown string, html format returns HTML string" @Header 200 {string} Content-Disposition "inline; filename=\"source-summary.md\" or \"source-summary.html\" (or attachment when download=true)" @Header 200 {string} Content-Type "text/markdown; charset=utf-8 or text/html; charset=utf-8" @Failure 400 {object} model.Response @Failure 500 {object} model.Response @Router /summary/source [post]

func GenerateTargetInfraSummary added in v0.4.3

func GenerateTargetInfraSummary(c echo.Context) error

GenerateTargetInfraSummary godoc @ID GenerateTargetInfraSummary @Summary Generate target infrastructure summary @Description Generate a comprehensive target infrastructure summary in JSON, Markdown, or HTML format @Tags Summary/Report Infrastructure Analysis for Migration @Accept json @Produce json @Produce text/markdown @Produce text/html @Param nsId path string true "Namespace ID" default(mig01) @Param mciId path string true "Multi-Cloud Infrastructure (MCI) ID" default(mmci01) @Param format query string false "Summary format: json, md, or html" Enums(json,md,html) default(md) @Param download query string false "Download as file: true for file download, false for inline display (only affects browsers/Swagger UI, not curl)" Enums(true,false) default(false) @Param X-Request-Id header string false "Unique request ID (auto-generated if not provided). Used for tracking request status and correlating logs." @Success 200 {object} JSONResult{[MARKDOWN]=string,[HTML]=string,[JSON]=summary.TargetInfraSummary} "Different return types: json format returns TargetInfraSummary object, md format returns markdown string, html format returns HTML string" @Header 200 {string} Content-Disposition "inline; filename=\"target-summary.md\" or \"target-summary.html\" (or attachment when download=true)" @Header 200 {string} Content-Type "text/markdown; charset=utf-8 or text/html; charset=utf-8" @Failure 400 {object} model.Response @Failure 404 {object} model.Response @Failure 500 {object} model.Response @Router /summary/target/ns/{nsId}/mci/{mciId} [get]

func GetInfra added in v0.1.1

func GetInfra(c echo.Context) error

GetInfra godoc @ID GetInfra @Summary Get the migrated multi-cloud infrastructure (MCI) @Description Get the migrated multi-cloud infrastructure (MCI) @Tags [Migration] Infrastructure @Accept json @Produce json @Param nsId path string true "Namespace ID" default(mig01) @Param mciId path string true "Migrated Multi-Cloud Infrastructure (MCI) ID" default(mmci01) @Param X-Request-Id header string false "Unique request ID (auto-generated if not provided). Used for tracking request status and correlating logs." @Success 200 {object} MigrateInfraResponse "The migrated multi-cloud infrastructure (MCI) information" @Failure 404 {object} model.Response @Failure 500 {object} model.Response @Router /migration/ns/{nsId}/mci/{mciId} [get]

func GetMigratedSSHKey added in v0.3.1

func GetMigratedSSHKey(c echo.Context) error

GetMigratedSSHKey godoc @ID GetMigratedSSHKey @Summary Get a specific migrated SSH key @Description Get details of a specific migrated SSH key in the namespace @Tags [Migration] Resources for VM infrastructure @Accept json @Produce json @Param nsId path string true "Namespace ID" default(mig01) @Param sshKeyId path string true "SSH Key ID" default(mig-sshkey-01) @Success 200 {object} tbmodel.SshKeyInfo @Failure 404 {object} tbmodel.SimpleMsg @Failure 500 {object} tbmodel.SimpleMsg @Router /migration/ns/{nsId}/resources/sshKey/{sshKeyId} [get]

func GetMigratedSecurityGroup added in v0.3.1

func GetMigratedSecurityGroup(c echo.Context) error

GetMigratedSecurityGroup godoc @ID GetMigratedSecurityGroup @Summary Get a specific migrated security group @Description Get details of a specific migrated security group in the namespace @Tags [Migration] Resources for VM infrastructure @Accept json @Produce json @Param nsId path string true "Namespace ID" default(mig01) @Param sgId path string true "Security Group ID" default(mig-sg-01) @Success 200 {object} tbmodel.SecurityGroupInfo @Failure 404 {object} tbmodel.SimpleMsg @Failure 500 {object} tbmodel.SimpleMsg @Router /migration/ns/{nsId}/resources/securityGroup/{sgId} [get]

func GetMigratedVNet added in v0.3.1

func GetMigratedVNet(c echo.Context) error

GetMigratedVNet godoc @ID GetMigratedVNet @Summary Get a specific migrated virtual network @Description Get details of a specific virtual network in the namespace @Tags [Migration] Resources for VM infrastructure @Accept json @Produce json @Param nsId path string true "Namespace ID" default(mig01) @Param vNetId path string true "Virtual Network ID" default(mig-vnet-01) @Success 200 {object} tbmodel.VNetInfo @Failure 404 {object} tbmodel.SimpleMsg @Failure 500 {object} tbmodel.SimpleMsg @Router /migration/ns/{nsId}/resources/vNet/{vNetId} [get]

func GetObjectStorage added in v0.4.2

func GetObjectStorage(c echo.Context) error

GetObjectStorage godoc @ID GetObjectStorage @Summary Get object storage (bucket) details @Description Get details of a specific object storage (bucket) @Description @Description [Note] Connection name format: `{csp}-{region}` (e.g., aws-ap-northeast-2) @Tags [Migration] Managed middleware (preview) @Accept json @Produce json @Param objectStorageName path string true "Object Storage Name (bucket name)" @Param csp query string true "Cloud service provider" Enums(aws,alibaba) default(aws) @Param region query string true "Cloud region" default(ap-northeast-2) @Param X-Request-Id header string false "Unique request ID (auto-generated if not provided). Used for tracking request status and correlating logs." @Success 200 {object} tbclient.ListBucketResult "Object storage details" @Failure 400 {object} common.SimpleMsg "Invalid request" @Failure 404 {object} common.SimpleMsg "Object storage not found" @Failure 500 {object} common.SimpleMsg "Internal server error" @Router /migration/middleware/objectStorage/{objectStorageName} [get]

func ListInfra added in v0.2.4

func ListInfra(c echo.Context) error

ListInfra godoc @ID ListInfra @Summary Get the migrated multi-cloud infrastructure (MCI) @Description Get the migrated multi-cloud infrastructure (MCI) @Tags [Migration] Infrastructure @Accept json @Produce json @Param nsId path string true "Namespace ID" default(mig01) @Param option query string false "Option for getting the migrated multi-cloud infrastructure" Enums(id) @Param X-Request-Id header string false "Unique request ID (auto-generated if not provided). Used for tracking request status and correlating logs." @Success 200 {object} cloudmodel.MciInfoList "The info list of the migrated multi-cloud infrastructure (MCI)" @Success 200 {object} cloudmodel.IdList "The ID list of The migrated multi-cloud infrastructure (MCI)" @Failure 404 {object} model.Response @Failure 500 {object} model.Response @Router /migration/ns/{nsId}/mci [get]

func ListMigratedSSHKeys added in v0.3.1

func ListMigratedSSHKeys(c echo.Context) error

========== SSH Key Resource APIs ========== ListMigratedSSHKeys godoc @ID ListMigratedSSHKeys @Summary List all migrated SSH keys @Description Get the list of all migrated SSH keys in the namespace @Tags [Migration] Resources for VM infrastructure @Accept json @Produce json @Param nsId path string true "Namespace ID" default(mig01) @Param option query string false "Option" Enums(id) @Param filterKey query string false "Field key for filtering (ex: systemLabel)" @Param filterVal query string false "Field value for filtering (ex: Registered from CSP resource)" @Success 200 {object} JSONResult{[DEFAULT]=tbresource.RestGetAllSshKeyResponse,[ID]=tbmodel.IdList} "Different return structures by the given option param" @Failure 404 {object} tbmodel.SimpleMsg @Failure 500 {object} tbmodel.SimpleMsg @Router /migration/ns/{nsId}/resources/sshKey [get]

func ListMigratedSecurityGroups added in v0.3.1

func ListMigratedSecurityGroups(c echo.Context) error

========== Security Group Resource APIs ========== ListMigratedSecurityGroups godoc @ID ListMigratedSecurityGroups @Summary List all migrated security groups @Description Get the list of all migrated security groups in the namespace @Tags [Migration] Resources for VM infrastructure @Accept json @Produce json @Param nsId path string true "Namespace ID" default(mig01) @Param option query string false "Option" Enums(id) @Param filterKey query string false "Field key for filtering (ex: systemLabel)" @Param filterVal query string false "Field value for filtering (ex: Registered from CSP resource)" @Success 200 {object} JSONResult{[DEFAULT]=tbresource.RestGetAllSecurityGroupResponse,[ID]=tbmodel.IdList} "Different return structures by the given option param" @Failure 404 {object} tbmodel.SimpleMsg @Failure 500 {object} tbmodel.SimpleMsg @Router /migration/ns/{nsId}/resources/securityGroup [get]

func ListMigratedVNets added in v0.3.1

func ListMigratedVNets(c echo.Context) error

ListMigratedVNets godoc @ID ListMigratedVNets @Summary List all migrated virtual networks @Description Get the list of all migrated virtual networks in the namespace @Tags [Migration] Resources for VM infrastructure @Accept json @Produce json @Param nsId path string true "Namespace ID" default(mig01) @Success 200 {object} JSONResult{[DEFAULT]=tbresource.RestGetAllVNetResponse,[ID]=tbmodel.IdList} "Different return structures by the given option param" @Failure 404 {object} tbmodel.SimpleMsg @Failure 500 {object} tbmodel.SimpleMsg @Router /migration/ns/{nsId}/resources/vNet [get]

func ListObjectStorages added in v0.4.2

func ListObjectStorages(c echo.Context) error

ListObjectStorages godoc @ID ListObjectStorages @Summary List object storages (buckets) @Description Get the list of all object storages (buckets) in the specified cloud service provider and region @Description @Description [Note] Connection name format: `{csp}-{region}` (e.g., aws-ap-northeast-2) @Tags [Migration] Managed middleware (preview) @Accept json @Produce json @Param csp query string true "Cloud service provider" Enums(aws,alibaba) default(aws) @Param region query string true "Cloud region" default(ap-northeast-2) @Param X-Request-Id header string false "Unique request ID (auto-generated if not provided). Used for tracking request status and correlating logs." @Success 200 {object} tbclient.ListAllMyBucketsResult "List of object storages" @Failure 400 {object} common.SimpleMsg "Invalid request" @Failure 500 {object} common.SimpleMsg "Internal server error" @Router /migration/middleware/objectStorage [get]

func MigrateData added in v0.3.9

func MigrateData(c echo.Context) error

MigrateData godoc @ID MigrateData @Summary Migrate data from source to target @Description Migrate data from source to target @Description @Description [Note] @Description * Only relay mode is supported for now (both source and destination should be remote endpoints). @Description * Supported methods: rsync, object storage @Description @Description [Note] @Description * Examples(test result): https://github.com/cloud-barista/cm-beetle/blob/main/docs/test-results-data-migration.md @Description @Tags [Migration] Data (incubating) @Accept json @Produce json @Param reqBody body transx.DataMigrationModel true "Request Body" @Success 200 {object} common.SimpleMsg "OK" @Failure 400 {object} common.SimpleMsg "Bad Request" @Failure 404 {object} common.SimpleMsg "Not Found" @Failure 500 {object} common.SimpleMsg "Internal Server Error" @Router /migration/data [post]

func MigrateInfra

func MigrateInfra(c echo.Context) error

MigrateInfra godoc @ID MigrateInfra @Summary Migrate an infrastructure to the multi-cloud infrastructure (MCI) with defaults @Description Migrate an infrastructure to the multi-cloud infrastructure (MCI) with defaults. @Tags [Migration] Infrastructure @Accept json @Produce json @Param nsId path string true "Namespace ID" default(mig01) @Param mciInfo body MigrateInfraRequest true "Specify the information for the targeted mulci-cloud infrastructure (MCI)" @Param X-Request-Id header string false "Unique request ID (auto-generated if not provided). Used for tracking request status and correlating logs." @Success 200 {object} MigrateInfraResponse "Successfully migrated to the multi-cloud infrastructure" @Failure 404 {object} model.Response @Failure 500 {object} model.Response @Router /migration/ns/{nsId}/mci [post]

func MigrateInfraWithDefaults added in v0.3.1

func MigrateInfraWithDefaults(c echo.Context) error

MigrateInfraWithDefaults godoc @ID MigrateInfraWithDefaults @Summary Migrate an infrastructure to the multi-cloud infrastructure (MCI) with defaults @Description Migrate an infrastructure to the multi-cloud infrastructure (MCI) with defaults. @Tags [Migration] Infrastructure @Accept json @Produce json @Param nsId path string true "Namespace ID" default(mig01) @Param mciInfo body MigrateInfraWithDefaultsRequest true "Specify the information for the targeted mulci-cloud infrastructure (MCI)" @Param X-Request-Id header string false "Unique request ID (auto-generated if not provided). Used for tracking request status and correlating logs." @Success 200 {object} MigrateInfraWithDefaultsResponse "Successfully migrated to the multi-cloud infrastructure" @Failure 404 {object} model.Response @Failure 500 {object} model.Response @Router /migration/ns/{nsId}/mciWithDefaults [post]

func MigrateObjectStorage added in v0.4.2

func MigrateObjectStorage(c echo.Context) error

MigrateObjectStorage godoc @ID MigrateObjectStorage @Summary Migrate object storages to cloud @Description Migrate object storages to cloud based on recommendation results @Description @Description [Note] This API creates object storages (buckets) in the target cloud. @Description - Input should be the output from RecommendObjectStorage API @Description - Connection name format: `{csp}-{region}` (e.g., aws-ap-northeast-2) @Description @Description [Note] @Description * Examples(test result): https://github.com/cloud-barista/cm-beetle/blob/main/docs/test-results-data-migration.md @Description @Tags [Migration] Managed middleware (preview) @Accept json @Produce json @Param request body MigrateObjectStorageRequest true "Object storage migration request (use RecommendObjectStorage response)" @Param X-Request-Id header string false "Unique request ID (auto-generated if not provided). Used for tracking request status and correlating logs." @Success 200 "OK - Object storages created successfully" @Failure 400 {object} common.SimpleMsg "Invalid request" @Failure 500 {object} common.SimpleMsg "Internal server error" @Router /migration/middleware/objectStorage [post]

func RecommendContainerInfra added in v0.3.1

func RecommendContainerInfra(c echo.Context) error

RecommendContainerInfra godoc @ID RecommendContainerInfra @Summary (Deprecated) Recommend an appropriate container infrastructure for cloud migration @Description [DEPRECATED] This endpoint is deprecated. Use /recommendation/k8sCluster and /recommendation/k8sNodeGroup instead. @Description @Description [Note] `desiredProvider` and `desiredRegion` are required. @Tags [Recommendation] Infrastructure @Accept json @Produce json @Param UserInfra body RecommendInfraRequest true "Specify the source container infrastructure" @Param desiredProvider query string false "Provider (e.g., aws, azure, gcp)" Enums(aws,azure,gcp,alibaba,ncp) default(aws) @Param desiredRegion query string false "Region (e.g., ap-northeast-2)" default(ap-northeast-2) @Param X-Request-Id header string false "Unique request ID (auto-generated if not provided). Used for tracking request status and correlating logs." @Success 200 {object} common.SimpleMsg "Deprecated endpoint notice" @Failure 400 {object} common.SimpleMsg @Router /recommendation/containerInfra [post] @Deprecated

func RecommendK8sControlPlane added in v0.4.2

func RecommendK8sControlPlane(c echo.Context) error

RecommendK8sControlPlane godoc @ID RecommendK8sControlPlane @Summary Recommend K8s control plane configuration @Description Get recommendation for K8s control plane based on honeybee source cluster data @Description Returns configuration that can be directly used with cb-tumblebug k8sClusterDynamic API @Tags [Recommendation] K8s Cluster (prototype) @Accept json @Produce json @Param UserK8sInfra body recommendation.KubernetesInfoList true "Source cluster information from honeybee" @Param desiredProvider query string true "Provider (e.g., aws)" Enums(aws) @Param desiredRegion query string true "Region (e.g., ap-northeast-2)" default(ap-northeast-2) @Param X-Request-Id header string false "Unique request ID (auto-generated if not provided). Used for tracking request status and correlating logs." @Success 200 {object} tbmodel.K8sClusterDynamicReq "K8s control plane recommendation (ready for cb-tumblebug API)" @Failure 400 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /recommendation/k8sControlPlane [post]

func RecommendK8sNodeGroup added in v0.4.2

func RecommendK8sNodeGroup(c echo.Context) error

RecommendK8sNodeGroup godoc @ID RecommendK8sNodeGroup @Summary Recommend K8s worker node group configuration @Description Get recommendation for K8s worker node group based on honeybee source cluster data @Description Returns configuration that can be directly used with cb-tumblebug k8sNodeGroupDynamic API @Tags [Recommendation] K8s Cluster (prototype) @Accept json @Produce json @Param UserK8sInfra body recommendation.KubernetesInfoList true "Source cluster information from honeybee" @Param desiredProvider query string true "Provider (e.g., aws)" Enums(aws) @Param desiredRegion query string true "Region (e.g., ap-northeast-2)" default(ap-northeast-2) @Param X-Request-Id header string false "Unique request ID (auto-generated if not provided). Used for tracking request status and correlating logs." @Success 200 {object} tbmodel.K8sNodeGroupReq "K8s worker node group recommendation (ready for cb-tumblebug API)" @Failure 400 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /recommendation/k8sNodeGroup [post]

func RecommendObjectStorage added in v0.4.1

func RecommendObjectStorage(c echo.Context) error

RecommendObjectStorage godoc @ID RecommendObjectStorage @Summary Recommend an object storage for cloud migration @Description Recommend an appropriate object storage for cloud migration @Description @Description [Note] `desiredCsp` and `desiredRegion` are required. @Description - `desiredCsp` and `desiredRegion` can set on the query parameter or the request body. @Description @Description - If desiredCsp and desiredRegion are set on request body, the values in the query parameter will be ignored. @Description @Description [Warning] the recommended bucket name may be globally unique. @Description - Beetle supports adding a suffix based on the existing bucket name to ensure uniqueness. @Description - Suppose that the existing bucket name is unique enough. @Description - Generate a suffix based on the existing bucket name. @Description - e.g., "my-bucket" -> SHA256 hash -> base64 URL-safe encoding (6 bytes) -> lowercase -> "my-bucket-{suffix}" @Tags [Recommendation] Managed middleware (preview) @Accept json @Produce json @Param request body RecommendObjectStorageRequest true "Specify the your object storage to be migrated" @Param desiredCsp query string false "CSP (e.g., aws, azure, gcp)" Enums(aws,azure,gcp,alibaba,ncp) default(aws) @Param desiredRegion query string false "Region (e.g., ap-northeast-2)" default(ap-northeast-2) @Param X-Request-Id header string false "Unique request ID (auto-generated if not provided). Used for tracking request status and correlating logs." @Success 200 {object} RecommendObjectStorageResponse "The result of recommended object storage" @Failure 400 {object} common.SimpleMsg "Invalid request" @Failure 500 {object} common.SimpleMsg "Internal server error" @Router /recommendation/middleware/objectStorage [post]

func RecommendSecurityGroups added in v0.3.1

func RecommendSecurityGroups(c echo.Context) error

RecommendSecurityGroups godoc @ID RecommendSecurityGroups @Summary Recommend an appropriate security group for cloud migration @Description Recommend an appropriate security group for cloud migration @Description @Description [Note] `desiredProvider` and `desiredRegion` are required. @Description - `desiredProvider` and `desiredRegion` can set on the query parameter or the request body. @Description @Description - If desiredProvider and desiredRegion are set on request body, the values in the query parameter will be ignored. @Tags [Recommendation] Resources for VM infrastructure @Accept json @Produce json @Param UserInfra body RecommendVmInfraRequest true "Specify the your infrastructure to be migrated" @Param desiredProvider query string false "Provider (e.g., aws, azure, gcp)" Enums(aws,azure,gcp,alibaba,ncp) default(aws) @Param desiredRegion query string false "Region (e.g., ap-northeast-2)" default(ap-northeast-2) @Param X-Request-Id header string false "Unique request ID (auto-generated if not provided). Used for tracking request status and correlating logs." @Success 200 {object} RecommendSecurityGroupResponse "The result of recommended security groups" @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /recommendation/resources/securityGroups [post]

func RecommendVMInfra added in v0.3.1

func RecommendVMInfra(c echo.Context) error

RecommendVMInfra godoc @ID RecommendVMInfra @Summary **(To be deprecated)** Recommend an appropriate VM infrastructure (i.e., MCI, multi-cloud infrastructure) for cloud migration @Description **(To be deprecated)** Recommend an appropriate VM infrastructure (i.e., MCI, multi-cloud infrastructure) for cloud migration @Description @Description [Note] `desiredCsp` and `desiredRegion` are required. @Description - `desiredCsp` and `desiredRegion` can set on the query parameter or the request body. @Description @Description - If desiredCsp and desiredRegion are set on request body, the values in the query parameter will be ignored. @Tags [Recommendation] Infrastructure @Accept json @Produce json @Param UserInfra body RecommendVmInfraRequest true "Specify the your infrastructure to be migrated" @Param desiredCsp query string false "Provider (e.g., aws, azure, gcp)" Enums(aws,azure,gcp,alibaba,ncp) default(aws) @Param desiredRegion query string false "Region (e.g., ap-northeast-2)" default(ap-northeast-2) @Param X-Request-Id header string false "Unique request ID (auto-generated if not provided). Used for tracking request status and correlating logs." @Success 200 {object} RecommendVmInfraResponse "The result of recommended infrastructure" @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /recommendation/mci [post]

func RecommendVMInfraWithDefaults added in v0.3.1

func RecommendVMInfraWithDefaults(c echo.Context) error

RecommendVMInfraWithDefaults godoc @ID RecommendVMInfraWithDefaults @Summary (To be updated) Recommend an appropriate VM infrastructure (i.e., MCI, multi-cloud infrastructure) with defaults for cloud migration @Description Recommend an appropriate VM infrastructure (i.e., MCI, multi-cloud infrastructure) with defaults for cloud migration @Description @Description [Note] `desiredCsp` and `desiredRegion` are required. @Description - `desiredCsp` and `desiredRegion` can set on the query parameter or the request body. @Description @Description - If desiredCsp and desiredRegion are set on request body, the values in the query parameter will be ignored. @Tags [Recommendation] Infrastructure @Accept json @Produce json @Param UserInfra body RecommendVmInfraWithDefaultsRequest true "Specify the your infrastructure to be migrated" @Param desiredCsp query string false "Provider (e.g., aws, azure, gcp)" Enums(aws,azure,gcp,alibaba,ncp) default(aws) @Param desiredRegion query string false "Region (e.g., ap-northeast-2)" default(ap-northeast-2) @Param X-Request-Id header string false "Unique request ID (auto-generated if not provided). Used for tracking request status and correlating logs." @Success 200 {object} RecommendVmInfraWithDefaultsResponse "The result of recommended infrastructure" @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /recommendation/mciWithDefaults [post]

func RecommendVNet added in v0.3.1

func RecommendVNet(c echo.Context) error

RecommendVNet godoc @ID RecommendVNet @Summary Recommend an appropriate virtual network for cloud migration @Description Recommend an appropriate virtual network for cloud migration @Description @Description [Note] `desiredProvider` and `desiredRegion` are required. @Description - `desiredProvider` and `desiredRegion` can set on the query parameter or the request body. @Description @Description - If desiredProvider and desiredRegion are set on request body, the values in the query parameter will be ignored. @Tags [Recommendation] Resources for VM infrastructure @Accept json @Produce json @Param UserInfra body RecommendVmInfraRequest true "Specify the your infrastructure to be migrated" @Param desiredProvider query string false "Provider (e.g., aws, azure, gcp)" Enums(aws,azure,gcp,alibaba,ncp) default(aws) @Param desiredRegion query string false "Region (e.g., ap-northeast-2)" default(ap-northeast-2) @Param X-Request-Id header string false "Unique request ID (auto-generated if not provided). Used for tracking request status and correlating logs." @Success 200 {object} RecommendVNetResponse "The result of recommended vNet" @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /recommendation/resources/vNet [post]

func RecommendVmInfraCandidates added in v0.4.7

func RecommendVmInfraCandidates(c echo.Context) error

RecommendVmInfraCandidates godoc @ID RecommendVmInfraCandidates @Summary Recommend multiple VM infrastructure candidates for cloud migration @Description Recommend best-effort VM infrastructure (MCI) candidates for migrating on-premise workloads to cloud environments. @Description @Description - See overview and examples on https://github.com/cloud-barista/cm-beetle/discussions/256 @Description @Description **[Required Parameters: `desiredCsp`, `desiredRegion`]** The desired cloud service provider and region for the recommended infrastructure. @Description - if **desiredCsp** and **desiredRegion** are set on request body, the values in the query parameter will be ignored. @Description @Description **[Optional Parameters: `limit`]** Maximum number of recommended infrastructures to return (default: 3) @Description @Description **[Optional Parameters: `minMatchRate`]** Minimum match rate threshold for highly-matched classification (default: 90.0, range: 0-100) @Description @Description **[Response Field: `status`]** Candidate status based on the match rate threshold @Description - **highly-matched**: Candidates meet or exceed the match rate threshold @Description - **partially-matched**: Valid candidates below the match rate threshold @Description @Description **[Response Field: `description`]** Summary containing Candidate ID, status, match rate statistics (Min/Max/Avg), and VM counts @Description - Example: "Candidate #1 | partially-matched | Overall Match Rate: Min=88.9% Max=100.0% Avg=98.7% | VMs: 3 total, 2 matched, 1 acceptable" @Description @Tags [Recommendation] Infrastructure @Accept json @Produce json @Param UserInfra body RecommendVmInfraRequest true "Specify the your infrastructure to be migrated" @Param desiredCsp query string false "Provider (e.g., aws, azure, gcp)" Enums(aws,azure,gcp,alibaba,ncp) default(aws) @Param desiredRegion query string false "Region (e.g., ap-northeast-2)" default(ap-northeast-2) @Param limit query int false "Limit (default: 3) the number of recommended infrastructures" @Param minMatchRate query number false "Minimum match rate for highly-matched classification (default: 90.0, range: 0-100)" @Param X-Request-Id header string false "Unique request ID (auto-generated if not provided). Used for tracking request status and correlating logs." @Success 200 {object} model.ApiResponse[[]cloudmodel.RecommendedVmInfra] "List of recommended infrastructure candidates" @Failure 400 {object} model.ApiResponse[any] "Bad Request" @Failure 500 {object} model.ApiResponse[any] "Internal Server Error" @Router /recommendation/vmInfra [post]

func RecommendVmOsImages added in v0.3.1

func RecommendVmOsImages(c echo.Context) error

RecommendVmOsImages godoc @ID RecommendVmOsImages @Summary Recommend an appropriate OS image for cloud migration @Description Recommend an appropriate OS image for cloud migration @Description @Description [Note] `desiredProvider` and `desiredRegion` are required. @Description - `desiredProvider` and `desiredRegion` can set on the query parameter or the request body. @Description @Description - If desiredProvider and desiredRegion are set on request body, the values in the query parameter will be ignored. @Tags [Recommendation] Resources for VM infrastructure @Accept json @Produce json @Param UserInfra body RecommendVmInfraRequest true "Specify the your infrastructure to be migrated" @Param desiredProvider query string false "Provider (e.g., aws, azure, gcp)" Enums(aws,azure,gcp,alibaba,ncp) default(aws) @Param desiredRegion query string false "Region (e.g., ap-northeast-2)" default(ap-northeast-2) @Param X-Request-Id header string false "Unique request ID (auto-generated if not provided). Used for tracking request status and correlating logs." @Success 200 {object} RecommendVmOsImageResponse "The result of recommended VM OS images" @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /recommendation/resources/vmOsImages [post]

func RecommendVmSpecs added in v0.3.1

func RecommendVmSpecs(c echo.Context) error

RecommendVmSpecs godoc @ID RecommendVmSpecs @Summary Recommend an appropriate VM specification for cloud migration @Description Recommend an appropriate VM specification for cloud migration @Description @Description [Note] `desiredProvider` and `desiredRegion` are required. @Description - `desiredProvider` and `desiredRegion` can set on the query parameter or the request body. @Description @Description - If desiredProvider and desiredRegion are set on request body, the values in the query parameter will be ignored. @Description - If `targetMachineId` is provided, only that specific machine will be processed. @Tags [Recommendation] Resources for VM infrastructure @Accept json @Produce json @Param UserInfra body RecommendVmInfraRequest true "Specify the your infrastructure to be migrated" @Param desiredProvider query string false "Provider (e.g., aws, azure, gcp)" Enums(aws,azure,gcp,alibaba,ncp) default(aws) @Param desiredRegion query string false "Region (e.g., ap-northeast-2)" default(ap-northeast-2) @Param targetMachineId query string false "Target Machine ID to focus recommendation on (optional)" @Param X-Request-Id header string false "Unique request ID (auto-generated if not provided). Used for tracking request status and correlating logs." @Success 200 {object} RecommendVmSpecResponse "The result of recommended VM specifications" @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /recommendation/resources/vmSpecs [post]

func RestDeleteAllRequests added in v0.4.6

func RestDeleteAllRequests(c echo.Context) error

RestDeleteAllRequests godoc @ID DeleteAllRequests @Summary Delete all requests' details @Description Deletes all API request tracking records from Beetle. @Description @Description [Note] @Description - This only clears Beetle's request tracking memory. @Description - It does NOT affect any data in Tumblebug or cancel any ongoing operations. @Tags [Admin] API Request Management @Accept json @Produce json @Success 200 {object} common.SimpleMsg @Router /requests [delete]

func RestDeleteRequest added in v0.4.6

func RestDeleteRequest(c echo.Context) error

RestDeleteRequest godoc @ID DeleteRequest @Summary Delete a specific request's details @Description Deletes the tracking details of a specific API request from Beetle. @Description @Description [Note] @Description - This only removes the request tracking record from Beetle's memory. @Description - It does NOT affect any data in Tumblebug or cancel any ongoing operations. @Tags [Admin] API Request Management @Accept json @Produce json @Param reqId path string true "Request ID to delete (from X-Request-Id header of a previous Beetle API call)" @Success 200 {object} common.SimpleMsg @Failure 404 {object} common.SimpleMsg @Router /request/{reqId} [delete]

func RestGetAllRequests added in v0.4.6

func RestGetAllRequests(c echo.Context) error

RestGetAllRequests godoc @ID GetAllRequests @Summary Get all requests @Description Retrieves all API requests tracked by Beetle with optional filters. @Description @Description [Note] @Description - Request tracking is managed independently by Beetle (not shared with Tumblebug). @Description - This API only returns requests made to Beetle, not to Tumblebug. @Description @Description [Status Values] @Description - Handling: Request is currently being processed @Description - Success: Request completed successfully @Description - Error: Request failed with an error @Tags [Admin] API Request Management @Accept json @Produce json @Param status query string false "Filter by request status" Enums(Handling, Success, Error) default() @Param method query string false "Filter by HTTP method (GET, POST, PUT, DELETE, etc.)" Enums(GET, POST, PUT, DELETE) default() @Param url query string false "Filter by request URL" @Param time query string false "Filter by time in minutes from now (to get recent requests)" @Param savefile query string false "Option to save the results to a file (set 'true' to activate)" Enums(true,false) default(false) @Success 200 {object} map[string][]common.RequestDetails @Router /requests [get]

func RestGetRequest added in v0.4.6

func RestGetRequest(c echo.Context) error

RestGetRequest godoc @ID GetRequest @Summary Get request details @Description Retrieves the details of a specific API request tracked by Beetle. @Description @Description [Note] @Description - Request tracking is managed independently by Beetle (not shared with Tumblebug). @Description - The reqId corresponds to the X-Request-Id header value from a previous API call. @Description - Do NOT call Tumblebug's /request/{reqId} API with this reqId; each system manages its own request tracking. @Description @Description [Status Values] @Description - Handling: Request is currently being processed @Description - Success: Request completed successfully @Description - Error: Request failed with an error @Tags [Admin] API Request Management @Accept json @Produce json @Param reqId path string true "Request ID (from X-Request-Id header of a previous Beetle API call)" @Success 200 {object} common.RequestDetails @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /request/{reqId} [get]

func TestStreamingResponse added in v0.4.6

func TestStreamingResponse(c echo.Context) error

TestStreamingResponse godoc @ID TestStreamingResponse @Summary Test streaming response (JSON Lines) @Description Returns multiple JSON objects as newline-delimited JSON (JSON Lines format) @Tags [Test] Utilities @Accept json @Produce json @Success 200 {object} map[string]any "Multiple JSON objects" @Router /test/streaming [get]

func TestTracing added in v0.4.6

func TestTracing(c echo.Context) error

TestTracing godoc @ID TestTracing @Summary Test tracing to Tumblebug @Description Tests distributed tracing by calling Tumblebug's readyz endpoint with the X-Request-Id header. @Description @Description [Note] @Description - The X-Request-Id header value (auto-generated if not provided) is propagated to Tumblebug for distributed tracing. @Description - Use this API to verify that tracing works correctly between Beetle and Tumblebug. @Tags [Admin] API Request Management @Accept json @Produce json @Param X-Request-Id header string false "Unique request ID (auto-generated if not provided). Used for tracking request status and correlating logs." @Success 200 {object} common.SimpleMsg @Failure 503 {object} common.SimpleMsg @Router /test/tracing [get]

Types

type CORSRule added in v0.4.1

type CORSRule struct {
	AllowedOrigins []string `json:"allowedOrigins" validate:"required"` // Allowed origins (e.g., ["*"], ["https://example.com"])
	AllowedMethods []string `json:"allowedMethods" validate:"required"` // Allowed HTTP methods (e.g., ["GET", "PUT", "POST"])
	AllowedHeaders []string `json:"allowedHeaders,omitempty"`           // Allowed headers (e.g., ["*"])
	ExposeHeaders  []string `json:"exposeHeaders,omitempty"`            // Headers to expose (e.g., ["ETag"])
	MaxAgeSeconds  int      `json:"maxAgeSeconds,omitempty"`            // Preflight request cache time in seconds
}

CORSRule represents CORS rule configuration

type FirewallRuleProperty added in v0.3.1

type FirewallRuleProperty struct {
	SrcCIDR   string `json:"srcCIDR,omitempty"`
	DstCIDR   string `json:"dstCIDR,omitempty"`
	SrcPorts  string `json:"srcPorts,omitempty"`
	DstPorts  string `json:"dstPorts,omitempty"`
	Protocol  string `json:"protocol,omitempty"`  // TCP, UDP, ICMP
	Direction string `json:"direction,omitempty"` // inbound, outbound
	Action    string `json:"action,omitempty"`    // allow, deny
}

To be replaced with the actual model

type GenerateMigrationReportRequest added in v0.4.3

type GenerateMigrationReportRequest struct {
	OnpremiseInfraModel onpremmodel.OnpremInfra `json:"onpremiseInfraModel" validate:"required"`
}

GenerateMigrationReportRequest represents the request body for generating a migration report

type GenerateSourceInfraSummaryRequest added in v0.4.3

type GenerateSourceInfraSummaryRequest struct {
	OnpremiseInfraModel onpremmodel.OnpremInfra `json:"onpremiseInfraModel" validate:"required"`
}

GenerateSourceInfraSummaryRequest represents the request body for source infrastructure summary

type JSONResult added in v0.3.1

type JSONResult struct {
}

JSONResult is a dummy struct for Swagger annotations.

type MigrateInfraRequest

type MigrateInfraRequest struct {
	cloudmodel.RecommendedVmInfra
}

type MigrateInfraResponse

type MigrateInfraResponse struct {
	cloudmodel.VmInfraInfo
}

type MigrateInfraWithDefaultsRequest added in v0.3.1

type MigrateInfraWithDefaultsRequest struct {
	cloudmodel.MciDynamicReq
}

type MigrateInfraWithDefaultsResponse added in v0.3.1

type MigrateInfraWithDefaultsResponse struct {
	cloudmodel.VmInfraInfo
}

type MigrateObjectStorageRequest added in v0.4.2

type MigrateObjectStorageRequest struct {
	ObjectStorageInfo
}

MigrateObjectStorageRequest represents a request for object storage migration

type ObjectStorageInfo added in v0.4.2

type ObjectStorageInfo struct {
	Status               string                        `json:"status"`
	Description          string                        `json:"description"`
	TargetCloud          cloudmodel.CloudProperty      `json:"targetCloud"`
	TargetObjectStorages []TargetObjectStorageProperty `json:"targetObjectStorages"`
}

type RecommendInfraRequest

type RecommendInfraRequest struct {
	DesiredProvider string                      `json:"desiredProvider" example:"aws"`
	DesiredRegion   string                      `json:"desiredRegion" example:"ap-northeast-2"`
	Servers         []recommendation.Kubernetes `json:"servers"`
}

* Container Infrastructure Recommendation (Legacy - will be deprecated)

type RecommendInfraResponse

type RecommendInfraResponse struct {
	recommendation.RecommendedInfraInfo
}

type RecommendK8sClusterResponse added in v0.4.2

type RecommendK8sClusterResponse struct {
	tbmodel.K8sClusterDynamicReq
}

type RecommendObjectStorageRequest added in v0.4.1

type RecommendObjectStorageRequest struct {
	DesiredCloud         cloudmodel.CloudProperty      `json:"desiredCloud" validate:"required"`
	SourceObjectStorages []SourceObjectStorageProperty `json:"sourceObjectStorages" validate:"required,min=1"`
}

RecommendObjectStorageRequest represents a request for object storage migration recommendations

type RecommendObjectStorageResponse added in v0.4.1

type RecommendObjectStorageResponse struct {
	ObjectStorageInfo
}

type RecommendSecurityGroupRequest added in v0.3.1

type RecommendSecurityGroupRequest struct {
	// ! To be replaced with the actual model
	// FirewallRules []inframodel.FirewallRuleProperty `json:"firewallRules" example:""`
	FirewallRules []FirewallRuleProperty `json:"firewallRules" example:""`
}

type RecommendSecurityGroupResponse added in v0.3.1

type RecommendSecurityGroupResponse struct {
	cloudmodel.RecommendedSecurityGroupList
}

type RecommendVNetResponse added in v0.3.1

type RecommendVNetResponse struct {
	cloudmodel.RecommendedVNetList
}

type RecommendVmInfraRequest added in v0.3.1

type RecommendVmInfraRequest struct {
	DesiredCspAndRegionPair cloudmodel.CloudProperty `json:"desiredCspAndRegionPair"`
	OnpremiseInfraModel     onpremmodel.OnpremInfra
}

type RecommendVmInfraResponse added in v0.3.1

type RecommendVmInfraResponse struct {
	cloudmodel.RecommendedVmInfra
}

type RecommendVmInfraWithDefaultsRequest added in v0.3.1

type RecommendVmInfraWithDefaultsRequest struct {
	DesiredCspAndRegionPair cloudmodel.CloudProperty `json:"desiredCspAndRegionPair"`
	OnpremiseInfraModel     onpremmodel.OnpremInfra
}

type RecommendVmInfraWithDefaultsResponse added in v0.3.1

type RecommendVmInfraWithDefaultsResponse struct {
	cloudmodel.RecommendedVmInfraDynamicList
}

type RecommendVmOsImageResponse added in v0.3.1

type RecommendVmOsImageResponse struct {
	cloudmodel.RecommendedVmOsImageList
}

type RecommendVmSpecResponse added in v0.3.1

type RecommendVmSpecResponse struct {
	cloudmodel.RecommendedVmSpecList
}

type SourceObjectStorageProperty added in v0.4.1

type SourceObjectStorageProperty struct {
	// Basic identification
	BucketName string `json:"bucketName" validate:"required"` // Actual bucket name

	// Feature settings
	VersioningEnabled bool       `json:"versioningEnabled,omitempty"` // Whether versioning is enabled
	CORSEnabled       bool       `json:"corsEnabled,omitempty"`       // Whether CORS is enabled
	CORSRules         []CORSRule `json:"corsRules,omitempty"`         // CORS rules configuration

	// Capacity information (for cost estimation and recommendations)
	TotalSizeBytes int64 `json:"totalSizeBytes,omitempty"` // Total storage size in bytes
	ObjectCount    int64 `json:"objectCount,omitempty"`    // Total number of objects

	// Access pattern (critical for storage class selection)
	AccessFrequency string `json:"accessFrequency,omitempty"` // "frequent", "infrequent", or "archive"

	// Security settings
	EncryptionEnabled bool `json:"encryptionEnabled,omitempty"` // Whether encryption is enabled
	IsPublic          bool `json:"isPublic,omitempty"`          // Whether bucket has public access

	// Metadata
	Tags         map[string]string `json:"tags,omitempty"`         // Bucket tags
	CreationDate string            `json:"creationDate,omitempty"` // Creation date (RFC3339)
}

SourceObjectStorageProperty represents source object storage properties from on-premise environment

type TargetObjectStorageProperty added in v0.4.1

type TargetObjectStorageProperty struct {
	SourceBucketName  string     `json:"sourceBucketName"`    // Source bucket name for referencing
	BucketName        string     `json:"bucketName"`          // Recommended target bucket name with deterministic suffix
	VersioningEnabled bool       `json:"versioningEnabled"`   // Whether to enable versioning
	CORSEnabled       bool       `json:"corsEnabled"`         // Whether CORS is configured
	CORSRules         []CORSRule `json:"corsRules,omitempty"` // CORS rules configuration
}

TargetObjectStorageProperty represents recommended target object storage configuration

Jump to

Keyboard shortcuts

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