Skip to content

Commit

Permalink
Merge pull request #878 from jihoon-seo/211019_Update_vNet_mgmt_feature
Browse files Browse the repository at this point in the history
Add subnet mgmt feature & REST APIs
  • Loading branch information
seokho-son authored Oct 21, 2021
2 parents 2fac59e + 0b7579f commit cc46a1d
Show file tree
Hide file tree
Showing 26 changed files with 1,540 additions and 189 deletions.
188 changes: 151 additions & 37 deletions src/api/rest/docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -4008,6 +4008,104 @@ var doc = `{
}
}
},
"/ns/{nsId}/resources/vNet/{vNetId}/subnet": {
"post": {
"description": "Create Subnet",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"[MCIR] Network management"
],
"summary": "Create Subnet",
"parameters": [
{
"type": "string",
"description": "Namespace ID",
"name": "nsId",
"in": "path",
"required": true
},
{
"description": "Details for an Subnet object",
"name": "subnetReq",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/mcir.TbSubnetReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/mcir.TbSubnetInfo"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/common.SimpleMsg"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/common.SimpleMsg"
}
}
}
}
},
"/ns/{nsId}/resources/vNet/{vNetId}/subnet/{subnetId}": {
"delete": {
"description": "Delete Subnet",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"[MCIR] Network management"
],
"summary": "Delete Subnet",
"parameters": [
{
"type": "string",
"description": "Namespace ID",
"name": "nsId",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Subnet ID",
"name": "subnetId",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/common.SimpleMsg"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/common.SimpleMsg"
}
}
}
}
},
"/ns/{nsId}/testRecommendVm": {
"post": {
"description": "Recommend MCIS plan (filter and priority)",
Expand Down Expand Up @@ -4950,41 +5048,6 @@ var doc = `{
}
}
},
"mcir.SpiderSubnetInfo": {
"type": "object",
"properties": {
"iid": {
"description": "{NameId, SystemId}",
"$ref": "#/definitions/common.IID"
},
"ipv4_CIDR": {
"type": "string"
},
"keyValueList": {
"type": "array",
"items": {
"$ref": "#/definitions/common.KeyValue"
}
}
}
},
"mcir.SpiderSubnetReqInfo": {
"type": "object",
"properties": {
"ipv4_CIDR": {
"type": "string"
},
"keyValueList": {
"type": "array",
"items": {
"$ref": "#/definitions/common.KeyValue"
}
},
"name": {
"type": "string"
}
}
},
"mcir.SpiderVCpuInfo": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -5352,6 +5415,57 @@ var doc = `{
}
}
},
"mcir.TbSubnetInfo": {
"type": "object",
"required": [
"ipv4_CIDR",
"name"
],
"properties": {
"description": {
"type": "string"
},
"id": {
"type": "string"
},
"ipv4_CIDR": {
"type": "string"
},
"keyValueList": {
"type": "array",
"items": {
"$ref": "#/definitions/common.KeyValue"
}
},
"name": {
"type": "string"
}
}
},
"mcir.TbSubnetReq": {
"type": "object",
"required": [
"ipv4_CIDR",
"name"
],
"properties": {
"description": {
"type": "string"
},
"ipv4_CIDR": {
"type": "string"
},
"keyValueList": {
"type": "array",
"items": {
"$ref": "#/definitions/common.KeyValue"
}
},
"name": {
"type": "string"
}
}
},
"mcir.TbVNetInfo": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -5397,7 +5511,7 @@ var doc = `{
"subnetInfoList": {
"type": "array",
"items": {
"$ref": "#/definitions/mcir.SpiderSubnetInfo"
"$ref": "#/definitions/mcir.TbSubnetInfo"
}
}
}
Expand All @@ -5424,7 +5538,7 @@ var doc = `{
"subnetInfoList": {
"type": "array",
"items": {
"$ref": "#/definitions/mcir.SpiderSubnetReqInfo"
"$ref": "#/definitions/mcir.TbSubnetReq"
}
}
}
Expand Down
Loading

0 comments on commit cc46a1d

Please sign in to comment.