From 76f0ce1d2c67d7eb95d021806379cfb336964823 Mon Sep 17 00:00:00 2001
From: licanwei
Date: Fri, 10 May 2019 10:51:37 +0800
Subject: [PATCH] Add force field to api-ref
Change-Id: Iddea2359a13ba099e840b9501d4e9335905695f4
Implements: blueprint add-force-field-to-audit
---
api-ref/source/parameters.yaml | 7 +++++++
api-ref/source/samples/audit-cancel-response.json | 1 +
.../source/samples/audit-create-request-continuous.json | 1 +
api-ref/source/samples/audit-create-request-oneshot.json | 3 ++-
api-ref/source/samples/audit-create-response.json | 1 +
api-ref/source/samples/audit-list-detailed-response.json | 1 +
api-ref/source/samples/audit-show-response.json | 1 +
api-ref/source/samples/audit-update-response.json | 1 +
api-ref/source/watcher-api-v1-audits.inc | 6 ++++++
9 files changed, 21 insertions(+), 1 deletion(-)
diff --git a/api-ref/source/parameters.yaml b/api-ref/source/parameters.yaml
index 9d8ee2401..6df5171e5 100644
--- a/api-ref/source/parameters.yaml
+++ b/api-ref/source/parameters.yaml
@@ -245,6 +245,13 @@ audit_endtime_resp:
required: false
type: string
min_version: 1.1
+audit_force:
+ description: |
+ Launch audit even if action plan is ongoing.
+ in: body
+ required: false
+ type: boolean
+ min_version: 1.2
audit_goal:
description: |
The UUID or name of the Goal.
diff --git a/api-ref/source/samples/audit-cancel-response.json b/api-ref/source/samples/audit-cancel-response.json
index 4d6cd3b13..2784be37d 100644
--- a/api-ref/source/samples/audit-cancel-response.json
+++ b/api-ref/source/samples/audit-cancel-response.json
@@ -28,6 +28,7 @@
}
},
"auto_trigger": false,
+ "force": false,
"uuid": "65a5da84-5819-4aea-8278-a28d2b489028",
"goal_name": "workload_balancing",
"scope": [],
diff --git a/api-ref/source/samples/audit-create-request-continuous.json b/api-ref/source/samples/audit-create-request-continuous.json
index aa3dac451..cd8048e4c 100644
--- a/api-ref/source/samples/audit-create-request-continuous.json
+++ b/api-ref/source/samples/audit-create-request-continuous.json
@@ -1,5 +1,6 @@
{
"auto_trigger": false,
+ "force": false,
"audit_template_uuid": "76fddfee-a9c4-40b0-8da0-c19ad6904f09",
"name": "test_audit",
"parameters": {
diff --git a/api-ref/source/samples/audit-create-request-oneshot.json b/api-ref/source/samples/audit-create-request-oneshot.json
index 8fa1d0f00..0019840cf 100644
--- a/api-ref/source/samples/audit-create-request-oneshot.json
+++ b/api-ref/source/samples/audit-create-request-oneshot.json
@@ -1,5 +1,6 @@
{
"audit_type": "ONESHOT",
"auto_trigger": false,
+ "force": true,
"audit_template_uuid": "5e70a156-ced7-4012-b1c6-88fcb02ee0c1"
-}
\ No newline at end of file
+}
diff --git a/api-ref/source/samples/audit-create-response.json b/api-ref/source/samples/audit-create-response.json
index 8e31e74da..3c11bc52d 100644
--- a/api-ref/source/samples/audit-create-response.json
+++ b/api-ref/source/samples/audit-create-response.json
@@ -28,6 +28,7 @@
}
},
"auto_trigger": false,
+ "force": false,
"uuid": "65a5da84-5819-4aea-8278-a28d2b489028",
"goal_name": "workload_balancing",
"scope": [],
diff --git a/api-ref/source/samples/audit-list-detailed-response.json b/api-ref/source/samples/audit-list-detailed-response.json
index e86a3f01b..5d1de5d0f 100644
--- a/api-ref/source/samples/audit-list-detailed-response.json
+++ b/api-ref/source/samples/audit-list-detailed-response.json
@@ -30,6 +30,7 @@
}
},
"auto_trigger": false,
+ "force": false,
"uuid": "65a5da84-5819-4aea-8278-a28d2b489028",
"goal_name": "workload_balancing",
"scope": [],
diff --git a/api-ref/source/samples/audit-show-response.json b/api-ref/source/samples/audit-show-response.json
index 39257a68f..a4e7bf201 100644
--- a/api-ref/source/samples/audit-show-response.json
+++ b/api-ref/source/samples/audit-show-response.json
@@ -28,6 +28,7 @@
}
},
"auto_trigger": false,
+ "force": false,
"uuid": "65a5da84-5819-4aea-8278-a28d2b489028",
"goal_name": "workload_balancing",
"scope": [],
diff --git a/api-ref/source/samples/audit-update-response.json b/api-ref/source/samples/audit-update-response.json
index 4d6cd3b13..2784be37d 100644
--- a/api-ref/source/samples/audit-update-response.json
+++ b/api-ref/source/samples/audit-update-response.json
@@ -28,6 +28,7 @@
}
},
"auto_trigger": false,
+ "force": false,
"uuid": "65a5da84-5819-4aea-8278-a28d2b489028",
"goal_name": "workload_balancing",
"scope": [],
diff --git a/api-ref/source/watcher-api-v1-audits.inc b/api-ref/source/watcher-api-v1-audits.inc
index 014996c3f..6f738aacd 100644
--- a/api-ref/source/watcher-api-v1-audits.inc
+++ b/api-ref/source/watcher-api-v1-audits.inc
@@ -47,6 +47,7 @@ Request
- auto_trigger: audit_autotrigger
- start_time: audit_starttime_req
- end_time: audit_endtime_req
+ - force: audit_force
**Example ONESHOT Audit creation request:**
@@ -83,6 +84,7 @@ version 1:
- hostname: audit_hostname
- start_time: audit_starttime_resp
- end_time: audit_endtime_resp
+ - force: audit_force
**Example JSON representation of an Audit:**
@@ -181,6 +183,7 @@ Response
- hostname: audit_hostname
- start_time: audit_starttime_resp
- end_time: audit_endtime_resp
+ - force: audit_force
**Example JSON representation of an Audit:**
@@ -227,6 +230,7 @@ Response
- hostname: audit_hostname
- start_time: audit_starttime_resp
- end_time: audit_endtime_resp
+ - force: audit_force
**Example JSON representation of an Audit:**
@@ -281,6 +285,7 @@ version 1:
- hostname: audit_hostname
- start_time: audit_starttime_resp
- end_time: audit_endtime_resp
+ - force: audit_force
**Example JSON representation of an Audit:**
@@ -335,6 +340,7 @@ Response
- hostname: audit_hostname
- start_time: audit_starttime_resp
- end_time: audit_endtime_resp
+ - force: audit_force
**Example JSON representation of an Audit:**