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

Tidy redundant comments & prints #1084

Merged
merged 5 commits into from
May 2, 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
4 changes: 2 additions & 2 deletions src/api/grpc/request/mcirapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ type TbSecurityGroupCreateRequest struct {
// }

// SpiderSecurityRuleInfo
// type SpiderSecurityRuleInfo struct { // Spider
// type SpiderSecurityRuleInfo struct {
// FromPort string `yaml:"fromPort" json:"fromPort"`
// ToPort string `yaml:"toPort" json:"toPort"`
// IPProtocol string `yaml:"ipProtocol" json:"ipProtocol"`
Expand Down Expand Up @@ -198,7 +198,7 @@ type TbVNetCreateRequest struct {
// }

// SpiderSubnetReqInfo
// type SpiderSubnetReqInfo struct { // Spider
// type SpiderSubnetReqInfo struct {
// Name string `yaml:"Name" json:"Name"`
// IPv4_CIDR string `yaml:"IPv4_CIDR" json:"IPv4_CIDR"`
// KeyValueList []KeyValue `yaml:"KeyValueList" json:"KeyValueList"`
Expand Down
4 changes: 2 additions & 2 deletions src/api/grpc/request/mcisapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,13 @@ type TbVmInfo struct {
// }

// RegionInfo is for Region 정보 구조 정의
// type RegionInfo struct { // Spider
// type RegionInfo struct {
// Region string `yaml:"Region" json:"Region"`
// Zone string `yaml:"Zone" json:"Zone"`
// }

// SpiderVMInfo is for VM 정보 구조 정의
// type SpiderVMInfo struct { // Spider
// type SpiderVMInfo struct {
// // Fields for request
// Name string `yaml:"Name" json:"Name"`
// ImageName string `yaml:"ImageName" json:"ImageName"`
Expand Down
2 changes: 0 additions & 2 deletions src/api/grpc/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,6 @@ func RunServer() {
gs.GracefulStop()
}(&wg)

//fmt.Printf("\n[CB-Tumblebug: Multi-Cloud Infra Service Management]")
//fmt.Printf("\n Initiating GRPC API Server....__^..^__....")
fmt.Printf("⇨ grpc server started on [::]%s\n", tumblebugsrv.Addr)

if err := gs.Serve(conn); err != nil {
Expand Down
203 changes: 179 additions & 24 deletions src/api/rest/docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -4758,7 +4758,53 @@ const docTemplate = `{
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/common.IdList"
"$ref": "#/definitions/mcis.RegisterResourceResult"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/common.SimpleMsg"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/common.SimpleMsg"
}
}
}
}
},
"/registerCspResourcesAll": {
"post": {
"description": "Register CSP Native Resources (vNet, securityGroup, sshKey, vm) from all Clouds to CB-Tumblebug",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"[Admin] System management"
],
"summary": "Register CSP Native Resources (vNet, securityGroup, sshKey, vm) from all Clouds to CB-Tumblebug",
"parameters": [
{
"description": "Specify NS Id and MCIS Name",
"name": "Request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/common.RestRegisterCspNativeResourcesRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/mcis.RegisterResourceAllResult"
}
},
"404": {
Expand Down Expand Up @@ -6189,32 +6235,14 @@ const docTemplate = `{
"connectionName": {
"type": "string"
},
"resourceOverview": {
"$ref": "#/definitions/mcis.resourceCountOverview"
},
"resourceType": {
"type": "string"
},
"resourcesOnCsp": {
"type": "array",
"items": {
"$ref": "#/definitions/mcis.resourceOnCsp"
}
},
"resourcesOnCspOnly": {
"type": "array",
"items": {
"$ref": "#/definitions/mcis.resourceOnCsp"
}
},
"resourcesOnSpider": {
"type": "array",
"items": {
"$ref": "#/definitions/mcis.resourceOnSpider"
}
},
"resourcesOnTumblebug": {
"type": "array",
"items": {
"$ref": "#/definitions/mcis.resourceOnTumblebug"
}
"resources": {
"$ref": "#/definitions/mcis.resourcesByManageType"
},
"systemMessage": {
"type": "string"
Expand Down Expand Up @@ -6510,6 +6538,37 @@ const docTemplate = `{
}
}
},
"mcis.RegisterResourceAllResult": {
"type": "object",
"properties": {
"registerationResult": {
"type": "array",
"items": {
"$ref": "#/definitions/mcis.RegisterResourceResult"
}
}
}
},
"mcis.RegisterResourceResult": {
"type": "object",
"properties": {
"connectionName": {
"type": "string"
},
"elapsedTime": {
"type": "integer"
},
"registerationOutputs": {
"$ref": "#/definitions/common.IdList"
},
"registerationOverview": {
"$ref": "#/definitions/mcis.registerationOverview"
},
"systemMessage": {
"type": "string"
}
}
},
"mcis.RestGetAllBenchmarkRequest": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -7220,7 +7279,58 @@ const docTemplate = `{
}
}
},
"mcis.registerationOverview": {
"type": "object",
"properties": {
"failed": {
"type": "integer"
},
"securityGroup": {
"type": "integer"
},
"sshKey": {
"type": "integer"
},
"vNet": {
"type": "integer"
},
"vm": {
"type": "integer"
}
}
},
"mcis.resourceCountOverview": {
"type": "object",
"properties": {
"onCspOnly": {
"type": "integer"
},
"onCspTotal": {
"type": "integer"
},
"onSpider": {
"type": "integer"
},
"onTumblebug": {
"type": "integer"
}
}
},
"mcis.resourceOnCsp": {
"type": "object",
"properties": {
"count": {
"type": "integer"
},
"info": {
"type": "array",
"items": {
"$ref": "#/definitions/mcis.resourceOnCspInfo"
}
}
}
},
"mcis.resourceOnCspInfo": {
"type": "object",
"properties": {
"idByCsp": {
Expand All @@ -7232,6 +7342,20 @@ const docTemplate = `{
}
},
"mcis.resourceOnSpider": {
"type": "object",
"properties": {
"count": {
"type": "integer"
},
"info": {
"type": "array",
"items": {
"$ref": "#/definitions/mcis.resourceOnSpiderInfo"
}
}
}
},
"mcis.resourceOnSpiderInfo": {
"type": "object",
"properties": {
"idByCsp": {
Expand All @@ -7243,6 +7367,20 @@ const docTemplate = `{
}
},
"mcis.resourceOnTumblebug": {
"type": "object",
"properties": {
"count": {
"type": "integer"
},
"info": {
"type": "array",
"items": {
"$ref": "#/definitions/mcis.resourceOnTumblebugInfo"
}
}
}
},
"mcis.resourceOnTumblebugInfo": {
"type": "object",
"properties": {
"idByCsp": {
Expand All @@ -7261,6 +7399,23 @@ const docTemplate = `{
"type": "string"
}
}
},
"mcis.resourcesByManageType": {
"type": "object",
"properties": {
"onCspOnly": {
"$ref": "#/definitions/mcis.resourceOnCsp"
},
"onCspTotal": {
"$ref": "#/definitions/mcis.resourceOnCsp"
},
"onSpider": {
"$ref": "#/definitions/mcis.resourceOnSpider"
},
"onTumblebug": {
"$ref": "#/definitions/mcis.resourceOnTumblebug"
}
}
}
},
"securityDefinitions": {
Expand Down
Loading