recommendation

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

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.TbImageInfo, imgDelimiters []string) []cloudmodel.TbImageInfo

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.TbImageInfo, imgDelimiters []string) cloudmodel.TbImageInfo

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.TbImageInfo, 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.TbSpecInfo, images []cloudmodel.TbImageInfo, csp string) (cloudmodel.TbSpecInfo, cloudmodel.TbImageInfo, error)

FindCompatibleSpecAndImage finds a compatible VM spec and image pair by performing CSP-specific compatibility checks

func IsValidCspAndRegion added in v0.3.1

func IsValidCspAndRegion(csp string, region string) (bool, error)

func MBtoGiB added in v0.1.1

func MBtoGiB(mb float64) uint32

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 RecommendVmOsImages added in v0.3.1

func RecommendVmOsImages(csp string, region string, server onpremmodel.ServerProperty, limit int) ([]cloudmodel.TbImageInfo, 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.TbSpecInfo, 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.TbImageInfo) (vmSpecList []cloudmodel.TbSpecInfo, length int, err error)

RecommendVmSpecsForImage recommends appropriate VM specs for the server and image

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
}

Jump to

Keyboard shortcuts

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