Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Workflow] Update Swagger REST API doc #1056

Merged
merged 1 commit into from
Apr 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 98 additions & 1 deletion src/api/rest/docs/docs.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Package docs GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
// Package docs GENERATED BY SWAG; DO NOT EDIT
// This file was generated by swaggo/swag
package docs

Expand Down Expand Up @@ -2198,6 +2198,68 @@ const docTemplate = `{
}
}
},
"/ns/{nsId}/network/mcis/{mcisId}": {
"post": {
"description": "Configure Cloud Adaptive Network (cb-network agent) to MCIS",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"[Infra service] MCIS Cloud Adaptive Network (for developer)"
],
"summary": "Configure Cloud Adaptive Network (cb-network agent) to MCIS",
"parameters": [
{
"type": "string",
"default": "ns01",
"description": "Namespace ID",
"name": "nsId",
"in": "path",
"required": true
},
{
"type": "string",
"default": "mcis01",
"description": "MCIS ID",
"name": "mcisId",
"in": "path",
"required": true
},
{
"description": "Details for the network request body",
"name": "networkReq",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/mcis.NetworkReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/mcis.AgentInstallContentWrapper"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/common.SimpleMsg"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/common.SimpleMsg"
}
}
}
}
},
"/ns/{nsId}/policy/mcis": {
"get": {
"description": "List all MCIS policies",
Expand Down Expand Up @@ -6103,6 +6165,26 @@ const docTemplate = `{
}
}
},
"mcis.NetworkReq": {
"type": "object",
"properties": {
"etcdEndpoints": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"PUBLIC_IP_1:2379",
"PUBLIC_IP_2:2379",
"..."
]
},
"serviceEndpoint": {
"type": "string",
"example": "localhost:8053"
}
}
},
"mcis.Operation": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -6543,6 +6625,16 @@ const docTemplate = `{
"mcis.TbMcisInfo": {
"type": "object",
"properties": {
"configureCloudAdaptiveNetwork": {
"description": "ConfigureCloudAdaptiveNetwork is an option to configure Cloud Adaptive Network (CLADNet) ([yes/no] default:yes)",
"type": "string",
"default": "no",
"enum": [
"yes",
"no"
],
"example": "yes"
},
"description": {
"type": "string"
},
Expand Down Expand Up @@ -6724,6 +6816,11 @@ const docTemplate = `{
"name": {
"type": "string"
},
"networkAgentStatus": {
"description": "NetworkAgent status",
"type": "string",
"example": "[notInstalled, installing, installed, failed]"
},
"privateDNS": {
"type": "string"
},
Expand Down
97 changes: 97 additions & 0 deletions src/api/rest/docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -2190,6 +2190,68 @@
}
}
},
"/ns/{nsId}/network/mcis/{mcisId}": {
"post": {
"description": "Configure Cloud Adaptive Network (cb-network agent) to MCIS",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"[Infra service] MCIS Cloud Adaptive Network (for developer)"
],
"summary": "Configure Cloud Adaptive Network (cb-network agent) to MCIS",
"parameters": [
{
"type": "string",
"default": "ns01",
"description": "Namespace ID",
"name": "nsId",
"in": "path",
"required": true
},
{
"type": "string",
"default": "mcis01",
"description": "MCIS ID",
"name": "mcisId",
"in": "path",
"required": true
},
{
"description": "Details for the network request body",
"name": "networkReq",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/mcis.NetworkReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/mcis.AgentInstallContentWrapper"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/common.SimpleMsg"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/common.SimpleMsg"
}
}
}
}
},
"/ns/{nsId}/policy/mcis": {
"get": {
"description": "List all MCIS policies",
Expand Down Expand Up @@ -6095,6 +6157,26 @@
}
}
},
"mcis.NetworkReq": {
"type": "object",
"properties": {
"etcdEndpoints": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"PUBLIC_IP_1:2379",
"PUBLIC_IP_2:2379",
"..."
]
},
"serviceEndpoint": {
"type": "string",
"example": "localhost:8053"
}
}
},
"mcis.Operation": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -6535,6 +6617,16 @@
"mcis.TbMcisInfo": {
"type": "object",
"properties": {
"configureCloudAdaptiveNetwork": {
"description": "ConfigureCloudAdaptiveNetwork is an option to configure Cloud Adaptive Network (CLADNet) ([yes/no] default:yes)",
"type": "string",
"default": "no",
"enum": [
"yes",
"no"
],
"example": "yes"
},
"description": {
"type": "string"
},
Expand Down Expand Up @@ -6716,6 +6808,11 @@
"name": {
"type": "string"
},
"networkAgentStatus": {
"description": "NetworkAgent status",
"type": "string",
"example": "[notInstalled, installing, installed, failed]"
},
"privateDNS": {
"type": "string"
},
Expand Down
69 changes: 69 additions & 0 deletions src/api/rest/docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -963,6 +963,20 @@ definitions:
nsId:
type: string
type: object
mcis.NetworkReq:
properties:
etcdEndpoints:
example:
- PUBLIC_IP_1:2379
- PUBLIC_IP_2:2379
- '...'
items:
type: string
type: array
serviceEndpoint:
example: localhost:8053
type: string
type: object
mcis.Operation:
properties:
operand:
Expand Down Expand Up @@ -1276,6 +1290,15 @@ definitions:
type: object
mcis.TbMcisInfo:
properties:
configureCloudAdaptiveNetwork:
default: "no"
description: ConfigureCloudAdaptiveNetwork is an option to configure Cloud
Adaptive Network (CLADNet) ([yes/no] default:yes)
enum:
- "yes"
- "no"
example: "yes"
type: string
description:
type: string
id:
Expand Down Expand Up @@ -1416,6 +1439,10 @@ definitions:
type: string
name:
type: string
networkAgentStatus:
description: NetworkAgent status
example: '[notInstalled, installing, installed, failed]'
type: string
privateDNS:
type: string
privateIP:
Expand Down Expand Up @@ -3102,6 +3129,48 @@ paths:
(cpu, memory, disk, network)
tags:
- '[Infra service] MCIS Resource monitor (for developer)'
/ns/{nsId}/network/mcis/{mcisId}:
post:
consumes:
- application/json
description: Configure Cloud Adaptive Network (cb-network agent) to MCIS
parameters:
- default: ns01
description: Namespace ID
in: path
name: nsId
required: true
type: string
- default: mcis01
description: MCIS ID
in: path
name: mcisId
required: true
type: string
- description: Details for the network request body
in: body
name: networkReq
required: true
schema:
$ref: '#/definitions/mcis.NetworkReq'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/mcis.AgentInstallContentWrapper'
"404":
description: Not Found
schema:
$ref: '#/definitions/common.SimpleMsg'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/common.SimpleMsg'
summary: Configure Cloud Adaptive Network (cb-network agent) to MCIS
tags:
- '[Infra service] MCIS Cloud Adaptive Network (for developer)'
/ns/{nsId}/policy/mcis:
delete:
consumes:
Expand Down