Documentation
¶
Index ¶
- func FindAndSortVmOsImageInfoListBySimilarity(keywords string, kwDelimiters []string, vmImages []cloudmodel.ImageInfo, ...) []cloudmodel.ImageInfo
- func FindBestVmOsImage(keywords string, kwDelimiters []string, vmImages []cloudmodel.ImageInfo, ...) cloudmodel.ImageInfo
- func FindBestVmOsImageNameUsedInCsp(keywords string, kwDelimiters []string, vmImages []cloudmodel.ImageInfo, ...) string
- func FindCompatibleSpecAndImage(specs []cloudmodel.SpecInfo, images []cloudmodel.ImageInfo, csp string) (cloudmodel.SpecInfo, cloudmodel.ImageInfo, error)
- func GetDefaultImagesLimit() int
- func GetDefaultInfraLimit() int
- func GetDefaultSpecsLimit() int
- func IsValidCspAndRegion(csp string, region string) (bool, error)
- func MBtoGiB(mb float64) uint32
- func RecommendSecurityGroup(csp string, region string, server onpremmodel.ServerProperty) (cloudmodel.SecurityGroupReq, error)
- func RecommendSecurityGroups(csp string, region string, servers []onpremmodel.ServerProperty) (cloudmodel.RecommendedSecurityGroupList, error)
- func RecommendVNet(csp string, region string, srcInfra onpremmodel.OnpremInfra) ([]cloudmodel.VNetReq, 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.ImageInfo, error)
- func RecommendVmOsImageId(csp string, region string, server onpremmodel.ServerProperty) (string, error)
- func RecommendVmOsImages(csp string, region string, server onpremmodel.ServerProperty, limit int) ([]cloudmodel.ImageInfo, error)
- func RecommendVmSpecs(csp string, region string, server onpremmodel.ServerProperty, limit int) (vmSpecList []cloudmodel.SpecInfo, length int, err error)
- func RecommendVmSpecsForImage(csp string, region string, server onpremmodel.ServerProperty, limit int, ...) (vmSpecList []cloudmodel.SpecInfo, length int, err error)
- type RecommendationStatus
- type RecommendedInfraInfo
- type VmOsImageInfoWithScore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindAndSortVmOsImageInfoListBySimilarity ¶ added in v0.3.1
func FindAndSortVmOsImageInfoListBySimilarity(keywords string, kwDelimiters []string, vmImages []cloudmodel.ImageInfo, imgDelimiters []string) []cloudmodel.ImageInfo
FindAndSortVmOsImageInfoListBySimilarity finds VM OS images that match the keywords and sorts them by similarity score
func FindBestVmOsImage ¶ added in v0.1.1
func FindBestVmOsImage(keywords string, kwDelimiters []string, vmImages []cloudmodel.ImageInfo, imgDelimiters []string) cloudmodel.ImageInfo
FindBestVmOsImage finds the best matching image based on the similarity scores
func FindBestVmOsImageNameUsedInCsp ¶ added in v0.3.3
func FindBestVmOsImageNameUsedInCsp(keywords string, kwDelimiters []string, vmImages []cloudmodel.ImageInfo, imgDelimiters []string) string
FindBestVmOsImageNameUsedInCsp finds the best matching image based on the similarity scores
func FindCompatibleSpecAndImage ¶ added in v0.3.4
func FindCompatibleSpecAndImage(specs []cloudmodel.SpecInfo, images []cloudmodel.ImageInfo, csp string) (cloudmodel.SpecInfo, cloudmodel.ImageInfo, error)
FindCompatibleSpecAndImage finds a compatible VM spec and image pair by performing CSP-specific compatibility checks
func GetDefaultImagesLimit ¶ added in v0.3.6
func GetDefaultImagesLimit() int
GetDefaultImagesLimit returns the default VM images recommendation limit
func GetDefaultInfraLimit ¶ added in v0.3.6
func GetDefaultInfraLimit() int
GetDefaultInfraLimit returns the default infrastructure recommendation limit
func GetDefaultSpecsLimit ¶ added in v0.3.6
func GetDefaultSpecsLimit() int
GetDefaultSpecsLimit returns the default VM specs recommendation limit
func IsValidCspAndRegion ¶ added in v0.3.1
func RecommendSecurityGroup ¶ added in v0.3.1
func RecommendSecurityGroup(csp string, region string, server onpremmodel.ServerProperty) (cloudmodel.SecurityGroupReq, 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.VNetReq, 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.ImageInfo, 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 RecommendVmOsImages ¶ added in v0.3.1
func RecommendVmOsImages(csp string, region string, server onpremmodel.ServerProperty, limit int) ([]cloudmodel.ImageInfo, error)
RecommendVmOsImages 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.SpecInfo, length int, err error)
RecommendVmSpecs recommends appropriate VM specs for the given server
func RecommendVmSpecsForImage ¶ added in v0.3.3
func RecommendVmSpecsForImage(csp string, region string, server onpremmodel.ServerProperty, limit int, image cloudmodel.ImageInfo) (vmSpecList []cloudmodel.SpecInfo, length int, err error)
RecommendVmSpecsForImage recommends appropriate VM specs for the server and image
Types ¶
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.MciDynamicReq `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.ImageInfo
SimilarityScore float64
}