-
Notifications
You must be signed in to change notification settings - Fork 25k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resurrect _xpack/license routes #73930
Merged
joegallo
merged 2 commits into
elastic:master
from
joegallo:resurrect-xpack-license-routes
Jun 9, 2021
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
x-pack/plugin/src/yamlRestCompatTest/resources/rest-api-spec/api/xpack-license.delete.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"xpack-license.delete":{ | ||
"documentation":{ | ||
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-license.html", | ||
"description":"Deletes licensing information for the cluster" | ||
}, | ||
"stability":"stable", | ||
"visibility":"public", | ||
"headers":{ | ||
"accept": [ "application/vnd.elasticsearch+json;compatible-with=7"] | ||
}, | ||
"url":{ | ||
"paths":[ | ||
{ | ||
"path":"/_xpack/license", | ||
"methods":[ | ||
"DELETE" | ||
], | ||
"deprecated":{ | ||
"version":"7.0.0", | ||
"description":"all _xpack prefix have been deprecated" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} |
38 changes: 38 additions & 0 deletions
38
x-pack/plugin/src/yamlRestCompatTest/resources/rest-api-spec/api/xpack-license.get.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"xpack-license.get":{ | ||
"documentation":{ | ||
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/get-license.html", | ||
"description":"Retrieves licensing information for the cluster" | ||
}, | ||
"stability":"stable", | ||
"visibility":"public", | ||
"headers":{ | ||
"accept": [ "application/vnd.elasticsearch+json;compatible-with=7"] | ||
}, | ||
"url":{ | ||
"paths":[ | ||
{ | ||
"path":"/_xpack/license", | ||
"methods":[ | ||
"GET" | ||
], | ||
"deprecated":{ | ||
"version":"7.0.0", | ||
"description":"all _xpack prefix have been deprecated" | ||
} | ||
} | ||
] | ||
}, | ||
"params":{ | ||
"local":{ | ||
"type":"boolean", | ||
"description":"Return local information, do not retrieve the state from master node (default: false)" | ||
}, | ||
"accept_enterprise":{ | ||
"type":"boolean", | ||
"description":"Supported for backwards compatibility with 7.x. If this param is used it must be set to true", | ||
"deprecated":true | ||
} | ||
} | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
...in/src/yamlRestCompatTest/resources/rest-api-spec/api/xpack-license.get_basic_status.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"xpack-license.get_basic_status":{ | ||
"documentation":{ | ||
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/get-basic-status.html", | ||
"description":"Retrieves information about the status of the basic license." | ||
}, | ||
"stability":"stable", | ||
"visibility":"public", | ||
"headers":{ | ||
"accept": [ "application/vnd.elasticsearch+json;compatible-with=7"] | ||
}, | ||
"url":{ | ||
"paths":[ | ||
{ | ||
"path":"/_xpack/license/basic_status", | ||
"methods":[ | ||
"GET" | ||
], | ||
"deprecated":{ | ||
"version":"7.0.0", | ||
"description":"all _xpack prefix have been deprecated" | ||
} | ||
} | ||
] | ||
}, | ||
"params":{} | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
...in/src/yamlRestCompatTest/resources/rest-api-spec/api/xpack-license.get_trial_status.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"xpack-license.get_trial_status":{ | ||
"documentation":{ | ||
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/get-trial-status.html", | ||
"description":"Retrieves information about the status of the trial license." | ||
}, | ||
"stability":"stable", | ||
"visibility":"public", | ||
"headers":{ | ||
"accept": [ "application/vnd.elasticsearch+json;compatible-with=7"] | ||
}, | ||
"url":{ | ||
"paths":[ | ||
{ | ||
"path":"/_xpack/license/trial_status", | ||
"methods":[ | ||
"GET" | ||
], | ||
"deprecated":{ | ||
"version":"7.0.0", | ||
"description":"all _xpack prefix have been deprecated" | ||
} | ||
} | ||
] | ||
}, | ||
"params":{} | ||
} | ||
} |
38 changes: 38 additions & 0 deletions
38
x-pack/plugin/src/yamlRestCompatTest/resources/rest-api-spec/api/xpack-license.post.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"xpack-license.post":{ | ||
"documentation":{ | ||
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/update-license.html", | ||
"description":"Updates the license for the cluster." | ||
}, | ||
"stability":"stable", | ||
"visibility":"public", | ||
"headers":{ | ||
"accept": [ "application/vnd.elasticsearch+json;compatible-with=7"], | ||
"content_type": ["application/vnd.elasticsearch+json;compatible-with=7"] | ||
}, | ||
"url":{ | ||
"paths":[ | ||
{ | ||
"path":"/_xpack/license", | ||
"methods":[ | ||
"PUT", | ||
"POST" | ||
], | ||
"deprecated":{ | ||
"version":"7.0.0", | ||
"description":"all _xpack prefix have been deprecated" | ||
} | ||
} | ||
] | ||
}, | ||
"params":{ | ||
"acknowledge":{ | ||
"type":"boolean", | ||
"description":"whether the user has acknowledged acknowledge messages (default: false)" | ||
} | ||
}, | ||
"body":{ | ||
"description":"licenses to be installed" | ||
} | ||
} | ||
} |
33 changes: 33 additions & 0 deletions
33
...in/src/yamlRestCompatTest/resources/rest-api-spec/api/xpack-license.post_start_basic.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"xpack-license.post_start_basic":{ | ||
"documentation":{ | ||
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/start-basic.html", | ||
"description":"Starts an indefinite basic license." | ||
}, | ||
"stability":"stable", | ||
"visibility":"public", | ||
"headers":{ | ||
"accept": [ "application/vnd.elasticsearch+json;compatible-with=7"] | ||
}, | ||
"url":{ | ||
"paths":[ | ||
{ | ||
"path":"/_xpack/license/start_basic", | ||
"methods":[ | ||
"POST" | ||
], | ||
"deprecated":{ | ||
"version":"7.0.0", | ||
"description":"all _xpack prefix have been deprecated" | ||
} | ||
} | ||
] | ||
}, | ||
"params":{ | ||
"acknowledge":{ | ||
"type":"boolean", | ||
"description":"whether the user has acknowledged acknowledge messages (default: false)" | ||
} | ||
} | ||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
...in/src/yamlRestCompatTest/resources/rest-api-spec/api/xpack-license.post_start_trial.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"xpack-license.post_start_trial":{ | ||
"documentation":{ | ||
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/start-trial.html", | ||
"description":"starts a limited time trial license." | ||
}, | ||
"stability":"stable", | ||
"visibility":"public", | ||
"headers":{ | ||
"accept": [ "application/vnd.elasticsearch+json;compatible-with=7"] | ||
}, | ||
"url":{ | ||
"paths":[ | ||
{ | ||
"path":"/_xpack/license/start_trial", | ||
"methods":[ | ||
"POST" | ||
], | ||
"deprecated":{ | ||
"version":"7.0.0", | ||
"description":"all _xpack prefix have been deprecated" | ||
} | ||
} | ||
] | ||
}, | ||
"params":{ | ||
"type":{ | ||
"type":"string", | ||
"description":"The type of trial license to generate (default: \"trial\")" | ||
}, | ||
"acknowledge":{ | ||
"type":"boolean", | ||
"description":"whether the user has acknowledged acknowledge messages (default: false)" | ||
} | ||
} | ||
} | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be allowed or just warnings ? I think we can require it since the modified spec only has the deprecated variant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ooh, good point. I'll check!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, I looked into this for a little while, and I don't think just warnings ends up working very well for this, at least as it's currently written.
It requires a test name (see the
InjectWarnings
constructor), which works well enough on its own, but we also (sometimes) need to allow warnings on thedo
sections withinsetup
orteardown
, and that happens to end up being the case here.That's not to say that we couldn't rework the machinery a bit to make that possible, but it's more than just a tweak on this PR.