infra

package
v0.10.4 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package mci is to handle REST API for mci

Package mci is to handle REST API for mci

Package mci is to handle REST API for mci

Package mci is to handle REST API for mci

Package mci is to handle REST API for mci

Package mci is to handle REST API for mci

Package mci is to handle REST API for mci

Package mci is to handle REST API for mci

Package mci is to handle REST API for mci

Package mci is to handle REST API for mci

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RestAddNLBVMs

func RestAddNLBVMs(c echo.Context) error

RestAddNLBVMs godoc @ID AddNLBVMs @Summary Add VMs to NLB @Description Add VMs to NLB @Tags [Infra Resource] NLB Management (for developer) @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param mciId path string true "MCI ID" default(mci01) @Param nlbId path string true "NLB ID" default(g1) @Param nlbAddRemoveVMReq body model.TbNLBAddRemoveVMReq true "VMs to add to NLB" @Success 200 {object} model.TbNLBInfo @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /ns/{nsId}/mci/{mciId}/nlb/{nlbId}/vm [post]

func RestCheckMci

func RestCheckMci(c echo.Context) error

func RestCheckVm

func RestCheckVm(c echo.Context) error

func RestDelAllMci

func RestDelAllMci(c echo.Context) error

RestDelAllMci godoc @ID DelAllMci @Summary Delete all MCIs @Description Delete all MCIs @Tags [MC-Infra] MCI Provisioning and Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param option query string false "Option for delete all MCIs (support force object delete, terminate before delete)" Enums(force, terminate) @Success 200 {object} model.SimpleMsg @Failure 404 {object} model.SimpleMsg @Router /ns/{nsId}/mci [delete]

func RestDelAllMciPolicy

func RestDelAllMciPolicy(c echo.Context) error

RestDelAllMciPolicy godoc @ID DelAllMciPolicy @Summary Delete all MCI policies @Description Delete all MCI policies @Tags [MC-Infra] MCI Orchestration Management (WIP) @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Success 200 {object} model.SimpleMsg @Failure 404 {object} model.SimpleMsg @Router /ns/{nsId}/policy/mci [delete]

func RestDelAllNLB

func RestDelAllNLB(c echo.Context) error

RestDelAllNLB godoc @ID DelAllNLB @Summary Delete all NLBs @Description Delete all NLBs @Tags [Infra Resource] NLB Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param mciId path string true "MCI ID" default(mci01) @Param match query string false "Delete resources containing matched ID-substring only" default() @Success 200 {object} model.IdList @Failure 404 {object} model.SimpleMsg @Router /ns/{nsId}/mci/{mciId}/nlb [delete]

func RestDelMci

func RestDelMci(c echo.Context) error

RestDelMci godoc @ID DelMci @Summary Delete MCI @Description Delete MCI @Tags [MC-Infra] MCI Provisioning and Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param mciId path string true "MCI ID" default(mci01) @Param option query string false "Option for delete MCI (support force delete)" Enums(terminate,force) @Success 200 {object} model.IdList @Failure 404 {object} model.SimpleMsg @Router /ns/{nsId}/mci/{mciId} [delete]

func RestDelMciPolicy

func RestDelMciPolicy(c echo.Context) error

DelMciPolicy godoc @ID DelMciPolicy @Summary Delete MCI Policy @Description Delete MCI Policy @Tags [MC-Infra] MCI Orchestration Management (WIP) @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param mciId path string true "MCI ID" default(mci01) @Success 200 {object} model.SimpleMsg @Failure 404 {object} model.SimpleMsg @Router /ns/{nsId}/policy/mci/{mciId} [delete]

func RestDelMciVm

func RestDelMciVm(c echo.Context) error

RestDelMciVm godoc @ID DelMciVm @Summary Delete VM in specified MCI @Description Delete VM in specified MCI @Tags [MC-Infra] MCI Provisioning and Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param mciId path string true "MCI ID" default(mci01) @Param vmId path string true "VM ID" default(g1-1) @Param option query string false "Option for delete VM (support force delete)" Enums(force) @Success 200 {object} model.SimpleMsg @Failure 404 {object} model.SimpleMsg @Router /ns/{nsId}/mci/{mciId}/vm/{vmId} [delete]

