Documentation ¶
Overview ¶
Package mci is to manage multi-cloud infra
Package mci is to manage multi-cloud infra ¶
Package mci is to manage multi-cloud infra ¶
Package mci is to manage multi-cloud infra ¶
Package mci is to manage multi-cloud infra ¶
Package mci is to manage multi-cloud infra ¶
Package mci is to manage multi-cloud infra ¶
Package mci is to manage multi-cloud infra ¶
Package mci is to manage multi-cloud infra ¶
Package mci is to manage multi-cloud infra ¶
Package mci is to manage multi-cloud infra
Index ¶
- func AddNLBVMs(nsId string, mciId string, resourceId string, u *model.TbNLBAddRemoveVMReq) (model.TbNLBInfo, error)
- func AttachDetachDataDisk(nsId string, mciId string, vmId string, command string, dataDiskId string, ...) (model.TbVmInfo, error)
- func BenchmarkAction(nsId string, mciId string, action string, option string) (model.BenchmarkInfoArray, error)
- func CallGetMonitoringAsync(wg *sync.WaitGroup, nsID string, mciID string, vmID string, vmIP string, ...)
- func CallMilkyway(wg *sync.WaitGroup, vmList []string, nsId string, mciId string, vmId string, ...)
- func CallMonitoringAsync(wg *sync.WaitGroup, nsID string, mciID string, mciServiceType string, ...)
- func CheckAllowedTransition(nsId string, mciId string, vmId model.OptionalParameter, action string) error
- func CheckConnectivity(host string, port string) error
- func CheckDragonflyEndpoint() error
- func CheckK8sClusterDynamicReq(req *model.K8sClusterConnectionConfigCandidatesReq) (*model.CheckK8sClusterDynamicReqInfo, error)
- func CheckMci(nsId string, mciId string) (bool, error)
- func CheckMciDynamicReq(req *model.MciConnectionConfigCandidatesReq) (*model.CheckMciDynamicReqInfo, error)
- func CheckMciPolicy(nsId string, mciId string) (bool, error)
- func CheckNLB(nsId string, mciId string, resourceId string) (bool, error)
- func CheckSubGroup(nsId string, mciId string, subGroupId string) (bool, error)
- func CheckVm(nsId string, mciId string, vmId string) (bool, error)
- func ControlMciAsync(nsId string, mciId string, action string, force bool) error
- func ControlVmAsync(wg *sync.WaitGroup, nsId string, mciId string, vmId string, action string, ...)
- func CoreGetBenchmark(nsId string, mciId string, action string, host string) (*model.BenchmarkInfoArray, error)
- func CreateK8sClusterDynamic(reqID string, nsId string, dReq *model.TbK8sClusterDynamicReq, ...) (*model.TbK8sClusterInfo, error)
- func CreateK8sNodeGroupDynamic(reqID string, nsId string, k8sClusterId string, ...) (*model.TbK8sClusterInfo, error)
- func CreateMcSwNlb(nsId string, mciId string, req *model.TbNLBReq, option string) (model.McNlbInfo, error)
- func CreateMci(nsId string, req *model.TbMciReq, option string) (*model.TbMciInfo, error)
- func CreateMciDynamic(reqID string, nsId string, req *model.TbMciDynamicReq, deployOption string) (*model.TbMciInfo, error)
- func CreateMciGroupVm(nsId string, mciId string, vmRequest *model.TbVmReq, newSubGroup bool) (*model.TbMciInfo, error)
- func CreateMciPolicy(nsId string, mciId string, u *model.MciPolicyReq) (model.MciPolicyInfo, error)
- func CreateMciVm(nsId string, mciId string, vmInfoData *model.TbVmInfo) (*model.TbVmInfo, error)
- func CreateMciVmDynamic(nsId string, mciId string, req *model.TbVmDynamicReq) (*model.TbMciInfo, error)
- func CreateNLB(nsId string, mciId string, u *model.TbNLBReq, option string) (model.TbNLBInfo, error)
- func CreateSystemMciDynamic(option string) (*model.TbMciInfo, error)
- func CreateVm(wg *sync.WaitGroup, nsId string, mciId string, vmInfoData *model.TbVmInfo, ...) error
- func CreateVmObject(wg *sync.WaitGroup, nsId string, mciId string, vmInfoData *model.TbVmInfo) error
- func CreateVmSnapshot(nsId string, mciId string, vmId string, snapshotName string) (model.TbCustomImageInfo, error)
- func DFMonAgentInstallReqStructLevelValidation(sl validator.StructLevel)
- func DelAllMci(nsId string, option string) (string, error)
- func DelAllMciPolicy(nsId string) (string, error)
- func DelAllNLB(nsId string, mciId string, subString string, forceFlag string) (model.IdList, error)
- func DelMci(nsId string, mciId string, option string) (model.IdList, error)
- func DelMciPolicy(nsId string, mciId string) error
- func DelMciVm(nsId string, mciId string, vmId string, option string) error
- func DelNLB(nsId string, mciId string, resourceId string, forceFlag string) error
- func Difference_dataDisks(a, b []model.ResourceOnTumblebugInfo) []model.ResourceOnTumblebugInfo
- func FetchVmStatus(nsId string, mciId string, vmId string) (model.TbVmStatusInfo, error)
- func FetchVmStatusAsync(wg *sync.WaitGroup, nsId string, mciId string, vmId string, ...) error
- func FindTbVmByCspId(nsId string, mciId string, vmCspResourceId string) (model.TbVmInfo, error)
- func GenNLBKey(nsId string, mciId string, resourceId string) string
- func GetAllMciPolicyObject(nsId string) ([]model.MciPolicyInfo, error)
- func GetAvailableDataDisks(nsId string, mciId string, vmId string, option string) (interface{}, error)
- func GetBastionNodes(nsId string, mciId string, targetVmId string) ([]model.BastionNode, error)
- func GetLatency(src string, dest string) (float64, error)
- func GetMcNlbAccess(nsId string, mciId string) (*model.MciAccessInfo, error)
- func GetMciAccessInfo(nsId string, mciId string, option string) (*model.MciAccessInfo, error)
- func GetMciInfo(nsId string, mciId string) (*model.TbMciInfo, error)
- func GetMciObject(nsId string, mciId string) (model.TbMciInfo, error)
- func GetMciPolicyObject(nsId string, mciId string) (model.MciPolicyInfo, error)
- func GetMciStatus(nsId string, mciId string) (*model.MciStatusInfo, error)
- func GetMciVmStatus(nsId string, mciId string, vmId string) (*model.TbVmStatusInfo, error)
- func GetMonitoringData(nsId string, mciId string, metric string) (model.MonResultSimpleResponse, error)
- func GetNLB(nsId string, mciId string, resourceId string) (model.TbNLBInfo, error)
- func GetNLBHealth(nsId string, mciId string, nlbId string) (model.TbNLBHealthInfo, error)
- func GetSubGroup(nsId string, mciId string, subGroupId string) (model.TbSubGroupInfo, error)
- func GetVmCurrentPublicIp(nsId string, mciId string, vmId string) (model.TbVmStatusInfo, error)
- func GetVmIdNameInDetail(nsId string, mciId string, vmId string) (*model.TbIdNameInDetailInfo, error)
- func GetVmIp(nsId string, mciId string, vmId string) (string, string, string, error)
- func GetVmObject(nsId string, mciId string, vmId string) (model.TbVmInfo, error)
- func GetVmSpecId(nsId string, mciId string, vmId string) string
- func GetVmSshKey(nsId string, mciId string, vmId string) (string, string, string, error)
- func GetVmTemplate(nsId string, mciId string, algo string) (model.TbVmInfo, error)
- func HandleMciAction(nsId string, mciId string, action string, force bool) (string, error)
- func HandleMciVmAction(nsId string, mciId string, vmId string, action string, force bool) (string, error)
- func InspectResources(connConfig string, resourceType string) (model.InspectResource, error)
- func InspectResourcesOverview() (model.InspectResourceAllResult, error)
- func InstallBenchmarkAgentToMci(nsId string, mciId string, req *model.MciCmdReq, option string) ([]model.SshCmdResult, error)
- func InstallMonitorAgentToMci(nsId string, mciId string, mciServiceType string, req *model.MciCmdReq) (model.AgentInstallContentWrapper, error)
- func ListMciId(nsId string) ([]string, error)
- func ListMciInfo(nsId string, option string) ([]model.TbMciInfo, error)
- func ListMciPolicyId(nsId string) []string
- func ListMciStatus(nsId string) ([]model.MciStatusInfo, error)
- func ListNLB(nsId string, mciId string, filterKey string, filterVal string) (interface{}, error)
- func ListNLBId(nsId string, mciId string) ([]string, error)
- func ListSubGroupId(nsId string, mciId string) ([]string, error)
- func ListVmByFilter(nsId string, mciId string, filterKey string, filterVal string) ([]string, error)
- func ListVmByLabel(nsId string, mciId string, labelKey string) ([]string, error)
- func ListVmBySubGroup(nsId string, mciId string, groupId string) ([]string, error)
- func ListVmId(nsId string, mciId string) ([]string, error)
- func ListVmInfo(nsId string, mciId string, vmId string) (*model.TbVmInfo, error)
- func OrchestrationController()
- func ProvisionDataDisk(nsId string, mciId string, vmId string, u *model.TbDataDiskVmReq) (model.TbVmInfo, error)
- func RecommendK8sNode(nsId string, plan model.DeploymentPlan) ([]model.TbSpecInfo, error)
- func RecommendVm(nsId string, plan model.DeploymentPlan) ([]model.TbSpecInfo, error)
- func RecommendVmCost(nsId string, specList *[]model.TbSpecInfo) ([]model.TbSpecInfo, error)
- func RecommendVmLatency(nsId string, specList *[]model.TbSpecInfo, param *[]model.ParameterKeyVal) ([]model.TbSpecInfo, error)
- func RecommendVmLocation(nsId string, specList *[]model.TbSpecInfo, param *[]model.ParameterKeyVal) ([]model.TbSpecInfo, error)
- func RecommendVmPerformance(nsId string, specList *[]model.TbSpecInfo) ([]model.TbSpecInfo, error)
- func RecommendVmRandom(nsId string, specList *[]model.TbSpecInfo) ([]model.TbSpecInfo, error)
- func RegisterCspNativeResources(nsId string, connConfig string, mciId string, option string, mciFlag string) (model.RegisterResourceResult, error)
- func RegisterCspNativeResourcesAll(nsId string, mciId string, option string, mciFlag string) (model.RegisterResourceAllResult, error)
- func RemoteCommandToMci(nsId string, mciId string, subGroupId string, vmId string, ...) ([]model.SshCmdResult, error)
- func RemoveBastionNodes(nsId string, mciId string, bastionVmId string) (string, error)
- func RemoveNLBVMs(nsId string, mciId string, resourceId string, u *model.TbNLBAddRemoveVMReq) error
- func RunAllBenchmarks(nsId string, mciId string, host string) (*model.BenchmarkInfoArray, error)
- func RunLatencyBenchmark(nsId string, mciId string, host string) (*model.BenchmarkInfoArray, error)
- func RunRemoteCommand(nsId string, mciId string, vmId string, givenUserName string, cmds []string) (map[int]string, map[int]string, error)
- func RunRemoteCommandAsync(wg *sync.WaitGroup, nsId string, mciId string, vmId string, ...)
- func ScaleOutMciSubGroup(nsId string, mciId string, subGroupId string, numVMsToAdd string) (*model.TbMciInfo, error)
- func SetBastionNodes(nsId string, mciId string, targetVmId string, bastionVmId string) (string, error)
- func SetMonitoringAgentStatusInstalled(nsId string, mciId string, vmId string) error
- func TbMciCmdReqStructLevelValidation(sl validator.StructLevel)
- func TbMciReqStructLevelValidation(sl validator.StructLevel)
- func TbNLBReqStructLevelValidation(sl validator.StructLevel)
- func TbVmReqStructLevelValidation(sl validator.StructLevel)
- func TransferFileToMci(nsId string, mciId string, subGroupId string, vmId string, fileData []byte, ...) ([]model.SshCmdResult, error)
- func TrimIP(sshAccessPoint string) (string, error)
- func UpdateMciInfo(nsId string, mciInfoData model.TbMciInfo)
- func UpdateMciPolicyInfo(nsId string, mciPolicyInfoData model.MciPolicyInfo)
- func UpdateMonitoringAgentStatusManually(nsId string, mciId string, vmId string, targetStatus string) error
- func UpdateVmInfo(nsId string, mciId string, vmInfoData model.TbVmInfo)
- func UpdateVmPublicIp(nsId string, mciId string, vmInfoData model.TbVmInfo) error
- func UpdateVmSshKey(nsId string, mciId string, vmId string, verifiedUserName string) error
- func VerifySshUserName(nsId string, mciId string, vmId string, vmIp string, sshPort string, ...) (string, string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddNLBVMs ¶
func AddNLBVMs(nsId string, mciId string, resourceId string, u *model.TbNLBAddRemoveVMReq) (model.TbNLBInfo, error)
AddNLBVMs accepts VM addition request, adds VM to NLB, and returns an updated TB NLB object
func AttachDetachDataDisk ¶
func AttachDetachDataDisk(nsId string, mciId string, vmId string, command string, dataDiskId string, force bool) (model.TbVmInfo, error)
AttachDetachDataDisk is func to attach/detach DataDisk to/from VM
func BenchmarkAction ¶
func BenchmarkAction(nsId string, mciId string, action string, option string) (model.BenchmarkInfoArray, error)
BenchmarkAction is func to action Benchmark
func CallGetMonitoringAsync ¶
func CallMilkyway ¶
func CallMilkyway(wg *sync.WaitGroup, vmList []string, nsId string, mciId string, vmId string, vmIp string, action string, option string, results *model.BenchmarkInfoArray)
CallMilkyway is func to call milkyway agents
func CallMonitoringAsync ¶
func CallMonitoringAsync(wg *sync.WaitGroup, nsID string, mciID string, mciServiceType string, vmID string, givenUserName string, method string, cmd string, returnResult *[]model.SshCmdResult)
CallMonitoringAsync is func to call CB-Dragonfly monitoring framework
func CheckAllowedTransition ¶
func CheckAllowedTransition(nsId string, mciId string, vmId model.OptionalParameter, action string) error
CheckAllowedTransition is func to check status transition is acceptable
func CheckConnectivity ¶
CheckConnectivity func checks if given port is open and ready
func CheckDragonflyEndpoint ¶
func CheckDragonflyEndpoint() error
Module for checking CB-Dragonfly endpoint (call get config)
func CheckK8sClusterDynamicReq ¶ added in v0.10.0
func CheckK8sClusterDynamicReq(req *model.K8sClusterConnectionConfigCandidatesReq) (*model.CheckK8sClusterDynamicReqInfo, error)
CheckK8sClusterDynamicReq is func to check request info to create K8sCluster obeject and deploy requested Nodes in a dynamic way
func CheckMciDynamicReq ¶
func CheckMciDynamicReq(req *model.MciConnectionConfigCandidatesReq) (*model.CheckMciDynamicReqInfo, error)
CheckMciDynamicReq is func to check request info to create MCI obeject and deploy requested VMs in a dynamic way
func CheckSubGroup ¶
CheckSubGroup func is to check given subGroupId is duplicated with existing
func ControlMciAsync ¶
ControlMciAsync is func to control MCI async
func ControlVmAsync ¶
func ControlVmAsync(wg *sync.WaitGroup, nsId string, mciId string, vmId string, action string, results chan<- model.ControlVmResult)
ControlVmAsync is func to control VM async
func CoreGetBenchmark ¶
func CoreGetBenchmark(nsId string, mciId string, action string, host string) (*model.BenchmarkInfoArray, error)
CoreGetBenchmark is func to get Benchmark
func CreateK8sClusterDynamic ¶ added in v0.10.0
func CreateK8sClusterDynamic(reqID string, nsId string, dReq *model.TbK8sClusterDynamicReq, deployOption string) (*model.TbK8sClusterInfo, error)
CreateK8sClusterDynamic is func to create K8sCluster obeject and deploy requested K8sCluster and NodeGroup in a dynamic way
func CreateK8sNodeGroupDynamic ¶ added in v0.10.2
func CreateK8sNodeGroupDynamic(reqID string, nsId string, k8sClusterId string, dReq *model.TbK8sNodeGroupDynamicReq) (*model.TbK8sClusterInfo, error)
CreateK8sNodeGroupDynamic is func to create K8sNodeGroup obeject and deploy requested K8sNodeGroup in a dynamic way
func CreateMcSwNlb ¶
func CreateMcSwNlb(nsId string, mciId string, req *model.TbNLBReq, option string) (model.McNlbInfo, error)
CreateMcSwNlb func create a special purpose MCI for NLB and depoly and setting SW NLB
func CreateMci ¶
CreateMci is func to create MCI obeject and deploy requested VMs (register CSP native VM with option=register)
func CreateMciDynamic ¶
func CreateMciDynamic(reqID string, nsId string, req *model.TbMciDynamicReq, deployOption string) (*model.TbMciInfo, error)
CreateMciDynamic is func to create MCI obeject and deploy requested VMs in a dynamic way
func CreateMciGroupVm ¶
func CreateMciGroupVm(nsId string, mciId string, vmRequest *model.TbVmReq, newSubGroup bool) (*model.TbMciInfo, error)
CreateMciGroupVm is func to create MCI groupVM
func CreateMciPolicy ¶
func CreateMciPolicy(nsId string, mciId string, u *model.MciPolicyReq) (model.MciPolicyInfo, error)
CreateMciPolicy create model.MciPolicyInfo object in DB according to user's requirements.
func CreateMciVm ¶
CreateMciVm is func to post (create) MciVm
func CreateMciVmDynamic ¶
func CreateMciVmDynamic(nsId string, mciId string, req *model.TbVmDynamicReq) (*model.TbMciInfo, error)
CreateMciVmDynamic is func to create requested VM in a dynamic way and add it to MCI
func CreateNLB ¶
func CreateNLB(nsId string, mciId string, u *model.TbNLBReq, option string) (model.TbNLBInfo, error)
CreateNLB accepts nlb creation request, creates and returns an TB nlb object
func CreateSystemMciDynamic ¶
CreateSystemMciDynamic is func to create MCI obeject and deploy requested VMs in a dynamic way
func CreateVm ¶
func CreateVm(wg *sync.WaitGroup, nsId string, mciId string, vmInfoData *model.TbVmInfo, option string) error
CreateVm is func to create VM (option = "register" for register existing VM)
func CreateVmObject ¶ added in v0.9.19
func CreateVmObject(wg *sync.WaitGroup, nsId string, mciId string, vmInfoData *model.TbVmInfo) error
CreateVmObject is func to add VM to MCI
func CreateVmSnapshot ¶
func CreateVmSnapshot(nsId string, mciId string, vmId string, snapshotName string) (model.TbCustomImageInfo, error)
CreateVmSnapshot is func to create VM snapshot
func DFMonAgentInstallReqStructLevelValidation ¶
func DFMonAgentInstallReqStructLevelValidation(sl validator.StructLevel)
func DelAllMciPolicy ¶
DelAllMciPolicy deletes all model.MciPolicyInfo objects.
func DelMciPolicy ¶
DelMciPolicy deletes model.MciPolicyInfo object by mciId.
func Difference_dataDisks ¶
func Difference_dataDisks(a, b []model.ResourceOnTumblebugInfo) []model.ResourceOnTumblebugInfo
func FetchVmStatus ¶
FetchVmStatus is func to fetch VM status (call to CSPs)
func FetchVmStatusAsync ¶
func FetchVmStatusAsync(wg *sync.WaitGroup, nsId string, mciId string, vmId string, results *model.MciStatusInfo) error
FetchVmStatusAsync is func to get VM status async
func FindTbVmByCspId ¶
func GetAllMciPolicyObject ¶
func GetAllMciPolicyObject(nsId string) ([]model.MciPolicyInfo, error)
GetAllMciPolicyObject returns all model.MciPolicyInfo objects.
func GetAvailableDataDisks ¶
func GetBastionNodes ¶
GetBastionNodes func retrieves bastion nodes for a given VM
func GetLatency ¶
GetLatency func get latency between given two regions
func GetMcNlbAccess ¶
func GetMcNlbAccess(nsId string, mciId string) (*model.MciAccessInfo, error)
GetMcNlbAccess returns the requested TB G-NLB access info (currenly MCI)
func GetMciAccessInfo ¶
GetMciAccessInfo is func to retrieve MCI Access information
func GetMciInfo ¶
GetMciInfo is func to return MCI information with the current status update
func GetMciObject ¶
GetMciObject is func to retrieve MCI object from database (no current status update)
func GetMciPolicyObject ¶
func GetMciPolicyObject(nsId string, mciId string) (model.MciPolicyInfo, error)
GetMciPolicyObject returns model.MciPolicyInfo object.
func GetMciStatus ¶
func GetMciStatus(nsId string, mciId string) (*model.MciStatusInfo, error)
GetMciStatus is func to Get Mci Status
func GetMciVmStatus ¶
GetMciVmStatus is func to Get MciVm Status
func GetMonitoringData ¶
func GetMonitoringData(nsId string, mciId string, metric string) (model.MonResultSimpleResponse, error)
GetMonitoringData func retrieves monitoring data from cb-dragonfly
func GetNLBHealth ¶
GetNLBHealth queries the health status of NLB to CB-Spider, and returns it to user
func GetSubGroup ¶ added in v0.9.10
GetSubGroup is func to return list of SubGroups in a given MCI
func GetVmCurrentPublicIp ¶
GetVmCurrentPublicIp is func to get VM public IP
func GetVmIdNameInDetail ¶
func GetVmIdNameInDetail(nsId string, mciId string, vmId string) (*model.TbIdNameInDetailInfo, error)
GetVmIdNameInDetail is func to get ID and Name details
func GetVmObject ¶
GetVmObject is func to get VM object
func GetVmSpecId ¶
GetVmSpecId is func to get VM SpecId
func GetVmSshKey ¶
GetVmSshKey is func to get VM SShKey. Returns username, verifiedUsername, privateKey
func GetVmTemplate ¶
GetVmTemplate is func to get VM template
func HandleMciAction ¶
HandleMciAction is func to handle actions to MCI
func HandleMciVmAction ¶
func HandleMciVmAction(nsId string, mciId string, vmId string, action string, force bool) (string, error)
HandleMciVmAction is func to Get MciVm Action
func InspectResources ¶
func InspectResources(connConfig string, resourceType string) (model.InspectResource, error)
InspectResources returns the state list of TB Resource objects of given connConfig and resourceType
func InspectResourcesOverview ¶
func InspectResourcesOverview() (model.InspectResourceAllResult, error)
InspectResourcesOverview func is to check all resources in CB-TB and CSPs
func InstallBenchmarkAgentToMci ¶
func InstallBenchmarkAgentToMci(nsId string, mciId string, req *model.MciCmdReq, option string) ([]model.SshCmdResult, error)
InstallBenchmarkAgentToMci is func to install milkyway agents in MCI
func ListMciInfo ¶
ListMciInfo is func to get all MCI objects
func ListMciPolicyId ¶
ListMciPolicyId returns a list of Ids for all model.MciPolicyInfo objects .
func ListMciStatus ¶
func ListMciStatus(nsId string) ([]model.MciStatusInfo, error)
ListMciStatus is func to get MCI status all
func ListSubGroupId ¶
ListSubGroupId is func to return list of SubGroups in a given MCI
func ListVmByFilter ¶
func ListVmByFilter(nsId string, mciId string, filterKey string, filterVal string) ([]string, error)
ListVmByFilter is func to get list VMs in a MCI by a filter consist of Key and Value
func ListVmByLabel ¶
ListVmByLabel is a function to list VM IDs by label
func ListVmBySubGroup ¶
ListVmBySubGroup is func to get VM list with a SubGroup label in a specified MCI
func ListVmInfo ¶
ListVmInfo is func to Get MciVm Info
func OrchestrationController ¶
func OrchestrationController()
OrchestrationController is responsible for executing MCI automation policy. OrchestrationController will be periodically involked by a time.NewTicker in main.go.
func ProvisionDataDisk ¶
func ProvisionDataDisk(nsId string, mciId string, vmId string, u *model.TbDataDiskVmReq) (model.TbVmInfo, error)
ProvisionDataDisk is func to provision DataDisk to VM (create and attach to VM)
func RecommendK8sNode ¶ added in v0.10.0
func RecommendK8sNode(nsId string, plan model.DeploymentPlan) ([]model.TbSpecInfo, error)
RecommendK8sNode is func to recommend a node for K8sCluster
func RecommendVm ¶
func RecommendVm(nsId string, plan model.DeploymentPlan) ([]model.TbSpecInfo, error)
RecommendVm is func to recommend a VM
func RecommendVmCost ¶
func RecommendVmCost(nsId string, specList *[]model.TbSpecInfo) ([]model.TbSpecInfo, error)
RecommendVmCost func prioritize specs based on given Cost
func RecommendVmLatency ¶
func RecommendVmLatency(nsId string, specList *[]model.TbSpecInfo, param *[]model.ParameterKeyVal) ([]model.TbSpecInfo, error)
RecommendVmLatency func prioritize specs by latency based on given MCI (fair)
func RecommendVmLocation ¶
func RecommendVmLocation(nsId string, specList *[]model.TbSpecInfo, param *[]model.ParameterKeyVal) ([]model.TbSpecInfo, error)
RecommendVmLocation func prioritize specs based on given location
func RecommendVmPerformance ¶
func RecommendVmPerformance(nsId string, specList *[]model.TbSpecInfo) ([]model.TbSpecInfo, error)
RecommendVmPerformance func prioritize specs based on given Performance condition
func RecommendVmRandom ¶
func RecommendVmRandom(nsId string, specList *[]model.TbSpecInfo) ([]model.TbSpecInfo, error)
RecommendVmRandom func prioritize specs randomly
func RegisterCspNativeResources ¶
func RegisterCspNativeResources(nsId string, connConfig string, mciId string, option string, mciFlag string) (model.RegisterResourceResult, error)
RegisterCspNativeResources func registers all CSP-native resources into CB-TB
func RegisterCspNativeResourcesAll ¶
func RegisterCspNativeResourcesAll(nsId string, mciId string, option string, mciFlag string) (model.RegisterResourceAllResult, error)
RegisterCspNativeResourcesAll func registers all CSP-native resources into CB-TB
func RemoteCommandToMci ¶
func RemoteCommandToMci(nsId string, mciId string, subGroupId string, vmId string, req *model.MciCmdReq) ([]model.SshCmdResult, error)
RemoteCommandToMci is func to command to all VMs in MCI by SSH
func RemoveBastionNodes ¶
RemoveBastionNodes func removes existing bastion nodes info
func RemoveNLBVMs ¶
RemoveNLBVMs accepts VM removal request, removes VMs from NLB, and returns an error if occurs.
func RunAllBenchmarks ¶
RunAllBenchmarks is func to get all Benchmarks
func RunLatencyBenchmark ¶
RunLatencyBenchmark is func to get MCI benchmark for network latency
func RunRemoteCommand ¶
func RunRemoteCommand(nsId string, mciId string, vmId string, givenUserName string, cmds []string) (map[int]string, map[int]string, error)
RunRemoteCommand is func to execute a SSH command to a VM (sync call)
func RunRemoteCommandAsync ¶
func RunRemoteCommandAsync(wg *sync.WaitGroup, nsId string, mciId string, vmId string, givenUserName string, cmd []string, returnResult *[]model.SshCmdResult)
RunRemoteCommandAsync is func to execute a SSH command to a VM (async call)
func ScaleOutMciSubGroup ¶
func ScaleOutMciSubGroup(nsId string, mciId string, subGroupId string, numVMsToAdd string) (*model.TbMciInfo, error)
ScaleOutMciSubGroup is func to create MCI groupVM
func SetBastionNodes ¶
func SetBastionNodes(nsId string, mciId string, targetVmId string, bastionVmId string) (string, error)
SetBastionNodes func sets bastion nodes
func SetMonitoringAgentStatusInstalled ¶
SetMonitoringAgentStatusInstalled is func to Set Monitoring Agent Status Installed
func TbMciCmdReqStructLevelValidation ¶
func TbMciCmdReqStructLevelValidation(sl validator.StructLevel)
TbMciCmdReqStructLevelValidation is func to validate fields in model.MciCmdReq
func TbMciReqStructLevelValidation ¶
func TbMciReqStructLevelValidation(sl validator.StructLevel)
TbMciReqStructLevelValidation is func to validate fields in TbMciReqStruct
func TbNLBReqStructLevelValidation ¶
func TbNLBReqStructLevelValidation(sl validator.StructLevel)
TbNLBReqStructLevelValidation is a function to validate 'model.TbNLBReq' object.
func TbVmReqStructLevelValidation ¶
func TbVmReqStructLevelValidation(sl validator.StructLevel)
TbVmReqStructLevelValidation is func to validate fields in model.TbVmReqStruct
func TransferFileToMci ¶ added in v0.9.12
func TransferFileToMci(nsId string, mciId string, subGroupId string, vmId string, fileData []byte, fileName string, targetPath string) ([]model.SshCmdResult, error)
TransferFileToMci is a function to transfer a file to all VMs in MCI by SSH through bastion hosts
func UpdateMciInfo ¶
UpdateMciInfo is func to update MCI Info (without VM info in MCI)
func UpdateMciPolicyInfo ¶
func UpdateMciPolicyInfo(nsId string, mciPolicyInfoData model.MciPolicyInfo)
UpdateMciPolicyInfo updates model.MciPolicyInfo object in DB.
func UpdateMonitoringAgentStatusManually ¶
func UpdateMonitoringAgentStatusManually(nsId string, mciId string, vmId string, targetStatus string) error
UpdateMonitoringAgentStatusManually is func to Update Monitoring Agent Installation Status Manually
func UpdateVmInfo ¶
UpdateVmInfo is func to update VM Info
func UpdateVmPublicIp ¶
UpdateVmPublicIp is func to update VM public IP
func UpdateVmSshKey ¶
UpdateVmSshKey is func to update VM SShKey
Types ¶
This section is empty.