aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormaopeng zhang <zhang.maopeng1@zte.com.cn>2017-08-26 07:48:31 +0000
committerGerrit Code Review <gerrit@onap.org>2017-08-26 07:48:31 +0000
commit538871695bdd5e55a8a3fdf4886bd804c19f3f87 (patch)
treef1c5ea43f2d527162d9ecc3b7f78b4e4e8fbea07
parent5a28eee4a8a2af8b6dd40d4e51eec74a3459a031 (diff)
parent6064cbde7436bfcba7407b307d390fcdfd045339 (diff)
Merge "Fix VFC swagger bug"
-rw-r--r--lcm/swagger/vfc.nslcm.swagger.json91
-rw-r--r--lcm/swagger/vfc.others.swagger.json50
-rw-r--r--lcm/swagger/views.py2
3 files changed, 116 insertions, 27 deletions
diff --git a/lcm/swagger/vfc.nslcm.swagger.json b/lcm/swagger/vfc.nslcm.swagger.json
index 75cc6bab..528ec672 100644
--- a/lcm/swagger/vfc.nslcm.swagger.json
+++ b/lcm/swagger/vfc.nslcm.swagger.json
@@ -249,34 +249,35 @@
}
},
"/jobs/{jobId}": {
- "post": {
+ "get": {
"tags": [
"job"
],
"summary": "jobstatus",
"description": "",
- "operationId": "jobstatus",
+ "operationId": "get_jobstatus",
"parameters": [
{
"required": true,
"type": "string",
- "description": "",
+ "description": "job Id",
"name": "jobId",
"in": "path"
},
{
- "in": "body",
- "name": "body",
- "description": "request param",
"required": true,
- "schema": {
- "$ref": "#/definitions/JobProgressRequest"
- }
+ "type": "string",
+ "description": "job response message id",
+ "name": "responseId",
+ "in": "query"
}
],
"responses": {
"202": {
- "description": ""
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/JobDetailInfo"
+ }
}
}
}
@@ -410,20 +411,7 @@
}
}
},
- "JobProgressRequest": {
- "type": "object",
- "properties": {
- "progress": {
- "type": "string"
- },
- "desc": {
- "type": "string"
- },
- "errcode": {
- "type": "string"
- }
- }
- },
+
"NsInfo": {
"type": "object",
"properties": {
@@ -532,6 +520,61 @@
"type": "string"
}
}
+ },
+ "jobResponseInfo": {
+ "type": "object",
+ "properties": {
+ "status": {
+ "type": "string"
+ },
+ "progress":{
+ "type": "string"
+ },
+ "statusDescription": {
+ "type": "string"
+ },
+ "errorCode": {
+ "type": "string"
+ },
+ "responseId": {
+ "type": "string"
+ }
+ }
+ },
+ "JobDetailInfo":{
+ "type": "object",
+ "properties": {
+ "jobId": {
+ "type": "string"
+ },
+ "responseDescriptor":
+ {
+ "type":"object",
+ "properties": {
+ "status": {
+ "type": "string"
+ },
+ "progress":{
+ "type": "string"
+ },
+ "statusDescription": {
+ "type": "string"
+ },
+ "errorCode": {
+ "type": "string"
+ },
+ "responseId": {
+ "type": "string"
+ },
+ "responseHistoryList": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/jobResponseInfo"
+ }
+ }
+ }
+ }
+ }
}
}
} \ No newline at end of file
diff --git a/lcm/swagger/vfc.others.swagger.json b/lcm/swagger/vfc.others.swagger.json
index 9be74901..f6b48fbb 100644
--- a/lcm/swagger/vfc.others.swagger.json
+++ b/lcm/swagger/vfc.others.swagger.json
@@ -108,7 +108,40 @@
}
}
}
+ },
+ "/jobs/{jobId}": {
+ "post": {
+ "tags": [
+ "job"
+ ],
+ "summary": "jobstatus",
+ "description": "",
+ "operationId": "post_jobprogress",
+ "parameters": [
+ {
+ "required": true,
+ "type": "string",
+ "description": "",
+ "name": "jobId",
+ "in": "path"
+ },
+ {
+ "in": "body",
+ "name": "body",
+ "description": "request param",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/JobProgressRequest"
+ }
+ }
+ ],
+ "responses": {
+ "202": {
+ "description": ""
+ }
+ }
}
+ }
},
"definitions": {
@@ -120,9 +153,20 @@
}
}
},
-
-
-
+ "JobProgressRequest": {
+ "type": "object",
+ "properties": {
+ "progress": {
+ "type": "string"
+ },
+ "desc": {
+ "type": "string"
+ },
+ "errcode": {
+ "type": "string"
+ }
+ }
+ },
"TableInfo": {
"type": "object",
"properties": {
diff --git a/lcm/swagger/views.py b/lcm/swagger/views.py
index 8386bf05..fdef8aed 100644
--- a/lcm/swagger/views.py
+++ b/lcm/swagger/views.py
@@ -64,7 +64,9 @@ class SwaggerJsonView(APIView):
json_data_temp = json.JSONDecoder().decode(f.read())
f.close()
+ json_data_jobtemp=json_data["paths"]["/jobs/{jobId}"]
json_data["paths"].update(json_data_temp["paths"])
+ json_data["paths"]["/jobs/{jobId}"].update(json_data_jobtemp)
json_data["definitions"].update(json_data_temp["definitions"])
return Response(json_data)