func RestDelNLB

func RestDelNLB(c echo.Context) error

RestDelNLB godoc @ID DelNLB @Summary Delete NLB @Description Delete NLB @Tags [Infra Resource] NLB Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param mciId path string true "MCI ID" default(mci01) @Param nlbId path string true "NLB ID" @Success 200 {object} model.SimpleMsg @Failure 404 {object} model.SimpleMsg @Router /ns/{nsId}/mci/{mciId}/nlb/{nlbId} [delete]

func RestGetAllBenchmark

func RestGetAllBenchmark(c echo.Context) error

RestGetAllBenchmark godoc @ID GetAllBenchmark @Summary Run MCI benchmark for all performance metrics and return results @Description Run MCI benchmark for all performance metrics and return results @Tags [MC-Infra] MCI Performance Benchmarking (WIP) @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param mciId path string true "MCI ID" default(mci01) @Param hostIP body RestGetAllBenchmarkRequest true "Host IP address to benchmark" @Success 200 {object} model.BenchmarkInfoArray @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /ns/{nsId}/benchmarkAll/mci/{mciId} [post]

func RestGetAllMci

func RestGetAllMci(c echo.Context) error

RestGetAllMci godoc @ID GetAllMci @Summary List all MCIs or MCIs' ID @Description List all MCIs or MCIs' ID @Tags [MC-Infra] MCI Provisioning and Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param option query string false "Option" Enums(id, simple, status) @Success 200 {object} JSONResult{[DEFAULT]=RestGetAllMciResponse,[SIMPLE]=RestGetAllMciResponse,[ID]=model.IdList,[STATUS]=RestGetAllMciStatusResponse} "Different return structures by the given option param" @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /ns/{nsId}/mci [get]

func RestGetAllMciPolicy

func RestGetAllMciPolicy(c echo.Context) error

RestGetAllMciPolicy godoc @ID GetAllMciPolicy @Summary List all MCI policies @Description List all MCI policies @Tags [MC-Infra] MCI Orchestration Management (WIP) @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Success 200 {object} RestGetAllMciPolicyResponse @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /ns/{nsId}/policy/mci [get]

func RestGetAllNLB

func RestGetAllNLB(c echo.Context) error

RestGetAllNLB godoc @ID GetAllNLB @Summary List all NLBs or NLBs' ID @Description List all NLBs or NLBs' ID @Tags [Infra Resource] NLB Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param mciId path string true "MCI ID" default(mci01) @Param option query string false "Option" Enums(id) @Param filterKey query string false "Field key for filtering (ex: cspResourceName)" @Param filterVal query string false "Field value for filtering (ex: default-alibaba-ap-northeast-1-vpc)" @Success 200 {object} JSONResult{[DEFAULT]=RestGetAllNLBResponse,[ID]=model.IdList} "Different return structures by the given option param" @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /ns/{nsId}/mci/{mciId}/nlb [get]

func RestGetBastionNodes

func RestGetBastionNodes(c echo.Context) error

RestGetBastionNodes godoc @ID GetBastionNodes @Summary Get bastion nodes for a VM @Description Get bastion nodes for a VM @Tags [MC-Infra] MCI Remote Command @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param mciId path string true "MCI ID" default(mci01) @Param targetVmId path string true "Target VM ID" default(g1-1) @Success 200 {object} []model.BastionNode @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /ns/{nsId}/mci/{mciId}/vm/{targetVmId}/bastion [get]

func RestGetBenchmark

func RestGetBenchmark(c echo.Context) error

RestGetBenchmark godoc @ID GetBenchmark @Summary Run MCI benchmark for a single performance metric and return results @Description Run MCI benchmark for a single performance metric and return results @Tags [MC-Infra] MCI Performance Benchmarking (WIP) @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param mciId path string true "MCI ID" default(mci01) @Param hostIP body RestGetBenchmarkRequest true "Host IP address to benchmark" @Param action query string true "Benchmark Action to MCI" Enums(install, init, cpus, cpum, memR, memW, fioR, fioW, dbR, dbW, rtt, mrtt, clean) @Success 200 {object} model.BenchmarkInfoArray @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /ns/{nsId}/benchmark/mci/{mciId} [post]

