mcis

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RestCheckMcis

func RestCheckMcis(c echo.Context) error

func RestCheckVm

func RestCheckVm(c echo.Context) error

func RestDelAllMcis

func RestDelAllMcis(c echo.Context) error

RestDelAllMcis godoc @Summary Delete all MCISs @Description Delete all MCISs @Tags MCIS @Accept json @Produce json @Param nsId path string true "Namespace ID" @Success 200 {object} common.SimpleMsg @Failure 404 {object} common.SimpleMsg @Router /ns/{nsId}/mcis [delete]

func RestDelAllMcisPolicy added in v0.2.8

func RestDelAllMcisPolicy(c echo.Context) error

RestDelAllMcisPolicy godoc @Summary Delete all MCIS Policys @Description Delete all MCIS Policys @Tags MCIS Policy @Accept json @Produce json @Param nsId path string true "Namespace ID" @Success 200 {object} common.SimpleMsg @Failure 404 {object} common.SimpleMsg @Router /ns/{nsId}/policy/mcis [delete]

func RestDelMcis

func RestDelMcis(c echo.Context) error

RestDelMcis godoc @Summary Delete MCIS @Description Delete MCIS @Tags MCIS @Accept json @Produce json @Param nsId path string true "Namespace ID" @Param mcisId path string true "MCIS ID" @Success 200 {object} common.SimpleMsg @Failure 404 {object} common.SimpleMsg @Router /ns/{nsId}/mcis/{mcisId} [delete]

func RestDelMcisPolicy added in v0.2.8

func RestDelMcisPolicy(c echo.Context) error

DelMcisPolicy godoc @Summary Delete MCIS Policy @Description Delete MCIS Policy @Tags MCIS Policy @Accept json @Produce json @Param nsId path string true "Namespace ID" @Param mcisId path string true "MCIS ID" @Success 200 {object} common.SimpleMsg @Failure 404 {object} common.SimpleMsg @Router /ns/{nsId}/policy/mcis/{mcisId} [delete]

func RestDelMcisVm

func RestDelMcisVm(c echo.Context) error

RestDelMcisVm godoc @Summary Delete MCIS @Description Delete MCIS @Tags MCIS @Accept json @Produce json @Param nsId path string true "Namespace ID" @Param mcisId path string true "MCIS ID" @Param vmId path string true "VM ID" @Success 200 {object} common.SimpleMsg @Failure 404 {object} common.SimpleMsg @Router /ns/{nsId}/mcis/{mcisId}/vm/{vmId} [delete]

func RestGetAllBenchmark

func RestGetAllBenchmark(c echo.Context) error

RestGetAllBenchmark godoc @Summary List all MCISs @Description List all MCISs @Tags MCIS @Accept json @Produce json @Param nsId path string true "Namespace ID" @Param mcisId path string true "MCIS ID" @Param hostIP body RestGetAllBenchmarkRequest true "Host IP address to benchmark" @Success 200 {object} mcis.BenchmarkInfoArray @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /ns/{nsId}/benchmarkall/mcis/{mcisId} [get]

func RestGetAllMcis

func RestGetAllMcis(c echo.Context) error

RestGetAllMcis godoc @Summary List all MCISs @Description List all MCISs @Tags MCIS @Accept json @Produce json @Param nsId path string true "Namespace ID" @Success 200 {object} RestGetAllMcisResponse @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /ns/{nsId}/mcis [get]

func RestGetAllMcisPolicy added in v0.2.8

func RestGetAllMcisPolicy(c echo.Context) error

RestGetAllMcisPolicy godoc @Summary List all MCIS Policys @Description List all MCIS Policys @Tags MCIS Policy @Accept json @Produce json @Param nsId path string true "Namespace ID" @Success 200 {object} RestGetAllMcisPolicyResponse @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /ns/{nsId}/policy/mcis [get]

func RestGetBenchmark

func RestGetBenchmark(c echo.Context) error

RestGetBenchmark godoc @Summary Get MCIS @Description Get MCIS @Tags MCIS @Accept json @Produce json @Param nsId path string true "Namespace ID" @Param mcisId path string true "MCIS ID" @Param hostIP body RestGetBenchmarkRequest true "Host IP address to benchmark" @Success 200 {object} mcis.BenchmarkInfoArray @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /ns/{nsId}/benchmark/mcis/{mcisId} [get]

func RestGetMcis

func RestGetMcis(c echo.Context) error

RestGetMcis godoc @Summary Get MCIS @Description Get MCIS @Tags MCIS @Accept json @Produce json @Param nsId path string true "Namespace ID" @Param mcisId path string true "MCIS ID" @Success 200 {object} TbMcisInfo @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /ns/{nsId}/mcis/{mcisId} [get]

