Skip to content

Commit

Permalink
Enhance API docs
Browse files Browse the repository at this point in the history
  • Loading branch information
cb-github-robot authored Aug 14, 2024
2 parents acd8c22 + d45316d commit 8892bb3
Show file tree
Hide file tree
Showing 12 changed files with 71 additions and 97 deletions.
8 changes: 4 additions & 4 deletions src/api/rest/server/mci/benchmark.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
// @ID PostInstallBenchmarkAgentToMci
// @Summary Install the benchmark agent to specified MCI
// @Description Install the benchmark agent to specified MCI
// @Tags [Infra service] MCI Performance benchmarking (WIP)
// @Tags [MC-Infra] MCI Performance benchmarking (WIP)
// @Accept json
// @Produce json
// @Param nsId path string true "Namespace ID" default(ns01)
Expand Down Expand Up @@ -75,7 +75,7 @@ type RestGetAllBenchmarkRequest struct {
// @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 [Infra service] MCI Performance benchmarking (WIP)
// @Tags [MC-Infra] MCI Performance benchmarking (WIP)
// @Accept json
// @Produce json
// @Param nsId path string true "Namespace ID" default(ns01)
Expand Down Expand Up @@ -107,7 +107,7 @@ func RestGetAllBenchmark(c echo.Context) error {
// @ID GetLatencyBenchmark
// @Summary Run MCI benchmark for network latency
// @Description Run MCI benchmark for network latency
// @Tags [Infra service] MCI Performance benchmarking (WIP)
// @Tags [MC-Infra] MCI Performance benchmarking (WIP)
// @Accept json
// @Produce json
// @Param nsId path string true "Namespace ID" default(system-purpose-common-ns)
Expand Down Expand Up @@ -136,7 +136,7 @@ type RestGetBenchmarkRequest struct {
// @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 [Infra service] MCI Performance benchmarking (WIP)
// @Tags [MC-Infra] MCI Performance benchmarking (WIP)
// @Accept json
// @Produce json
// @Param nsId path string true "Namespace ID" default(ns01)
Expand Down
4 changes: 2 additions & 2 deletions src/api/rest/server/mci/control.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
// @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 [Infra service] MCI Control lifecycle
// @Tags [MC-Infra] MCI Control lifecycle
// @Accept json
// @Produce json
// @Param nsId path string true "Namespace ID" default(ns01)
Expand Down Expand Up @@ -73,7 +73,7 @@ func RestGetControlMci(c echo.Context) error {
// @ID GetControlMciVm
// @Summary Control the lifecycle of VM (suspend, resume, reboot, terminate)
// @Description Control the lifecycle of VM (suspend, resume, reboot, terminate)
// @Tags [Infra service] MCI Control lifecycle
// @Tags [MC-Infra] MCI Control lifecycle
// @Accept json
// @Produce json
// @Param nsId path string true "Namespace ID" default(ns01)
Expand Down
20 changes: 10 additions & 10 deletions src/api/rest/server/mci/manageInfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ type JSONResult struct {
// @ID GetMci
// @Summary Get MCI object (option: status, accessInfo, vmId)
// @Description Get MCI object (option: status, accessInfo, vmId)
// @Tags [Infra service] MCI Provisioning management
// @Tags [MC-Infra] MCI Provisioning management
// @Accept json
// @Produce json
// @Param nsId path string true "Namespace ID" default(ns01)
Expand Down Expand Up @@ -111,7 +111,7 @@ type RestGetAllMciStatusResponse struct {
// @ID GetAllMci
// @Summary List all MCIs or MCIs' ID
// @Description List all MCIs or MCIs' ID
// @Tags [Infra service] MCI Provisioning management
// @Tags [MC-Infra] MCI Provisioning management
// @Accept json
// @Produce json
// @Param nsId path string true "Namespace ID" default(ns01)
Expand Down Expand Up @@ -171,7 +171,7 @@ func RestGetAllMci(c echo.Context) error {
// @ID PutMci
// @Summary Update MCI
// @Description Update MCI
// @Tags [Infra service] MCI Provisioning management
// @Tags [MC-Infra] MCI Provisioning management
// @Accept json
// @Produce json
// @Param mciInfo body TbMciInfo true "Details for an MCI object"
Expand All @@ -188,7 +188,7 @@ func RestPutMci(c echo.Context) error {
// @ID DelMci
// @Summary Delete MCI
// @Description Delete MCI
// @Tags [Infra service] MCI Provisioning management
// @Tags [MC-Infra] MCI Provisioning management
// @Accept json
// @Produce json
// @Param nsId path string true "Namespace ID" default(ns01)
Expand All @@ -214,7 +214,7 @@ func RestDelMci(c echo.Context) error {
// @ID DelAllMci
// @Summary Delete all MCIs
// @Description Delete all MCIs
// @Tags [Infra service] MCI Provisioning management
// @Tags [MC-Infra] MCI Provisioning management
// @Accept json
// @Produce json
// @Param nsId path string true "Namespace ID" default(ns01)
Expand All @@ -241,7 +241,7 @@ func RestDelAllMci(c echo.Context) error {
// @ID GetMciVm
// @Summary Get VM in specified MCI
// @Description Get VM in specified MCI
// @Tags [Infra service] MCI Provisioning management
// @Tags [MC-Infra] MCI Provisioning management
// @Accept json
// @Produce json
// @Param nsId path string true "Namespace ID" default(ns01)
Expand Down Expand Up @@ -283,7 +283,7 @@ func RestGetMciVm(c echo.Context) error {
// @ID PutSshKey
// @Summary Update MCI
// @Description Update MCI
// @Tags [Infra service] MCI Provisioning management
// @Tags [MC-Infra] MCI Provisioning management
// @Accept json
// @Produce json
// @Param nsId path string true "Namespace ID" default(ns01)
Expand All @@ -303,7 +303,7 @@ func RestPutMciVm(c echo.Context) error {
// @ID DelMciVm
// @Summary Delete VM in specified MCI
// @Description Delete VM in specified MCI
// @Tags [Infra service] MCI Provisioning management
// @Tags [MC-Infra] MCI Provisioning management
// @Accept json
// @Produce json
// @Param nsId path string true "Namespace ID" default(ns01)
Expand Down Expand Up @@ -338,7 +338,7 @@ func RestDelMciVm(c echo.Context) error {
// @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 [Infra service] MCI Provisioning management
// @Tags [MC-Infra] MCI Provisioning management
// @Accept json
// @Produce json
// @Param nsId path string true "Namespace ID" default(ns01)
Expand Down Expand Up @@ -369,7 +369,7 @@ func RestGetMciGroupVms(c echo.Context) error {
// @ID GetMciGroupIds
// @Summary List SubGroup IDs in a specified MCI
// @Description List SubGroup IDs in a specified MCI
// @Tags [Infra service] MCI Provisioning management
// @Tags [MC-Infra] MCI Provisioning management
// @Accept json
// @Produce json
// @Param nsId path string true "Namespace ID" default(ns01)
Expand Down
6 changes: 3 additions & 3 deletions src/api/rest/server/mci/monitoring.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
// @ID PostInstallMonitorAgentToMci
// @Summary Install monitoring agent (CB-Dragonfly agent) to MCI
// @Description Install monitoring agent (CB-Dragonfly agent) to MCI
// @Tags [Infra service] MCI Resource monitor (for developer)
// @Tags [MC-Infra] MCI Resource monitor (for developer)
// @Accept json
// @Produce json
// @Param nsId path string true "Namespace ID" default(ns01)
Expand Down Expand Up @@ -57,7 +57,7 @@ func RestPostInstallMonitorAgentToMci(c echo.Context) error {
// @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 [Infra service] MCI Resource monitor (for developer)
// @Tags [MC-Infra] MCI Resource monitor (for developer)
// @Accept json
// @Produce json
// @Param nsId path string true "Namespace ID" default(ns01)
Expand Down Expand Up @@ -90,7 +90,7 @@ func RestPutMonitorAgentStatusInstalled(c echo.Context) error {
// @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 [Infra service] MCI Resource monitor (for developer)
// @Tags [MC-Infra] MCI Resource monitor (for developer)
// @Accept json
// @Produce json
// @Param nsId path string true "Namespace ID" default(ns01)
Expand Down
12 changes: 6 additions & 6 deletions src/api/rest/server/mci/orchestration.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
// @ID PostMciPolicy
// @Summary Create MCI Automation policy
// @Description Create MCI Automation policy
// @Tags [Infra service] MCI Auto control policy management (WIP)
// @Tags [MC-Infra] MCI Auto control policy management (WIP)
// @Accept json
// @Produce json
// @Param nsId path string true "Namespace ID" default(ns01)
Expand Down Expand Up @@ -59,7 +59,7 @@ func RestPostMciPolicy(c echo.Context) error {
// @ID GetMciPolicy
// @Summary Get MCI Policy
// @Description Get MCI Policy
// @Tags [Infra service] MCI Auto control policy management (WIP)
// @Tags [MC-Infra] MCI Auto control policy management (WIP)
// @Accept json
// @Produce json
// @Param nsId path string true "Namespace ID" default(ns01)
Expand Down Expand Up @@ -99,7 +99,7 @@ type RestGetAllMciPolicyResponse struct {
// @ID GetAllMciPolicy
// @Summary List all MCI policies
// @Description List all MCI policies
// @Tags [Infra service] MCI Auto control policy management (WIP)
// @Tags [MC-Infra] MCI Auto control policy management (WIP)
// @Accept json
// @Produce json
// @Param nsId path string true "Namespace ID" default(ns01)
Expand Down Expand Up @@ -132,7 +132,7 @@ func RestGetAllMciPolicy(c echo.Context) error {
// @ID PutMciPolicy
// @Summary Update MCI Policy
// @Description Update MCI Policy
// @Tags [Infra service] MCI Auto control policy management (WIP)
// @Tags [MC-Infra] MCI Auto control policy management (WIP)
// @Accept json
// @Produce json
// @Param mciInfo body MciPolicyInfo true "Details for an MCI Policy object"
Expand All @@ -149,7 +149,7 @@ func RestPutMciPolicy(c echo.Context) error {
// @ID DelMciPolicy
// @Summary Delete MCI Policy
// @Description Delete MCI Policy
// @Tags [Infra service] MCI Auto control policy management (WIP)
// @Tags [MC-Infra] MCI Auto control policy management (WIP)
// @Accept json
// @Produce json
// @Param nsId path string true "Namespace ID" default(ns01)
Expand All @@ -174,7 +174,7 @@ func RestDelMciPolicy(c echo.Context) error {
// @ID DelAllMciPolicy
// @Summary Delete all MCI policies
// @Description Delete all MCI policies
// @Tags [Infra service] MCI Auto control policy management (WIP)
// @Tags [MC-Infra] MCI Auto control policy management (WIP)
// @Accept json
// @Produce json
// @Param nsId path string true "Namespace ID" default(ns01)
Expand Down
16 changes: 8 additions & 8 deletions src/api/rest/server/mci/provisioning.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
// @ID PostMci
// @Summary Create MCI
// @Description Create MCI
// @Tags [Infra service] MCI Provisioning management
// @Tags [MC-Infra] MCI Provisioning management
// @Accept json
// @Produce json
// @Param nsId path string true "Namespace ID" default(ns01)
Expand Down Expand Up @@ -56,7 +56,7 @@ func RestPostMci(c echo.Context) error {
// @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 [Infra service] MCI Provisioning management
// @Tags [MC-Infra] MCI Provisioning management
// @Accept json
// @Produce json
// @Param nsId path string true "Namespace ID" default(ns01)
Expand Down Expand Up @@ -86,7 +86,7 @@ func RestPostRegisterCSPNativeVM(c echo.Context) error {
// @ID PostSystemMci
// @Summary Create System MCI Dynamically for Special Purpose in NS:system-purpose-common-ns
// @Description Create System MCI Dynamically for Special Purpose
// @Tags [Infra service] MCI Provisioning management
// @Tags [MC-Infra] MCI Provisioning management
// @Accept json
// @Produce json
// @Param option query string false "Option for the purpose of system MCI" Enums(probe)
Expand Down Expand Up @@ -114,7 +114,7 @@ func RestPostSystemMci(c echo.Context) error {
// @ID PostMciDynamic
// @Summary Create MCI Dynamically
// @Description Create MCI Dynamically from common spec and image
// @Tags [Infra service] MCI Provisioning management
// @Tags [MC-Infra] MCI Provisioning management
// @Accept json
// @Produce json
// @Param nsId path string true "Namespace ID" default(ns01)
Expand Down Expand Up @@ -147,7 +147,7 @@ func RestPostMciDynamic(c echo.Context) error {
// @ID PostMciVmDynamic
// @Summary Create VM Dynamically and add it to MCI
// @Description Create VM Dynamically and add it to MCI
// @Tags [Infra service] MCI Provisioning management
// @Tags [MC-Infra] MCI Provisioning management
// @Accept json
// @Produce json
// @Param nsId path string true "Namespace ID" default(ns01)
Expand Down Expand Up @@ -178,7 +178,7 @@ func RestPostMciVmDynamic(c echo.Context) error {
// @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 [Infra service] MCI Provisioning management
// @Tags [MC-Infra] MCI Provisioning management
// @Accept json
// @Produce json
// @Param mciReq body MciConnectionConfigCandidatesReq true "Details for MCI dynamic request information"
Expand All @@ -204,7 +204,7 @@ func RestPostMciDynamicCheckRequest(c echo.Context) error {
// @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 [Infra service] MCI Provisioning management
// @Tags [MC-Infra] MCI Provisioning management
// @Accept json
// @Produce json
// @Param nsId path string true "Namespace ID" default(ns01)
Expand Down Expand Up @@ -234,7 +234,7 @@ func RestPostMciVm(c echo.Context) error {
// @ID PostMciSubGroupScaleOut
// @Summary ScaleOut subGroup in specified MCI
// @Description ScaleOut subGroup in specified MCI
// @Tags [Infra service] MCI Provisioning management
// @Tags [MC-Infra] MCI Provisioning management
// @Accept json
// @Produce json
// @Param nsId path string true "Namespace ID" default(ns01)
Expand Down
4 changes: 2 additions & 2 deletions src/api/rest/server/mci/recommendation.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
// @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 [Infra service] MCI Provisioning management
// @Tags [MC-Infra] MCI Provisioning management
// @Accept json
// @Produce json
// @Param deploymentPlan body mci.DeploymentPlan false "Recommend MCI plan (filter and priority)"
Expand Down Expand Up @@ -62,7 +62,7 @@ type RestPostMciRecommendResponse struct {
// func RestPostMciRecommend(c echo.Context) error {
// // @Summary Get MCI recommendation
// // @Description Get MCI recommendation
// // @Tags [Infra service] MCI Provisioning management
// // @Tags [MC-Infra] MCI Provisioning management
// // @Accept json
// // @Produce json
// // @Param nsId path string true "Namespace ID" default(ns01)
Expand Down
8 changes: 4 additions & 4 deletions src/api/rest/server/mci/remoteCommand.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
// @ID PostCmdMci
// @Summary Send a command to specified MCI
// @Description Send a command to specified MCI
// @Tags [Infra service] MCI Remote command
// @Tags [MC-Infra] MCI Remote command
// @Accept json
// @Produce json
// @Param nsId path string true "Namespace ID" default(ns01)
Expand Down Expand Up @@ -79,7 +79,7 @@ func RestPostCmdMci(c echo.Context) error {
// @ID SetBastionNodes
// @Summary Set bastion nodes for a VM
// @Description Set bastion nodes for a VM
// @Tags [Infra service] MCI Remote command
// @Tags [MC-Infra] MCI Remote command
// @Accept json
// @Produce json
// @Param nsId path string true "Namespace ID" default(ns01)
Expand Down Expand Up @@ -108,7 +108,7 @@ func RestSetBastionNodes(c echo.Context) error {
// @ID GetBastionNodes
// @Summary Get bastion nodes for a VM
// @Description Get bastion nodes for a VM
// @Tags [Infra service] MCI Remote command
// @Tags [MC-Infra] MCI Remote command
// @Accept json
// @Produce json
// @Param nsId path string true "Namespace ID" default(ns01)
Expand All @@ -135,7 +135,7 @@ func RestGetBastionNodes(c echo.Context) error {
// @ID RemoveBastionNodes
// @Summary Remove a bastion VM from all vNets
// @Description Remove a bastion VM from all vNets
// @Tags [Infra service] MCI Remote command
// @Tags [MC-Infra] MCI Remote command
// @Accept json
// @Produce json
// @Param nsId path string true "Namespace ID" default(ns01)
Expand Down
Loading

0 comments on commit 8892bb3

Please sign in to comment.