func RestGetBenchmarkLatency

func RestGetBenchmarkLatency(c echo.Context) error

RestGetLatencyBenchmark godoc @ID GetLatencyBenchmark @Summary Run MCI benchmark for network latency @Description Run MCI benchmark for network latency @Tags [MC-Infra] MCI Performance Benchmarking (WIP) @Accept json @Produce json @Param nsId path string true "Namespace ID" default(system) @Param mciId path string true "MCI ID" default(probe) @Success 200 {object} model.BenchmarkInfoArray @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /ns/{nsId}/benchmarkLatency/mci/{mciId} [get]

func RestGetControlMci

func RestGetControlMci(c echo.Context) error

RestGetControlMci godoc @ID GetControlMci @Summary Control the lifecycle of MCI (refine, suspend, resume, reboot, terminate) @Description Control the lifecycle of MCI (refine, suspend, resume, reboot, terminate) @Tags [MC-Infra] MCI Provisioning and Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param mciId path string true "MCI ID" default(mci01) @Param action query string true "Action to MCI" Enums(suspend, resume, reboot, terminate, refine, continue, withdraw) @Param force query string false "Force control to skip checking controllable status" Enums(false, true) @Success 200 {object} model.SimpleMsg @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /ns/{nsId}/control/mci/{mciId} [get]

func RestGetControlMciVm

func RestGetControlMciVm(c echo.Context) error

RestGetControlMciVm godoc @ID GetControlMciVm @Summary Control the lifecycle of VM (suspend, resume, reboot, terminate) @Description Control the lifecycle of VM (suspend, resume, reboot, terminate) @Tags [MC-Infra] MCI Provisioning and Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param mciId path string true "MCI ID" default(mci01) @Param vmId path string true "VM ID" default(g1-1) @Param action query string true "Action to MCI" Enums(suspend, resume, reboot, terminate) @Param force query string false "Force control to skip checking controllable status" Enums(false, true) @Success 200 {object} model.SimpleMsg @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /ns/{nsId}/control/mci/{mciId}/vm/{vmId} [get]

func RestGetMci

func RestGetMci(c echo.Context) error

RestGetMci godoc @ID GetMci @Summary Get MCI object (option: status, accessInfo, vmId) @Description Get MCI object (option: status, accessInfo, vmId) @Tags [MC-Infra] MCI Provisioning and Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param mciId path string true "MCI ID" default(mci01) @Param option query string false "Option" Enums(default, id, status, accessinfo) @Param filterKey query string false "(For option=id) Field key for filtering (ex: connectionName)" @Param filterVal query string false "(For option=id) Field value for filtering (ex: aws-ap-northeast-2)" @Param accessInfoOption query string false "(For option=accessinfo) accessInfoOption (showSshKey)" @success 200 {object} JSONResult{[DEFAULT]=model.TbMciInfo,[ID]=model.IdList,[STATUS]=model.MciStatusInfo,[AccessInfo]=model.MciAccessInfo} "Different return structures by the given action param" @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /ns/{nsId}/mci/{mciId} [get]

func RestGetMciGroupIds

func RestGetMciGroupIds(c echo.Context) error

RestGetMciGroupIds godoc @ID GetMciGroupIds @Summary List SubGroup IDs in a specified MCI @Description List SubGroup IDs in a specified MCI @Tags [MC-Infra] MCI Provisioning and Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param mciId path string true "MCI ID" default(mci01) @Success 200 {object} model.IdList @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /ns/{nsId}/mci/{mciId}/subgroup [get]

func RestGetMciGroupVms

func RestGetMciGroupVms(c echo.Context) error