func RestGetMcisPolicy added in v0.2.8

func RestGetMcisPolicy(c echo.Context) error

RestGetMcisPolicy godoc @Summary Get MCIS Policy @Description Get MCIS Policy @Tags MCIS Policy @Accept json @Produce json @Param nsId path string true "Namespace ID" @Param mcisId path string true "MCIS ID" @Success 200 {object} mcis.McisPolicyInfo @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /ns/{nsId}/policy/mcis/{mcisId} [get]

func RestGetMcisVm

func RestGetMcisVm(c echo.Context) error

RestGetMcisVm godoc @Summary Get MCIS @Description Get MCIS @Tags MCIS @Accept json @Produce json @Param nsId path string true "Namespace ID" @Param mcisId path string true "MCIS ID" @Param vmId path string true "VM ID" @Success 200 {object} mcis.TbVmInfo @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /ns/{nsId}/mcis/{mcisId}/vm/{vmId} [get]

func RestGetMonitorData

func RestGetMonitorData(c echo.Context) error

RestGetMonitorData godoc @Summary GetMonitorData MCIS @Description GetMonitorData MCIS @Tags Monitor @Accept json @Produce json @Param nsId path string true "Namespace ID" @Param nsId path string true "MCIS ID" @Success 200 {object} mcir.TbSshKeyInfo @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /ns/{nsId}/monitoring/mcis/{mcisId}/metric/{metric} [get]

func RestPostCmdMcis

func RestPostCmdMcis(c echo.Context) error

RestPostCmdMcis godoc @Summary Send a command to specified MCIS @Description Send a command to specified MCIS @Tags MCIS @Accept json @Produce json @Param nsId path string true "Namespace ID" @Param mcisId path string true "MCIS ID" @Param mcisCmdReq body mcis.McisCmdReq true "MCIS Command Request" @Success 200 {object} RestPostCmdMcisResponseWrapper @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /ns/{nsId}/cmd/mcis/{mcisId} [post]

func RestPostCmdMcisVm

func RestPostCmdMcisVm(c echo.Context) error

RestPostCmdMcisVm godoc @Summary Send a command to specified VM @Description Send a command to specified VM @Tags MCIS @Accept json @Produce json @Param nsId path string true "Namespace ID" @Param mcisId path string true "MCIS ID" @Param vmId path string true "VM ID" @Param mcisCmdReq body mcis.McisCmdReq true "MCIS Command Request" @Success 200 {object} RestPostCmdMcisVmResponse @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /ns/{nsId}/cmd/mcis/{mcisId}/vm/{vmId} [post]

func RestPostInstallAgentToMcis

func RestPostInstallAgentToMcis(c echo.Context) error

RestPostInstallAgentToMcis godoc @Summary Install the benchmark agent to specified MCIS @Description Install the benchmark agent to specified MCIS @Tags MCIS @Accept json @Produce json @Param nsId path string true "Namespace ID" @Param mcisId path string true "MCIS ID" @Param mcisCmdReq body mcis.McisCmdReq true "MCIS Command Request" @Success 200 {object} mcis.AgentInstallContentWrapper @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /ns/{nsId}/install/mcis/{mcisId} [post]

func RestPostInstallMonitorAgentToMcis

func RestPostInstallMonitorAgentToMcis(c echo.Context) error

RestPostInstallMonitorAgentToMcis godoc @Summary InstallMonitorAgent MCIS @Description InstallMonitorAgent MCIS @Tags Monitor @Accept json @Produce json @Param nsId path string true "Namespace ID" @Param nsId path string true "MCIS ID" @Param mcisInfo body mcis.McisCmdReq true "Details for an MCIS object" @Success 200 {object} mcir.TbSshKeyInfo @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /ns/{nsId}/monitoring/install/mcis/{mcisId} [post]

func RestPostMcis

func RestPostMcis(c echo.Context) error

RestPostMcis godoc @Summary Create MCIS @Description Create MCIS @Tags MCIS @Accept json @Produce json @Param nsId path string true "Namespace ID" @Param mcisReq body TbMcisReq true "Details for an MCIS object" @Success 200 {object} TbMcisInfo @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /ns/{nsId}/mcis [post]

func RestPostMcisPolicy added in v0.2.8

func RestPostMcisPolicy(c echo.Context) error

RestPostMcisPolicy godoc @Summary Create MCIS Automation policy @Description Create MCIS Automation policy @Tags MCIS Policy @Accept json @Produce json @Param nsId path string true "Namespace ID" @Param nsId path string true "MCIS ID" @Param mcisInfo body mcis.McisPolicyInfo true "Details for an MCIS object" @Success 200 {object} mcis.McisPolicyInfo @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /ns/{nsId}/policy/mcis/{mcisId} [post]

