From b03647e593fc8efa0fba4f3662ff8d56b8a54ca2 Mon Sep 17 00:00:00 2001 From: Lee Hinman Date: Thu, 30 Jan 2020 16:17:50 -0700 Subject: [PATCH] Add xpack/basic scope to SLM documentation (#51711) This adds the required ``` [role="xpack"] [testenv="basic"] ``` To the top of the SLM documentation Relates to #51678 --- docs/reference/slm/apis/slm-delete.asciidoc | 4 +++- docs/reference/slm/apis/slm-execute-retention.asciidoc | 4 +++- docs/reference/slm/apis/slm-execute.asciidoc | 4 +++- docs/reference/slm/apis/slm-get-status.asciidoc | 4 +++- docs/reference/slm/apis/slm-get.asciidoc | 4 +++- docs/reference/slm/apis/slm-put.asciidoc | 4 +++- docs/reference/slm/apis/slm-start.asciidoc | 4 +++- docs/reference/slm/apis/slm-stats.asciidoc | 4 +++- docs/reference/slm/apis/slm-stop.asciidoc | 4 +++- 9 files changed, 27 insertions(+), 9 deletions(-) diff --git a/docs/reference/slm/apis/slm-delete.asciidoc b/docs/reference/slm/apis/slm-delete.asciidoc index b02eecfc6be9..df9b6b0a4a3a 100644 --- a/docs/reference/slm/apis/slm-delete.asciidoc +++ b/docs/reference/slm/apis/slm-delete.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="basic"] [[slm-api-delete-policy]] === Delete snapshot lifecycle policy API ++++ @@ -64,4 +66,4 @@ PUT /_slm/policy/daily-snapshots -------------------------------------------------- DELETE /_slm/policy/daily-snapshots -------------------------------------------------- -// TEST[continued] \ No newline at end of file +// TEST[continued] diff --git a/docs/reference/slm/apis/slm-execute-retention.asciidoc b/docs/reference/slm/apis/slm-execute-retention.asciidoc index 1ff4efd6be32..c912df36d5d3 100644 --- a/docs/reference/slm/apis/slm-execute-retention.asciidoc +++ b/docs/reference/slm/apis/slm-execute-retention.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="basic"] [[slm-api-execute-retention]] === Execute snapshot retention policy API ++++ @@ -34,4 +36,4 @@ To force removal of expired snapshots: POST /_slm/_execute_retention -------------------------------------------------- -Retention runs asynchronously in the background. \ No newline at end of file +Retention runs asynchronously in the background. diff --git a/docs/reference/slm/apis/slm-execute.asciidoc b/docs/reference/slm/apis/slm-execute.asciidoc index f764f0419bb5..d2fcd1e937c5 100644 --- a/docs/reference/slm/apis/slm-execute.asciidoc +++ b/docs/reference/slm/apis/slm-execute.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="basic"] [[slm-api-execute-lifecycle]] === Execute snapshot lifecycle policy API ++++ @@ -58,4 +60,4 @@ If successful, this request returns the generated snapshot name: The snapshot is taken in the background. You can use the<> to monitor the status of the snapshot. -To see the status of a policy's most recent snapshot, you can use the <>. \ No newline at end of file +To see the status of a policy's most recent snapshot, you can use the <>. diff --git a/docs/reference/slm/apis/slm-get-status.asciidoc b/docs/reference/slm/apis/slm-get-status.asciidoc index bda8a77f0505..9b1be5869c94 100644 --- a/docs/reference/slm/apis/slm-get-status.asciidoc +++ b/docs/reference/slm/apis/slm-get-status.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="basic"] [[slm-api-get-status]] === Get {slm} status API @@ -50,4 +52,4 @@ The API returns the following result: "operation_mode": "RUNNING" } -------------------------------------------------- -// TESTRESPONSE[s/"operation_mode": "RUNNING"/"operation_mode": $body.operation_mode/] \ No newline at end of file +// TESTRESPONSE[s/"operation_mode": "RUNNING"/"operation_mode": $body.operation_mode/] diff --git a/docs/reference/slm/apis/slm-get.asciidoc b/docs/reference/slm/apis/slm-get.asciidoc index c0614dc820c3..31e1b5c189f9 100644 --- a/docs/reference/slm/apis/slm-get.asciidoc +++ b/docs/reference/slm/apis/slm-get.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="basic"] [[slm-api-get-policy]] === Get snapshot lifecycle policy API ++++ @@ -121,4 +123,4 @@ This request returns the following response: -------------------------------------------------- GET /_slm/policy -------------------------------------------------- -// TEST[continued] \ No newline at end of file +// TEST[continued] diff --git a/docs/reference/slm/apis/slm-put.asciidoc b/docs/reference/slm/apis/slm-put.asciidoc index 0c253aaafc94..fe74a1796c11 100644 --- a/docs/reference/slm/apis/slm-put.asciidoc +++ b/docs/reference/slm/apis/slm-put.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="basic"] [[slm-api-put-policy]] === Put snapshot lifecycle policy API ++++ @@ -174,4 +176,4 @@ PUT /_slm/policy/daily-snapshots <6> Optional retention configuration <7> Keep snapshots for 30 days <8> Always keep at least 5 successful snapshots, even if they're more than 30 days old -<9> Keep no more than 50 successful snapshots, even if they're less than 30 days old \ No newline at end of file +<9> Keep no more than 50 successful snapshots, even if they're less than 30 days old diff --git a/docs/reference/slm/apis/slm-start.asciidoc b/docs/reference/slm/apis/slm-start.asciidoc index db7be92b82b4..be0375980d8e 100644 --- a/docs/reference/slm/apis/slm-start.asciidoc +++ b/docs/reference/slm/apis/slm-start.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="basic"] [[slm-api-start]] === Start {slm} API @@ -48,4 +50,4 @@ If successful, this request returns: { "acknowledged": true } --------------------------------------------------- \ No newline at end of file +-------------------------------------------------- diff --git a/docs/reference/slm/apis/slm-stats.asciidoc b/docs/reference/slm/apis/slm-stats.asciidoc index 198ec813dbdb..62c52cc64850 100644 --- a/docs/reference/slm/apis/slm-stats.asciidoc +++ b/docs/reference/slm/apis/slm-stats.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="basic"] [[slm-api-get-stats]] === Get snapshot lifecycle stats API ++++ @@ -43,4 +45,4 @@ The API returns the following response: "total_snapshot_deletion_failures": 0 } -------------------------------------------------- -// TESTRESPONSE[s/runs": 13/runs": $body.retention_runs/ s/_failed": 0/_failed": $body.retention_failed/ s/_timed_out": 0/_timed_out": $body.retention_timed_out/ s/"1.4s"/$body.retention_deletion_time/ s/1404/$body.retention_deletion_time_millis/ s/total_snapshots_taken": 1/total_snapshots_taken": $body.total_snapshots_taken/ s/total_snapshots_failed": 1/total_snapshots_failed": $body.total_snapshots_failed/ s/"policy_stats": [.*]/"policy_stats": $body.policy_stats/] \ No newline at end of file +// TESTRESPONSE[s/runs": 13/runs": $body.retention_runs/ s/_failed": 0/_failed": $body.retention_failed/ s/_timed_out": 0/_timed_out": $body.retention_timed_out/ s/"1.4s"/$body.retention_deletion_time/ s/1404/$body.retention_deletion_time_millis/ s/total_snapshots_taken": 1/total_snapshots_taken": $body.total_snapshots_taken/ s/total_snapshots_failed": 1/total_snapshots_failed": $body.total_snapshots_failed/ s/"policy_stats": [.*]/"policy_stats": $body.policy_stats/] diff --git a/docs/reference/slm/apis/slm-stop.asciidoc b/docs/reference/slm/apis/slm-stop.asciidoc index dacbe61ac7a1..6ca07b5b22ca 100644 --- a/docs/reference/slm/apis/slm-stop.asciidoc +++ b/docs/reference/slm/apis/slm-stop.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="basic"] [[slm-api-stop]] === Stop {slm} API @@ -45,4 +47,4 @@ include::{docdir}/rest-api/common-parms.asciidoc[tag=timeoutparms] [source,console] -------------------------------------------------- POST _slm/stop --------------------------------------------------- \ No newline at end of file +--------------------------------------------------