RestGetMciGroupVms godoc @ID GetMciGroupVms @Summary List VMs with a SubGroup label in a specified MCI @Description List VMs with a SubGroup label in a specified MCI @Tags [MC-Infra] MCI Provisioning and Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param mciId path string true "MCI ID" default(mci01) @Param subgroupId path string true "subGroup ID" default(g1) @Param option query string false "Option" Enums(id) @Success 200 {object} model.IdList @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /ns/{nsId}/mci/{mciId}/subgroup/{subgroupId} [get]

func RestGetMciPolicy

func RestGetMciPolicy(c echo.Context) error

RestGetMciPolicy godoc @ID GetMciPolicy @Summary Get MCI Policy @Description Get MCI Policy @Tags [MC-Infra] MCI Orchestration Management (WIP) @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param mciId path string true "MCI ID" default(mci01) @Success 200 {object} model.MciPolicyInfo @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /ns/{nsId}/policy/mci/{mciId} [get]

func RestGetMciVm

func RestGetMciVm(c echo.Context) error

RestGetMciVm godoc @ID GetMciVm @Summary Get VM in specified MCI @Description Get VM in specified MCI @Tags [MC-Infra] MCI Provisioning and Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param mciId path string true "MCI ID" default(mci01) @Param vmId path string true "VM ID" default(g1-1) @Param option query string false "Option for MCI" Enums(default, status, idsInDetail, accessinfo) @Param accessInfoOption query string false "(For option=accessinfo) accessInfoOption (showSshKey)" @success 200 {object} JSONResult{[DEFAULT]=model.TbVmInfo,[STATUS]=model.TbVmStatusInfo,[IDNAME]=model.TbIdNameInDetailInfo} "Different return structures by the given option param" @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /ns/{nsId}/mci/{mciId}/vm/{vmId} [get]

func RestGetMonitorData

func RestGetMonitorData(c echo.Context) error

RestGetMonitorData godoc @ID GetMonitorData @Summary Get monitoring data of specified MCI for specified monitoring metric (cpu, memory, disk, network) @Description Get monitoring data of specified MCI for specified monitoring metric (cpu, memory, disk, network) @Tags [MC-Infra] MCI Resource Monitor (for developer) @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param mciId path string true "MCI ID" default(mci01) @Param metric path string true "Metric type: cpu, memory, disk, network" @Success 200 {object} model.MonResultSimpleResponse @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /ns/{nsId}/monitoring/mci/{mciId}/metric/{metric} [get]

func RestGetNLB

func RestGetNLB(c echo.Context) error

RestGetNLB godoc @ID GetNLB @Summary Get NLB @Description Get NLB @Tags [Infra Resource] NLB Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param mciId path string true "MCI ID" default(mci01) @Param nlbId path string true "NLB ID" default(g1) @Success 200 {object} model.TbNLBInfo @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /ns/{nsId}/mci/{mciId}/nlb/{nlbId} [get]

func RestGetNLBHealth

func RestGetNLBHealth(c echo.Context) error

RestGetNLBHealth godoc @ID GetNLBHealth @Summary Get NLB Health @Description Get NLB Health @Tags [Infra Resource] NLB Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param mciId path string true "MCI ID" default(mci01) @Param nlbId path string true "NLB ID" default(g1) @Success 200 {object} model.TbNLBInfo @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /ns/{nsId}/mci/{mciId}/nlb/{nlbId}/healthz [get]

func RestPostCmdMci

func RestPostCmdMci(c echo.Context) error

RestPostCmdMci godoc @ID PostCmdMci @Summary Send a command to specified MCI @Description Send a command to specified MCI @Tags [MC-Infra] MCI Remote Command @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param mciId path string true "MCI ID" default(mci01) @Param mciCmdReq body model.MciCmdReq true "MCI Command Request" @Param subGroupId query string false "subGroupId to apply the command only for VMs in subGroup of MCI" default(g1) @Param vmId query string false "vmId to apply the command only for a VM in MCI" default(g1-1) @Param x-request-id header string false "Custom request ID" @Success 200 {object} model.MciSshCmdResult @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /ns/{nsId}/cmd/mci/{mciId} [post]

func RestPostFileToMci added in v0.9.12

func RestPostFileToMci(c echo.Context) error