func RestPostMcisRecommand

func RestPostMcisRecommand(c echo.Context) error

RestPostMcisRecommand godoc @Summary Get MCIS recommendation @Description Get MCIS recommendation @Tags MCIS @Accept json @Produce json @Param nsId path string true "Namespace ID" @Param mcisRecommendReq body mcis.McisRecommendReq true "Details for an MCIS object" @Success 200 {object} RestPostMcisRecommandResponse @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /ns/{nsId}/mcis/recommend [post]

func RestPostMcisVm

func RestPostMcisVm(c echo.Context) error

RestPostMcisVm godoc @Summary Create VM in specified MCIS @Description Create VM in specified MCIS @Tags MCIS @Accept json @Produce json @Param nsId path string true "Namespace ID" @Param mcisId path string true "MCIS ID" @Param vmReq body mcis.TbVmReq true "Details for an VM object" @Success 200 {object} mcis.TbVmInfo @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /ns/{nsId}/mcis/{mcisId}/vm [post]

func RestPutMcis

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

// RestPutMcis godoc // @Summary Update MCIS // @Description Update MCIS // @Tags MCIS // @Accept json // @Produce json // @Param mcisInfo body TbMcisInfo true "Details for an MCIS object" // @Success 200 {object} TbMcisInfo // @Failure 404 {object} common.SimpleMsg // @Failure 500 {object} common.SimpleMsg // @Router /ns/{nsId}/mcis/{mcisId} [put]

func RestPutMcisPolicy added in v0.2.8

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

// RestPutMcisPolicy godoc // @Summary Update MCIS Policy // @Description Update MCIS Policy // @Tags MCIS Policy // @Accept json // @Produce json // @Param mcisInfo body McisPolicyInfo true "Details for an MCIS Policy object" // @Success 200 {object} McisPolicyInfo // @Failure 404 {object} common.SimpleMsg // @Failure 500 {object} common.SimpleMsg // @Router /ns/{nsId}/policy/mcis/{mcisId} [put]

func RestPutMcisVm

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

// RestPutSshKey godoc // @Summary Update MCIS // @Description Update MCIS // @Tags MCIS // @Accept json // @Produce json // @Param nsId path string true "Namespace ID" // @Param mcisId path string true "MCIS ID" // @Param vmId path string true "VM ID" // @Param vmInfo body mcis.TbVmInfo true "Details for an VM object" // @Success 200 {object} mcis.TbVmInfo // @Failure 404 {object} common.SimpleMsg // @Failure 500 {object} common.SimpleMsg // @Router /ns/{nsId}/mcis/{mcisId}/vm/{vmId} [put]

Types

type RestGetAllBenchmarkRequest

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

Request struct for RestGetAllBenchmark

type RestGetAllMcisPolicyResponse added in v0.2.8

type RestGetAllMcisPolicyResponse struct {
	McisPolicy []mcis.McisPolicyInfo `json:"mcisPolicy"`
}

Response structure for RestGetAllMcisPolicy

type RestGetAllMcisResponse

type RestGetAllMcisResponse struct {
	Mcis []mcis.TbMcisInfo `json:"mcis"`
}

Response structure for RestGetAllMcis

type RestGetAllMcisStatusResponse added in v0.2.8

type RestGetAllMcisStatusResponse struct {
	Mcis []mcis.McisStatusInfo `json:"mcis"`
}

Response structure for RestGetAllMcisStatus

type RestGetBenchmarkRequest

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

type RestPostCmdMcisResponse

type RestPostCmdMcisResponse struct {
	Mcis_id string `json:"mcis_id"`
	Vm_id   string `json:"vm_id"`
	Vm_ip   string `json:"vm_ip"`
	Result  string `json:"result"`
}

type RestPostCmdMcisResponseWrapper

type RestPostCmdMcisResponseWrapper struct {
	Result_array []RestPostCmdMcisResponse `json:"result_array"`
}

type RestPostCmdMcisVmResponse

type RestPostCmdMcisVmResponse struct {
	Result string `json:"result"`
}

type RestPostMcisRecommandResponse

type RestPostMcisRecommandResponse struct {
	//Vm_req          []TbVmRecommendReq    `json:"vm_req"`
	Vm_recommend    []mcis.TbVmRecommendInfo `json:"vm_recommend"`
	Placement_algo  string                   `json:"placement_algo"`
	Placement_param []common.KeyValue        `json:"placement_param"`
}

Jump to

Keyboard shortcuts

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