From 8ce212720d4a4b9defc3274d989df2a535387a33 Mon Sep 17 00:00:00 2001 From: lcawl Date: Tue, 19 Jun 2018 14:27:18 -0700 Subject: [PATCH 1/3] [DOCS] Disables testing for license APIs --- x-pack/docs/build.gradle | 2 -- x-pack/docs/en/rest-api/license/delete-license.asciidoc | 1 + x-pack/docs/en/rest-api/license/update-license.asciidoc | 1 + 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/x-pack/docs/build.gradle b/x-pack/docs/build.gradle index e97faf12a6cd0..9abca910c5dfc 100644 --- a/x-pack/docs/build.gradle +++ b/x-pack/docs/build.gradle @@ -47,8 +47,6 @@ buildRestTests.expectedUnconvertedCandidates = [ 'en/watcher/trigger/schedule/weekly.asciidoc', 'en/watcher/trigger/schedule/yearly.asciidoc', 'en/watcher/troubleshooting.asciidoc', - 'en/rest-api/license/delete-license.asciidoc', - 'en/rest-api/license/update-license.asciidoc', 'en/rest-api/ml/delete-snapshot.asciidoc', 'en/rest-api/ml/forecast.asciidoc', 'en/rest-api/ml/get-bucket.asciidoc', diff --git a/x-pack/docs/en/rest-api/license/delete-license.asciidoc b/x-pack/docs/en/rest-api/license/delete-license.asciidoc index 24662664daa40..40ceaa2e7194d 100644 --- a/x-pack/docs/en/rest-api/license/delete-license.asciidoc +++ b/x-pack/docs/en/rest-api/license/delete-license.asciidoc @@ -41,3 +41,4 @@ When the license is successfully deleted, the API returns the following response "acknowledged": true } ------------------------------------------------------------ +// NOTCONSOLE \ No newline at end of file diff --git a/x-pack/docs/en/rest-api/license/update-license.asciidoc b/x-pack/docs/en/rest-api/license/update-license.asciidoc index 54c5539840772..0eebf4e70de2f 100644 --- a/x-pack/docs/en/rest-api/license/update-license.asciidoc +++ b/x-pack/docs/en/rest-api/license/update-license.asciidoc @@ -90,6 +90,7 @@ On Windows machine, use the following command: ------------------------------------------------------------ gc .\license.json | Invoke-WebRequest -uri http://:/_xpack/license -Credential elastic -Method Put -ContentType "application/json" ------------------------------------------------------------ +// NOTCONSOLE In these examples, From 14886d6178aed216fc698bc90e55ded0bd01e053 Mon Sep 17 00:00:00 2001 From: lcawl Date: Tue, 19 Jun 2018 14:37:00 -0700 Subject: [PATCH 2/3] [DOCS] Moves licensing APIs to docs --- .../licensing}/delete-license.asciidoc | 1 + .../licensing}/get-basic-status.asciidoc | 1 + .../reference/licensing}/get-license.asciidoc | 1 + .../licensing}/get-trial-status.asciidoc | 1 + docs/reference/licensing/index.asciidoc | 22 +++++++++++++++++++ .../reference/licensing}/start-basic.asciidoc | 1 + .../reference/licensing}/start-trial.asciidoc | 1 + .../licensing}/update-license.asciidoc | 3 ++- docs/reference/rest-api/index.asciidoc | 2 +- x-pack/docs/en/rest-api/licensing.asciidoc | 22 ------------------- 10 files changed, 31 insertions(+), 24 deletions(-) rename {x-pack/docs/en/rest-api/license => docs/reference/licensing}/delete-license.asciidoc (98%) rename {x-pack/docs/en/rest-api/license => docs/reference/licensing}/get-basic-status.asciidoc (98%) rename {x-pack/docs/en/rest-api/license => docs/reference/licensing}/get-license.asciidoc (99%) rename {x-pack/docs/en/rest-api/license => docs/reference/licensing}/get-trial-status.asciidoc (98%) create mode 100644 docs/reference/licensing/index.asciidoc rename {x-pack/docs/en/rest-api/license => docs/reference/licensing}/start-basic.asciidoc (99%) rename {x-pack/docs/en/rest-api/license => docs/reference/licensing}/start-trial.asciidoc (98%) rename {x-pack/docs/en/rest-api/license => docs/reference/licensing}/update-license.asciidoc (99%) delete mode 100644 x-pack/docs/en/rest-api/licensing.asciidoc diff --git a/x-pack/docs/en/rest-api/license/delete-license.asciidoc b/docs/reference/licensing/delete-license.asciidoc similarity index 98% rename from x-pack/docs/en/rest-api/license/delete-license.asciidoc rename to docs/reference/licensing/delete-license.asciidoc index 40ceaa2e7194d..b02406045a989 100644 --- a/x-pack/docs/en/rest-api/license/delete-license.asciidoc +++ b/docs/reference/licensing/delete-license.asciidoc @@ -1,4 +1,5 @@ [role="xpack"] +[testenv="basic"] [[delete-license]] === Delete License API diff --git a/x-pack/docs/en/rest-api/license/get-basic-status.asciidoc b/docs/reference/licensing/get-basic-status.asciidoc similarity index 98% rename from x-pack/docs/en/rest-api/license/get-basic-status.asciidoc rename to docs/reference/licensing/get-basic-status.asciidoc index c6c6385447ab3..a9cc9cf67add6 100644 --- a/x-pack/docs/en/rest-api/license/get-basic-status.asciidoc +++ b/docs/reference/licensing/get-basic-status.asciidoc @@ -1,4 +1,5 @@ [role="xpack"] +[testenv="basic"] [[get-basic-status]] === Get Basic Status API diff --git a/x-pack/docs/en/rest-api/license/get-license.asciidoc b/docs/reference/licensing/get-license.asciidoc similarity index 99% rename from x-pack/docs/en/rest-api/license/get-license.asciidoc rename to docs/reference/licensing/get-license.asciidoc index cba6e71057661..dbf847eb3f9ae 100644 --- a/x-pack/docs/en/rest-api/license/get-license.asciidoc +++ b/docs/reference/licensing/get-license.asciidoc @@ -1,4 +1,5 @@ [role="xpack"] +[testenv="basic"] [[get-license]] === Get License API diff --git a/x-pack/docs/en/rest-api/license/get-trial-status.asciidoc b/docs/reference/licensing/get-trial-status.asciidoc similarity index 98% rename from x-pack/docs/en/rest-api/license/get-trial-status.asciidoc rename to docs/reference/licensing/get-trial-status.asciidoc index b2cc1ce1b6c88..ec47782a3d2ee 100644 --- a/x-pack/docs/en/rest-api/license/get-trial-status.asciidoc +++ b/docs/reference/licensing/get-trial-status.asciidoc @@ -1,4 +1,5 @@ [role="xpack"] +[testenv="basic"] [[get-trial-status]] === Get Trial Status API diff --git a/docs/reference/licensing/index.asciidoc b/docs/reference/licensing/index.asciidoc new file mode 100644 index 0000000000000..a1dfd398acfe7 --- /dev/null +++ b/docs/reference/licensing/index.asciidoc @@ -0,0 +1,22 @@ +[role="xpack"] +[[licensing-apis]] +== Licensing APIs + +You can use the following APIs to manage your licenses: + +* <> +* <> +* <> +* <> +* <> +* <> +* <> + + +include::delete-license.asciidoc[] +include::get-license.asciidoc[] +include::get-trial-status.asciidoc[] +include::start-trial.asciidoc[] +include::get-basic-status.asciidoc[] +include::start-basic.asciidoc[] +include::update-license.asciidoc[] diff --git a/x-pack/docs/en/rest-api/license/start-basic.asciidoc b/docs/reference/licensing/start-basic.asciidoc similarity index 99% rename from x-pack/docs/en/rest-api/license/start-basic.asciidoc rename to docs/reference/licensing/start-basic.asciidoc index 820b2b5eab64a..3206dc0801f36 100644 --- a/x-pack/docs/en/rest-api/license/start-basic.asciidoc +++ b/docs/reference/licensing/start-basic.asciidoc @@ -1,4 +1,5 @@ [role="xpack"] +[testenv="basic"] [[start-basic]] === Start Basic API diff --git a/x-pack/docs/en/rest-api/license/start-trial.asciidoc b/docs/reference/licensing/start-trial.asciidoc similarity index 98% rename from x-pack/docs/en/rest-api/license/start-trial.asciidoc rename to docs/reference/licensing/start-trial.asciidoc index 341c72853fd08..ba1cc0d786693 100644 --- a/x-pack/docs/en/rest-api/license/start-trial.asciidoc +++ b/docs/reference/licensing/start-trial.asciidoc @@ -1,4 +1,5 @@ [role="xpack"] +[testenv="basic"] [[start-trial]] === Start Trial API diff --git a/x-pack/docs/en/rest-api/license/update-license.asciidoc b/docs/reference/licensing/update-license.asciidoc similarity index 99% rename from x-pack/docs/en/rest-api/license/update-license.asciidoc rename to docs/reference/licensing/update-license.asciidoc index 0eebf4e70de2f..b340cf3ed6ee5 100644 --- a/x-pack/docs/en/rest-api/license/update-license.asciidoc +++ b/docs/reference/licensing/update-license.asciidoc @@ -1,4 +1,5 @@ [role="xpack"] +[testenv="basic"] [[update-license]] === Update License API @@ -90,7 +91,6 @@ On Windows machine, use the following command: ------------------------------------------------------------ gc .\license.json | Invoke-WebRequest -uri http://:/_xpack/license -Credential elastic -Method Put -ContentType "application/json" ------------------------------------------------------------ -// NOTCONSOLE In these examples, @@ -124,6 +124,7 @@ receive the following response: } } ------------------------------------------------------------ +// NOTCONSOLE To complete the update, you must re-submit the API request and set the `acknowledge` parameter to `true`. For example: diff --git a/docs/reference/rest-api/index.asciidoc b/docs/reference/rest-api/index.asciidoc index b9d3c9db60a6f..e44eea9aa53f4 100644 --- a/docs/reference/rest-api/index.asciidoc +++ b/docs/reference/rest-api/index.asciidoc @@ -20,7 +20,7 @@ directly to configure and access {xpack} features. include::info.asciidoc[] include::{xes-repo-dir}/rest-api/graph/explore.asciidoc[] -include::{xes-repo-dir}/rest-api/licensing.asciidoc[] +include::{es-repo-dir}/licensing/index.asciidoc[] include::{xes-repo-dir}/rest-api/migration.asciidoc[] include::{xes-repo-dir}/rest-api/ml-api.asciidoc[] include::{xes-repo-dir}/rest-api/rollup-api.asciidoc[] diff --git a/x-pack/docs/en/rest-api/licensing.asciidoc b/x-pack/docs/en/rest-api/licensing.asciidoc deleted file mode 100644 index b30590630f7f9..0000000000000 --- a/x-pack/docs/en/rest-api/licensing.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[role="xpack"] -[[licensing-apis]] -== Licensing APIs - -You can use the following APIs to manage your licenses: - -* <> -* <> -* <> -* <> -* <> -* <> -* <> - - -include::license/delete-license.asciidoc[] -include::license/get-license.asciidoc[] -include::license/get-trial-status.asciidoc[] -include::license/start-trial.asciidoc[] -include::license/get-basic-status.asciidoc[] -include::license/start-basic.asciidoc[] -include::license/update-license.asciidoc[] From ce832eeb3f239e54b63cd97650c31ecf012d3dfa Mon Sep 17 00:00:00 2001 From: lcawl Date: Tue, 19 Jun 2018 14:58:47 -0700 Subject: [PATCH 3/3] [DOCS] Fixes test response in get license API --- docs/reference/licensing/get-license.asciidoc | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/docs/reference/licensing/get-license.asciidoc b/docs/reference/licensing/get-license.asciidoc index dbf847eb3f9ae..bf094d99f2f5a 100644 --- a/docs/reference/licensing/get-license.asciidoc +++ b/docs/reference/licensing/get-license.asciidoc @@ -53,11 +53,9 @@ GET _xpack/license "license" : { "status" : "active", "uid" : "cbff45e7-c553-41f7-ae4f-9205eabd80xx", - "type" : "trial", + "type" : "basic", "issue_date" : "2018-02-22T23:12:05.550Z", "issue_date_in_millis" : 1519341125550, - "expiry_date" : "2018-03-24T23:12:05.550Z", - "expiry_date_in_millis" : 1521933125550, "max_nodes" : 1000, "issued_to" : "test", "issuer" : "elasticsearch", @@ -66,11 +64,9 @@ GET _xpack/license } -------------------------------------------------- // TESTRESPONSE[s/"cbff45e7-c553-41f7-ae4f-9205eabd80xx"/$body.license.uid/] -// TESTRESPONSE[s/"trial"/$body.license.type/] +// TESTRESPONSE[s/"basic"/$body.license.type/] // TESTRESPONSE[s/"2018-02-22T23:12:05.550Z"/$body.license.issue_date/] // TESTRESPONSE[s/1519341125550/$body.license.issue_date_in_millis/] -// TESTRESPONSE[s/"2018-03-24T23:12:05.550Z"/$body.license.expiry_date/] -// TESTRESPONSE[s/1521933125550/$body.license.expiry_date_in_millis/] // TESTRESPONSE[s/1000/$body.license.max_nodes/] // TESTRESPONSE[s/"test"/$body.license.issued_to/] // TESTRESPONSE[s/"elasticsearch"/$body.license.issuer/]