RestPostFileToMci godoc @ID PostFileToMci @Summary Transfer a file to specified MCI @Description Transfer a file to specified MCI to the specified path. @Description The file size should be less than 10MB. @Description Not for gerneral file transfer but for specific purpose (small configuration files). @Tags [MC-Infra] MCI Remote Command @Accept multipart/form-data @Produce json @Param nsId path string true "Namespace ID" default(default) @Param mciId path string true "MCI ID" default(mci01) @Param subGroupId query string false "subGroupId to apply the file transfer only for VMs in subGroup of MCI" default(g1) @Param vmId query string false "vmId to apply the file transfer only for a VM in MCI" default(g1-1) @Param path formData string true "Target path where the file will be stored" default(/home/cb-user/) @Param file formData file true "The file to be uploaded (Max 10MB)" @Param x-request-id header string false "Custom request ID" @Success 200 {object} model.MciSshCmdResult @Failure 400 {object} model.SimpleMsg "Invalid request" @Failure 500 {object} model.SimpleMsg "Internal Server Error" @Router /ns/{nsId}/transferFile/mci/{mciId} [post]

func RestPostInstallBenchmarkAgentToMci

func RestPostInstallBenchmarkAgentToMci(c echo.Context) error

RestPostInstallBenchmarkAgentToMci godoc @ID PostInstallBenchmarkAgentToMci @Summary Install the benchmark agent to specified MCI @Description Install the benchmark agent to specified MCI @Tags [MC-Infra] MCI Performance Benchmarking (WIP) @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param mciId path string true "MCI ID" default(mci01) @Param mciCmdReq body model.MciCmdReq true "MCI Command Request" @Param option query string false "Option for checking update" Enums(update) @Success 200 {object} model.MciSshCmdResult @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /ns/{nsId}/installBenchmarkAgent/mci/{mciId} [post]

func RestPostInstallMonitorAgentToMci

func RestPostInstallMonitorAgentToMci(c echo.Context) error

RestPostInstallMonitorAgentToMci godoc @ID PostInstallMonitorAgentToMci @Summary Install monitoring agent (CB-Dragonfly agent) to MCI @Description Install monitoring agent (CB-Dragonfly agent) to MCI @Tags [MC-Infra] MCI Resource Monitor (for developer) @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param mciId path string true "MCI ID" default(mci01) @Param mciInfo body model.MciCmdReq true "Details for an MCI object" @Success 200 {object} model.AgentInstallContentWrapper @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /ns/{nsId}/monitoring/install/mci/{mciId} [post]

func RestPostMcNLB

func RestPostMcNLB(c echo.Context) error

RestPostMcNLB godoc @ID PostMcNLB @Summary Create a special purpose MCI for NLB and depoly and setting SW NLB @Description Create a special purpose MCI for NLB and depoly and setting SW NLB @Tags [Infra Resource] NLB Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param mciId path string true "MCI ID" default(mci01) @Param nlbReq body model.TbNLBReq true "Details of the NLB object" @Success 200 {object} model.McNlbInfo @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /ns/{nsId}/mci/{mciId}/mcSwNlb [post]

func RestPostMci

func RestPostMci(c echo.Context) error

RestPostMci godoc @ID PostMci @Summary Create MCI @Description Create MCI @Tags [MC-Infra] MCI Provisioning and Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param mciReq body model.TbMciReq true "Details for an MCI object" @Success 200 {object} model.TbMciInfo @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /ns/{nsId}/mci [post]

func RestPostMciDynamic

func RestPostMciDynamic(c echo.Context) error

RestPostMciDynamic godoc @ID PostMciDynamic @Summary Create MCI Dynamically @Description Create MCI Dynamically from common spec and image @Tags [MC-Infra] MCI Provisioning and Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param mciReq body model.TbMciDynamicReq true "Request body to provision MCI dynamically. Must include commonSpec and commonImage info of each VM request.(ex: {name: mci01,vm: [{commonImage: aws+ap-northeast-2+ubuntu22.04,commonSpec: aws+ap-northeast-2+t2.small}]} ) You can use /mciRecommendVm and /mciDynamicCheckRequest to get it) Check the guide: https://github.com/cloud-barista/cb-tumblebug/discussions/1570" @Param option query string false "Option for MCI creation" Enums(hold) @Param x-request-id header string false "Custom request ID" @Success 200 {object} model.TbMciInfo @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /ns/{nsId}/mciDynamic [post]

