Documentation
¶
Index ¶
- func FindBestVmOsImage(keywords string, kwDelimiters []string, vmImages []cloudmodel.TbImageInfo, ...) cloudmodel.TbImageInfo
- func FindBestVmOsImageId(keywords string, kwDelimiters []string, vmImages []tbmodel.TbImageInfo, ...) string
- func IsValidCspAndRegion(csp string, region string) (bool, error)
- func MBtoGiB(mb float64) uint32
- func RecommendSecurityGroup(csp string, region string, server onpremmodel.ServerProperty) (cloudmodel.TbSecurityGroupReq, error)
- func RecommendSecurityGroups(csp string, region string, servers []onpremmodel.ServerProperty) (cloudmodel.RecommendedSecurityGroupList, error)
- func RecommendVNet(csp string, region string, srcInfra onpremmodel.OnpremInfra) ([]cloudmodel.TbVNetReq, error)
- func RecommendVmInfra(desiredCsp string, desiredRegion string, srcInfra onpremmodel.OnpremInfra) (cloudmodel.RecommendedVmInfra, error)
- func RecommendVmInfraWithDefaults(desiredCsp string, desiredRegion string, srcInfra onpremmodel.OnpremInfra) (cloudmodel.RecommendedVmInfraDynamicList, error)
- func RecommendVmOsImage(csp string, region string, server onpremmodel.ServerProperty) (cloudmodel.TbImageInfo, error)
- func RecommendVmOsImageId(csp string, region string, server onpremmodel.ServerProperty) (string, error)
- func RecommendVmSpecs(csp string, region string, server onpremmodel.ServerProperty, limit int) (vmSpecList []cloudmodel.TbSpecInfo, length int, err error)
- type CspRegionPair
- type RecommendationStatus
- type RecommendedInfraInfo
- type VmOsImageInfoWithScore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindBestVmOsImage ¶ added in v0.1.1
func FindBestVmOsImage(keywords string, kwDelimiters []string, vmImages []cloudmodel.TbImageInfo, imgDelimiters []string) cloudmodel.TbImageInfo
FindBestVmOsImage finds the best matching image based on the similarity scores
func FindBestVmOsImageId ¶ added in v0.3.1
func FindBestVmOsImageId(keywords string, kwDelimiters []string, vmImages []tbmodel.TbImageInfo, imgDelimiters []string) string
FindBestVmOsImageId finds the best matching image based on the similarity scores
func IsValidCspAndRegion ¶ added in v0.3.1
func RecommendSecurityGroup ¶ added in v0.3.1
func RecommendSecurityGroup(csp string, region string, server onpremmodel.ServerProperty) (cloudmodel.TbSecurityGroupReq, error)
func RecommendSecurityGroups ¶ added in v0.3.1
func RecommendSecurityGroups(csp string, region string, servers []onpremmodel.ServerProperty) (cloudmodel.RecommendedSecurityGroupList, error)
func RecommendVNet ¶ added in v0.3.1
func RecommendVNet(csp string, region string, srcInfra onpremmodel.OnpremInfra) ([]cloudmodel.TbVNetReq, error)
func RecommendVmInfra ¶ added in v0.3.1
func RecommendVmInfra(desiredCsp string, desiredRegion string, srcInfra onpremmodel.OnpremInfra) (cloudmodel.RecommendedVmInfra, error)
RecommendVmInfra an appropriate multi-cloud infrastructure (MCI) for cloud migration
func RecommendVmInfraWithDefaults ¶ added in v0.3.1
func RecommendVmInfraWithDefaults(desiredCsp string, desiredRegion string, srcInfra onpremmodel.OnpremInfra) (cloudmodel.RecommendedVmInfraDynamicList, error)
RecommendVmInfraWithDefaults an appropriate multi-cloud infrastructure (MCI) for cloud migration
func RecommendVmOsImage ¶ added in v0.3.1
func RecommendVmOsImage(csp string, region string, server onpremmodel.ServerProperty) (cloudmodel.TbImageInfo, error)
RecommendVmOsImage recommends an appropriate VM OS image (e.g., Ubuntu 22.04) for the given VM spec
func RecommendVmOsImageId ¶ added in v0.3.1
func RecommendVmOsImageId(csp string, region string, server onpremmodel.ServerProperty) (string, error)
RecommendVmOsImageId recommends an appropriate VM OS image (e.g., Ubuntu 22.04) for the given VM spec
func RecommendVmSpecs ¶ added in v0.3.1
func RecommendVmSpecs(csp string, region string, server onpremmodel.ServerProperty, limit int) (vmSpecList []cloudmodel.TbSpecInfo, length int, err error)
RecommendVmSpecs recommends appropriate VM specs for the given server
Types ¶
type CspRegionPair ¶ added in v0.3.1
type CspRegionPair struct {
Csp string `json:"csp" example:"aws"`
Region string `json:"region" example:"ap-northeast-2"`
}
CspRegionPair represents a pair of cloud service provider (CSP) and region.
type RecommendationStatus ¶ added in v0.2.1
type RecommendationStatus string
RecommendationStatus represents the status of a recommendation.
const ( NothingRecommended RecommendationStatus = "none" PartiallyRecommended RecommendationStatus = "partial" FullyRecommended RecommendationStatus = "ok" )
type RecommendedInfraInfo ¶ added in v0.2.1
type RecommendedInfraInfo struct {
Status string `json:"status"`
Description string `json:"description"`
TargetInfra tbmodel.TbMciDynamicReq `json:"targetInfra"`
}
* Models for Container Infrastructure (i.e., an infrastructure for Kubernetes)
func RecommendContainer ¶ added in v0.3.1
func RecommendContainer(provider, region string, srcInfra onpremmodel.OnpremInfra) (RecommendedInfraInfo, error)
RecommendContainer recommends appropriate K8s node specs for container workloads
type VmOsImageInfoWithScore ¶ added in v0.3.1
type VmOsImageInfoWithScore struct {
VmOsImageInfo cloudmodel.TbImageInfo
SimilarityScore float64
}
func FindAndSortVmOsImageInfoListBySimilarity ¶ added in v0.3.1
func FindAndSortVmOsImageInfoListBySimilarity(keywords string, kwDelimiters []string, vmImages []cloudmodel.TbImageInfo, imgDelimiters []string) []VmOsImageInfoWithScore
FindAndSortVmOsImageInfoListBySimilarity finds VM OS images that match the keywords and sorts them by similarity score
func RecommendVmOsImages ¶ added in v0.3.1
func RecommendVmOsImages(csp string, region string, server onpremmodel.ServerProperty, limit int) ([]VmOsImageInfoWithScore, error)
RecommendVmOsImages recommends an appropriate VM OS image (e.g., Ubuntu 22.04) for the given VM spec