Skip to content

Commit

Permalink
Select the most appropriate VM OS image based on Levenshtein Distance
Browse files Browse the repository at this point in the history
  • Loading branch information
cb-github-robot authored May 30, 2024
2 parents a794850 + 6282de4 commit 4873b50
Show file tree
Hide file tree
Showing 8 changed files with 269 additions and 120 deletions.
29 changes: 4 additions & 25 deletions api/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,6 @@ const docTemplate = `{
],
"summary": "Migrate an infrastructure on a cloud platform",
"parameters": [
{
"type": "string",
"description": "Namespace ID",
"name": "nsId",
"in": "path",
"required": true
},
{
"description": "Specify network, disk, compute, security group, virtual machine, etc.",
"name": "InfrastructureInfo",
Expand Down Expand Up @@ -125,13 +118,6 @@ const docTemplate = `{
],
"summary": "Get the migrated infrastructure on a cloud platform",
"parameters": [
{
"type": "string",
"description": "a namespace ID",
"name": "nsId",
"in": "path",
"required": true
},
{
"type": "string",
"description": "a infrastructure ID created for migration",
Expand Down Expand Up @@ -174,13 +160,6 @@ const docTemplate = `{
],
"summary": "Delete the migrated infrastructure on a cloud platform",
"parameters": [
{
"type": "string",
"description": "a namespace ID",
"name": "nsId",
"in": "path",
"required": true
},
{
"type": "string",
"description": "a infrastructure ID created for migration",
Expand Down Expand Up @@ -221,7 +200,7 @@ const docTemplate = `{
"application/json"
],
"tags": [
"[Namespace] Namespace management"
"[Namespace] Namespace management (To be used)"
],
"summary": "List all namespaces or namespaces' ID",
"responses": {
Expand Down Expand Up @@ -269,7 +248,7 @@ const docTemplate = `{
"application/json"
],
"tags": [
"[Namespace] Namespace management"
"[Namespace] Namespace management (To be used)"
],
"summary": "Create namespace",
"parameters": [
Expand Down Expand Up @@ -315,7 +294,7 @@ const docTemplate = `{
"application/json"
],
"tags": [
"[Namespace] Namespace management"
"[Namespace] Namespace management (To be used)"
],
"summary": "Get namespace",
"parameters": [
Expand Down Expand Up @@ -358,7 +337,7 @@ const docTemplate = `{
"application/json"
],
"tags": [
"[Namespace] Namespace management"
"[Namespace] Namespace management (To be used)"
],
"summary": "Delete namespace",
"parameters": [
Expand Down
29 changes: 4 additions & 25 deletions api/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,6 @@
],
"summary": "Migrate an infrastructure on a cloud platform",
"parameters": [
{
"type": "string",
"description": "Namespace ID",
"name": "nsId",
"in": "path",
"required": true
},
{
"description": "Specify network, disk, compute, security group, virtual machine, etc.",
"name": "InfrastructureInfo",
Expand Down Expand Up @@ -118,13 +111,6 @@
],
"summary": "Get the migrated infrastructure on a cloud platform",
"parameters": [
{
"type": "string",
"description": "a namespace ID",
"name": "nsId",
"in": "path",
"required": true
},
{
"type": "string",
"description": "a infrastructure ID created for migration",
Expand Down Expand Up @@ -167,13 +153,6 @@
],
"summary": "Delete the migrated infrastructure on a cloud platform",
"parameters": [
{
"type": "string",
"description": "a namespace ID",
"name": "nsId",
"in": "path",
"required": true
},
{
"type": "string",
"description": "a infrastructure ID created for migration",
Expand Down Expand Up @@ -214,7 +193,7 @@
"application/json"
],
"tags": [
"[Namespace] Namespace management"
"[Namespace] Namespace management (To be used)"
],
"summary": "List all namespaces or namespaces' ID",
"responses": {
Expand Down Expand Up @@ -262,7 +241,7 @@
"application/json"
],
"tags": [
"[Namespace] Namespace management"
"[Namespace] Namespace management (To be used)"
],
"summary": "Create namespace",
"parameters": [
Expand Down Expand Up @@ -308,7 +287,7 @@
"application/json"
],
"tags": [
"[Namespace] Namespace management"
"[Namespace] Namespace management (To be used)"
],
"summary": "Get namespace",
"parameters": [
Expand Down Expand Up @@ -351,7 +330,7 @@
"application/json"
],
"tags": [
"[Namespace] Namespace management"
"[Namespace] Namespace management (To be used)"
],
"summary": "Delete namespace",
"parameters": [
Expand Down
23 changes: 4 additions & 19 deletions api/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1030,11 +1030,6 @@ paths:
- application/json
description: It migrates an infrastructure on a cloud platform.
parameters:
- description: Namespace ID
in: path
name: nsId
required: true
type: string
- description: Specify network, disk, compute, security group, virtual machine,
etc.
in: body
Expand Down Expand Up @@ -1066,11 +1061,6 @@ paths:
- application/json
description: It deletes the migrated infrastructure on a cloud platform.
parameters:
- description: a namespace ID
in: path
name: nsId
required: true
type: string
- description: a infrastructure ID created for migration
in: path
name: infraId
Expand Down Expand Up @@ -1100,11 +1090,6 @@ paths:
- application/json
description: It gets the migrated infrastructure on a cloud platform.
parameters:
- description: a namespace ID
in: path
name: nsId
required: true
type: string
- description: a infrastructure ID created for migration
in: path
name: infraId
Expand Down Expand Up @@ -1157,7 +1142,7 @@ paths:
$ref: '#/definitions/common.SimpleMsg'
summary: List all namespaces or namespaces' ID
tags:
- '[Namespace] Namespace management'
- '[Namespace] Namespace management (To be used)'
post:
consumes:
- application/json
Expand Down Expand Up @@ -1186,7 +1171,7 @@ paths:
$ref: '#/definitions/common.SimpleMsg'
summary: Create namespace
tags:
- '[Namespace] Namespace management'
- '[Namespace] Namespace management (To be used)'
/ns/{nsId}:
delete:
consumes:
Expand All @@ -1212,7 +1197,7 @@ paths:
$ref: '#/definitions/common.SimpleMsg'
summary: Delete namespace
tags:
- '[Namespace] Namespace management'
- '[Namespace] Namespace management (To be used)'
get:
consumes:
- application/json
Expand Down Expand Up @@ -1241,7 +1226,7 @@ paths:
$ref: '#/definitions/common.SimpleMsg'
summary: Get namespace
tags:
- '[Namespace] Namespace management'
- '[Namespace] Namespace management (To be used)'
/readyz:
get:
consumes:
Expand Down
12 changes: 6 additions & 6 deletions pkg/api/rest/common/namespace.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ import (
// // RestDelAllNs godoc
// // @Summary Delete all namespaces
// // @Description Delete all namespaces
// // @Tags [Namespace] Namespace management
// // @Tags [Namespace] Namespace management (To be used)
// // @Accept json
// // @Produce json
// // @Success 200 {object} common.SimpleMsg
Expand All @@ -68,7 +68,7 @@ import (
// RestDeleteNs godoc
// @Summary Delete namespace
// @Description Delete namespace
// @Tags [Namespace] Namespace management
// @Tags [Namespace] Namespace management (To be used)
// @Accept json
// @Produce json
// @Param nsId path string true "Namespace ID" default(ns01)
Expand Down Expand Up @@ -110,7 +110,7 @@ type JSONResult struct {
// RestGetAllNs godoc
// @Summary List all namespaces or namespaces' ID
// @Description List all namespaces or namespaces' ID
// @Tags [Namespace] Namespace management
// @Tags [Namespace] Namespace management (To be used)
// @Accept json
// @Produce json
// @Success 200 {object} JSONResult{[DEFAULT]=RestGetAllNsResponse,[ID]=common.IdList} "Different return structures by the given option param"
Expand All @@ -137,7 +137,7 @@ func RestGetAllNs(c echo.Context) error {
// RestGetNs godoc
// @Summary Get namespace
// @Description Get namespace
// @Tags [Namespace] Namespace management
// @Tags [Namespace] Namespace management (To be used)
// @Accept json
// @Produce json
// @Param nsId path string true "Namespace ID" default(ns01)
Expand Down Expand Up @@ -172,7 +172,7 @@ func RestGetNs(c echo.Context) error {
// RestPostNs godoc
// @Summary Create namespace
// @Description Create namespace
// @Tags [Namespace] Namespace management
// @Tags [Namespace] Namespace management (To be used)
// @Accept json
// @Produce json
// @Param nsReq body common.NsReq true "Details for a new namespace"
Expand Down Expand Up @@ -205,7 +205,7 @@ func RestPostNs(c echo.Context) error {
// // RestPutNs godoc
// // @Summary Update namespace
// // @Description Update namespace
// // @Tags [Namespace] Namespace management
// // @Tags [Namespace] Namespace management (To be used)
// // @Accept json
// // @Produce json
// // @Param nsId path string true "Namespace ID" default(ns01)
Expand Down
Loading

0 comments on commit 4873b50

Please sign in to comment.