func RestPostMciDynamicCheckRequest

func RestPostMciDynamicCheckRequest(c echo.Context) error

RestPostMciDynamicCheckRequest godoc @ID PostMciDynamicCheckRequest @Summary Check available ConnectionConfig list for creating MCI Dynamically @Description Check available ConnectionConfig list before create MCI Dynamically from common spec and image @Tags [MC-Infra] MCI Provisioning and Management @Accept json @Produce json @Param mciReq body model.MciConnectionConfigCandidatesReq true "Details for MCI dynamic request information" @Success 200 {object} model.CheckMciDynamicReqInfo @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /mciDynamicCheckRequest [post]

func RestPostMciPolicy

func RestPostMciPolicy(c echo.Context) error

RestPostMciPolicy godoc @ID PostMciPolicy @Summary Create MCI Automation policy @Description Create MCI Automation policy @Tags [MC-Infra] MCI Orchestration Management (WIP) @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param mciId path string true "MCI ID" default(mci01) @Param mciPolicyReq body model.MciPolicyReq true "Details for an MCI automation policy request" @Success 200 {object} model.MciPolicyInfo @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /ns/{nsId}/policy/mci/{mciId} [post]

func RestPostMciSubGroupScaleOut

func RestPostMciSubGroupScaleOut(c echo.Context) error

RestPostMciSubGroupScaleOut godoc @ID PostMciSubGroupScaleOut @Summary ScaleOut subGroup in specified MCI @Description ScaleOut subGroup in specified MCI @Tags [MC-Infra] MCI Provisioning and Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param mciId path string true "MCI ID" default(mci01) @Param subgroupId path string true "subGroup ID" default(g1) @Param vmReq body model.TbScaleOutSubGroupReq true "subGroup scaleOut request" @Success 200 {object} model.TbMciInfo @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /ns/{nsId}/mci/{mciId}/subgroup/{subgroupId} [post]

func RestPostMciVm

func RestPostMciVm(c echo.Context) error

RestPostMciVm godoc @ID PostMciVm @Summary Create and add homogeneous VMs(subGroup) to a specified MCI (Set subGroupSize for multiple VMs) @Description Create and add homogeneous VMs(subGroup) to a specified MCI (Set subGroupSize for multiple VMs) @Tags [MC-Infra] MCI Provisioning and Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param mciId path string true "MCI ID" default(mci01) @Param vmReq body model.TbVmReq true "Details for VMs(subGroup)" @Success 200 {object} model.TbMciInfo @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /ns/{nsId}/mci/{mciId}/vm [post]

func RestPostMciVmDynamic

func RestPostMciVmDynamic(c echo.Context) error

RestPostMciVmDynamic godoc @ID PostMciVmDynamic @Summary Create VM Dynamically and add it to MCI @Description Create VM Dynamically and add it to MCI @Tags [MC-Infra] MCI Provisioning and Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param mciId path string true "MCI ID" default(mci01) @Param vmReq body model.TbVmDynamicReq true "Details for Vm dynamic request" @Success 200 {object} model.TbMciInfo @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /ns/{nsId}/mci/{mciId}/vmDynamic [post]

func RestPostMciVmSnapshot

func RestPostMciVmSnapshot(c echo.Context) error

RestPostMciVmSnapshot godoc @ID PostMciVmSnapshot @Summary Snapshot VM and create a Custom Image Object using the Snapshot @Description Snapshot VM and create a Custom Image Object using the Snapshot @Tags [Infra Resource] Image Management @Accept json @Produce json @Param vmSnapshotReq body model.TbVmSnapshotReq true "Request body to create VM snapshot" @Param nsId path string true "Namespace ID" default(default) @Param mciId path string true "MCI ID" default(mci01) @Param vmId path string true "VM ID" default(g1-1) @Success 200 {object} model.TbCustomImageInfo @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /ns/{nsId}/mci/{mciId}/vm/{vmId}/snapshot [post]

