summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCai Hui <cai.hui@zte.com.cn>2018-11-03 04:02:43 -0400
committerCai Hui <cai.hui@zte.com.cn>2018-11-05 01:02:50 -0500
commit9aa902863621269ba67e1edbf5b543b411e1b8a0 (patch)
tree5b9d29c60066756a0c15b8612908bf52d95677b7
parentca1c83094da703b486763eac3dfe36e2d8abf7b9 (diff)
Update jobs(v2) api-def
Fix some bugs of jobs(v2) in api-ref 1.The respense of "Show Jobs" is missing a "session_id" paramenter. 2.The files of job-create-request.json, job-update-request.json have a unnecessary items "project_id" 3.The "project_id" is a public paramenter in freezer_action, so changed its loaction in the files of job-get-response.json,job-list-response.json. Change-Id: I0e24a5d5eabb1323c53c5268bbeadf4418c11fae
Notes
Notes (review): Code-Review+2: Trinh Nguyen <dangtrinhnt@gmail.com> Code-Review+2: gecong <ge.cong@zte.com.cn> Workflow+1: gecong <ge.cong@zte.com.cn> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Tue, 06 Nov 2018 01:30:24 +0000 Reviewed-on: https://review.openstack.org/615372 Project: openstack/freezer-api Branch: refs/heads/master
-rw-r--r--api-ref/source/v2/jobs-v2.inc7
-rw-r--r--api-ref/source/v2/samples/job-create-request.json2
-rw-r--r--api-ref/source/v2/samples/job-get-response.json6
-rw-r--r--api-ref/source/v2/samples/job-update-request.json2
-rw-r--r--api-ref/source/v2/samples/jobs-list-response.json6
5 files changed, 10 insertions, 13 deletions
diff --git a/api-ref/source/v2/jobs-v2.inc b/api-ref/source/v2/jobs-v2.inc
index a1b2e80..f851acf 100644
--- a/api-ref/source/v2/jobs-v2.inc
+++ b/api-ref/source/v2/jobs-v2.inc
@@ -141,12 +141,13 @@ Response Parameters
141 141
142.. rest_parameters:: parameters.yaml 142.. rest_parameters:: parameters.yaml
143 143
144 - job_id: job_id
145 - client_id: client_id
144 - user_id: user_id 146 - user_id: user_id
147 - session_id: session_id
145 - description: job_description_req 148 - description: job_description_req
146 - job_schedule: job_schedule_req
147 - client_id: client_id
148 - job_actions: job_actions_req 149 - job_actions: job_actions_req
149 - job_id: job_id 150 - job_schedule: job_schedule_req
150 151
151Response Example 152Response Example
152---------------- 153----------------
diff --git a/api-ref/source/v2/samples/job-create-request.json b/api-ref/source/v2/samples/job-create-request.json
index e5ae2f7..45b2791 100644
--- a/api-ref/source/v2/samples/job-create-request.json
+++ b/api-ref/source/v2/samples/job-create-request.json
@@ -5,7 +5,6 @@
5 "status": "scheduled", 5 "status": "scheduled",
6 "event": "start" 6 "event": "start"
7 }, 7 },
8 "project_id": "752d8bd43d654e7a840bbfda77ce41af",
9 "job_actions": [ 8 "job_actions": [
10 { 9 {
11 "max_retries": 5, 10 "max_retries": 5,
@@ -19,7 +18,6 @@
19 "snapshot": true, 18 "snapshot": true,
20 "action": "backup", 19 "action": "backup",
21 "remove_older_than": 365, 20 "remove_older_than": 365,
22 "project_id": "752d8bd43d654e7a840bbfda77ce41af"
23 } 21 }
24 } 22 }
25] 23]
diff --git a/api-ref/source/v2/samples/job-get-response.json b/api-ref/source/v2/samples/job-get-response.json
index 117d100..bca1d94 100644
--- a/api-ref/source/v2/samples/job-get-response.json
+++ b/api-ref/source/v2/samples/job-get-response.json
@@ -1,4 +1,5 @@
1{ 1{
2 "project_id": "752d8bd43d654e7a840bbfda77ce41af",
2 "user_id": "0cd44caf6db5486b94a04b33256a5ff4", 3 "user_id": "0cd44caf6db5486b94a04b33256a5ff4",
3 "description": "Test-0001", 4 "description": "Test-0001",
4 "_version": 83, 5 "_version": 83,
@@ -14,7 +15,6 @@
14 "event": "" 15 "event": ""
15 }, 16 },
16 "client_id": "752d8bd43d654e7a840bbfda77ce41af_szaher", 17 "client_id": "752d8bd43d654e7a840bbfda77ce41af_szaher",
17 "project_id": "752d8bd43d654e7a840bbfda77ce41af",
18 "job_actions": 18 "job_actions":
19 [ 19 [
20 { 20 {
@@ -29,12 +29,12 @@
29 "snapshot": false, 29 "snapshot": false,
30 "action": "backup", 30 "action": "backup",
31 "remove_older_than": 365, 31 "remove_older_than": 365,
32 "project_id": "752d8bd43d654e7a840bbfda77ce41af"
33 }, 32 },
34 "max_retries": 5, 33 "max_retries": 5,
35 "max_retries_interval": 6, 34 "max_retries_interval": 6,
36 "user_id": "0cd44caf6db5486b94a04b33256a5ff4", 35 "user_id": "0cd44caf6db5486b94a04b33256a5ff4",
37 "action_id": "280d51d041ce4d4da8a386e96263f759" 36 "action_id": "280d51d041ce4d4da8a386e96263f759",
37 "project_id": "752d8bd43d654e7a840bbfda77ce41af"
38 } 38 }
39 ], 39 ],
40 "job_id": "0ae284d514eb47dd84154748b5056749" 40 "job_id": "0ae284d514eb47dd84154748b5056749"
diff --git a/api-ref/source/v2/samples/job-update-request.json b/api-ref/source/v2/samples/job-update-request.json
index c33f817..e10a3ea 100644
--- a/api-ref/source/v2/samples/job-update-request.json
+++ b/api-ref/source/v2/samples/job-update-request.json
@@ -5,7 +5,6 @@
5 "status": "scheduled", 5 "status": "scheduled",
6 "event": "stop" 6 "event": "stop"
7 }, 7 },
8 "project_id": "752d8bd43d654e7a840bbfda77ce41af",
9 "job_actions": [ 8 "job_actions": [
10 { 9 {
11 "max_retries": 10, 10 "max_retries": 10,
@@ -20,7 +19,6 @@
20 "snapshot": false, 19 "snapshot": false,
21 "action": "backup", 20 "action": "backup",
22 "remove_older_than": 365, 21 "remove_older_than": 365,
23 "project_id": "752d8bd43d654e7a840bbfda77ce41af"
24 } 22 }
25 } 23 }
26] 24]
diff --git a/api-ref/source/v2/samples/jobs-list-response.json b/api-ref/source/v2/samples/jobs-list-response.json
index ef52a67..55b2794 100644
--- a/api-ref/source/v2/samples/jobs-list-response.json
+++ b/api-ref/source/v2/samples/jobs-list-response.json
@@ -2,6 +2,7 @@
2 "jobs": 2 "jobs":
3 [ 3 [
4 { 4 {
5 "project_id": "752d8bd43d654e7a840bbfda77ce41af",
5 "user_id": "0cd44caf6db5486b94a04b33256a5ff4", 6 "user_id": "0cd44caf6db5486b94a04b33256a5ff4",
6 "description": "Test-0001", 7 "description": "Test-0001",
7 "job_schedule": 8 "job_schedule":
@@ -16,7 +17,6 @@
16 "event": "" 17 "event": ""
17 }, 18 },
18 "client_id": "752d8bd43d654e7a840bbfda77ce41af_szaher", 19 "client_id": "752d8bd43d654e7a840bbfda77ce41af_szaher",
19 "project_id": "752d8bd43d654e7a840bbfda77ce41af",
20 "job_actions": 20 "job_actions":
21 [ 21 [
22 { 22 {
@@ -31,12 +31,12 @@
31 "snapshot": false, 31 "snapshot": false,
32 "action": "backup", 32 "action": "backup",
33 "remove_older_than": 365, 33 "remove_older_than": 365,
34 "project_id": "752d8bd43d654e7a840bbfda77ce41af"
35 }, 34 },
36 "max_retries": 5, 35 "max_retries": 5,
37 "max_retries_interval": 6, 36 "max_retries_interval": 6,
38 "user_id": "0cd44caf6db5486b94a04b33256a5ff4", 37 "user_id": "0cd44caf6db5486b94a04b33256a5ff4",
39 "action_id": "280d51d041ce4d4da8a386e96263f759" 38 "action_id": "280d51d041ce4d4da8a386e96263f759",
39 "project_id": "752d8bd43d654e7a840bbfda77ce41af"
40 } 40 }
41 ], 41 ],
42 "job_id": "0ae284d514eb47dd84154748b5056749" 42 "job_id": "0ae284d514eb47dd84154748b5056749"