func RestPostNLB

func RestPostNLB(c echo.Context) error

RestPostNLB godoc @ID PostNLB @Summary Create NLB @Description Create NLB @Tags [Infra Resource] NLB Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param mciId path string true "MCI ID" default(mci01) @Param option query string false "Option: [required params for register] connectionName, name, cspResourceId" Enums(register) @Param nlbReq body model.TbNLBReq true "Details of the NLB object" @Success 200 {object} model.TbNLBInfo @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /ns/{nsId}/mci/{mciId}/nlb [post]

func RestPostRegisterCSPNativeVM

func RestPostRegisterCSPNativeVM(c echo.Context) error

RestPostRegisterCSPNativeVM godoc @ID PostRegisterCSPNativeVM @Summary Register existing VM in a CSP to Cloud-Barista MCI @Description Register existing VM in a CSP to Cloud-Barista MCI @Tags [MC-Infra] MCI Provisioning and Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param mciReq body model.TbMciReq true "Details for an MCI object with existing CSP VM ID" @Success 200 {object} model.TbMciInfo @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /ns/{nsId}/registerCspVm [post]

func RestPostSystemMci

func RestPostSystemMci(c echo.Context) error

RestPostSystemMci godoc @ID PostSystemMci @Summary Create System MCI Dynamically for Special Purpose in NS:system @Description Create System MCI Dynamically for Special Purpose @Tags [MC-Infra] MCI Provisioning and Management @Accept json @Produce json @Param option query string false "Option for the purpose of system MCI" Enums(probe) @Success 200 {object} model.TbMciInfo @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /systemMci [post]

func RestPutMciPolicy

func RestPutMciPolicy(c echo.Context) error
function RestPutMciPolicy not yet implemented

// RestPutMciPolicy godoc // @ID PutMciPolicy // @Summary Update MCI Policy // @Description Update MCI Policy // @Tags [MC-Infra] MCI Orchestration Management (WIP) // @Accept json // @Produce json // @Param mciInfo body MciPolicyInfo true "Details for an MCI Policy object" // @Success 200 {object} MciPolicyInfo // @Failure 404 {object} model.SimpleMsg // @Failure 500 {object} model.SimpleMsg // @Router /ns/{nsId}/policy/mci/{mciId} [put]

func RestPutMonitorAgentStatusInstalled

func RestPutMonitorAgentStatusInstalled(c echo.Context) error

RestPutMonitorAgentStatusInstalled godoc @ID PutMonitorAgentStatusInstalled @Summary Set monitoring agent (CB-Dragonfly agent) installation status installed (for Windows VM only) @Description Set monitoring agent (CB-Dragonfly agent) installation status installed (for Windows VM only) @Tags [MC-Infra] MCI Resource Monitor (for developer) @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param mciId path string true "MCI ID" default(mci01) @Param vmId path string true "VM ID" default(vm01) @Success 200 {object} model.TbVmInfo @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /ns/{nsId}/monitoring/status/mci/{mciId}/vm/{vmId} [put]

func RestPutNLB

func RestPutNLB(c echo.Context) error
function RestPutNLB not yet implemented

// RestPutNLB godoc // @ID PutNLB // @Summary Update NLB // @Description Update NLB // @Tags [Infra Resource] NLB Management // @Accept json // @Produce json // @Param nsId path string true "Namespace ID" default(default) // @Param mciId path string true "MCI ID" default(mci01) // @Param nlbId path string true "NLB ID" default(g1) // @Param nlbInfo body model.TbNLBInfo true "Details of the NLB object" // @Success 200 {object} model.TbNLBInfo // @Failure 404 {object} model.SimpleMsg // @Failure 500 {object} model.SimpleMsg // @Router /ns/{nsId}/mci/{mciId}/nlb/{nlbId} [put]

func RestRecommendVm

func RestRecommendVm(c echo.Context) error

RestRecommendVm godoc @ID RecommendVm @Summary Recommend MCI plan (filter and priority) @Description Recommend MCI plan (filter and priority) Find details from https://github.com/cloud-barista/cb-tumblebug/discussions/1234 @Tags [MC-Infra] MCI Provisioning and Management @Accept json @Produce json @Param deploymentPlan body model.DeploymentPlan false "Recommend MCI plan (filter and priority)" @Success 200 {object} []model.TbSpecInfo @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /mciRecommendVm [post]

func RestRemoveBastionNodes

func RestRemoveBastionNodes(c echo.Context) error

RestRemoveBastionNodes godoc @ID RemoveBastionNodes @Summary Remove a bastion VM from all vNets @Description Remove a bastion VM from all vNets @Tags [MC-Infra] MCI Remote Command @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param mciId path string true "MCI ID" default(mci01) @Param bastionVmId path string true "Bastion VM ID" default(g1-1) @Success 200 {object} model.SimpleMsg @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /ns/{nsId}/mci/{mciId}/bastion/{bastionVmId} [delete]

func RestRemoveNLBVMs

func RestRemoveNLBVMs(c echo.Context) error

RestRemoveNLBVMs godoc @ID RemoveNLBVMs @Summary Delete VMs from NLB @Description Delete VMs from NLB @Tags [Infra Resource] NLB Management (for developer) @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param mciId path string true "MCI ID" default(mci01) @Param nlbId path string true "NLB ID" default(g1) @Param nlbAddRemoveVMReq body model.TbNLBAddRemoveVMReq true "Select VMs to remove from NLB" @Success 200 {object} model.SimpleMsg @Failure 404 {object} model.SimpleMsg @Router /ns/{nsId}/mci/{mciId}/nlb/{nlbId}/vm [delete]

func RestSetBastionNodes

func RestSetBastionNodes(c echo.Context) error

RestSetBastionNodes godoc @ID SetBastionNodes @Summary Set bastion nodes for a VM @Description Set bastion nodes for a VM @Tags [MC-Infra] MCI Remote Command @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param mciId path string true "MCI ID" default(mci01) @Param targetVmId path string true "Target VM ID" default(g1-1) @Param bastionVmId path string true "Bastion VM ID" default(g1-1) @Success 200 {object} model.SimpleMsg @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /ns/{nsId}/mci/{mciId}/vm/{targetVmId}/bastion/{bastionVmId} [put]

Types

type JSONResult

type JSONResult struct {
}

JSONResult is a dummy struct for Swagger annotations.

type RestGetAllBenchmarkRequest

type RestGetAllBenchmarkRequest struct {
	Host string `json:"host"`
}

Request struct for RestGetAllBenchmark

type RestGetAllMciPolicyResponse

type RestGetAllMciPolicyResponse struct {
	MciPolicy []model.MciPolicyInfo `json:"mciPolicy"`
}

Response structure for RestGetAllMciPolicy

type RestGetAllMciResponse

type RestGetAllMciResponse struct {
	Mci []model.TbMciInfo `json:"mci"`
}

RestGetAllMciResponse is a response structure for RestGetAllMci

type RestGetAllMciStatusResponse

type RestGetAllMciStatusResponse struct {
	Mci []model.MciStatusInfo `json:"mci"`
}

RestGetAllMciStatusResponse is a response structure for RestGetAllMciStatus

type RestGetAllNLBResponse

type RestGetAllNLBResponse struct {
	NLB []model.TbNLBInfo `json:"nlb"`
}

Response structure for RestGetAllNLB

type RestGetBenchmarkRequest

type RestGetBenchmarkRequest struct {
	Host string `json:"host"`
}

type RestPostMciRecommendResponse

type RestPostMciRecommendResponse struct {
	//VmReq          []TbVmRecommendReq    `json:"vmReq"`
	VmRecommend    []model.TbVmRecommendInfo `json:"vmRecommend"`
	PlacementAlgo  string                    `json:"placementAlgo"`
	PlacementParam []model.KeyValue          `json:"placementParam"`
}

Jump to

Keyboard shortcuts

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