Merge pull request elastic/elasticsearch#2334 from areek/fix/x_pack_prefix_license
Add _xpack prefix to license endpoints Original commit: elastic/x-pack-elasticsearch@efba1a661d
This commit is contained in:
commit
c01e47990f
|
@ -140,12 +140,12 @@ def smoke_test_release(release, files, expected_hash):
|
|||
|
||||
# put the supplied license to ensure that system was built with
|
||||
license = read_fully(os.path.join(os.path.dirname(__file__), 'license.json'))
|
||||
conn.request('PUT', '/_license?acknowledge=true', license, headers=headers)
|
||||
conn.request('PUT', '/_xpack/license?acknowledge=true', license, headers=headers)
|
||||
res = conn.getresponse()
|
||||
# reading the result, so we can execute the next request on the same connection
|
||||
license_resp = json.loads(res.read().decode('utf-8'))
|
||||
if res.status != 200:
|
||||
raise RuntimeError('Could not PUT _license, got status %s' % res.status)
|
||||
raise RuntimeError('Could not PUT _xpack/license, got status %s' % res.status)
|
||||
if license_resp['license_status'] != 'valid':
|
||||
raise RuntimeError('Expected license to be valid, but was %s' % license_resp['license_status'])
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ public class RestDeleteLicenseAction extends BaseRestHandler {
|
|||
@Inject
|
||||
public RestDeleteLicenseAction(Settings settings, RestController controller, Client client) {
|
||||
super(settings, client);
|
||||
controller.registerHandler(DELETE, "/_license", this);
|
||||
controller.registerHandler(DELETE, "/_xpack/license", this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -34,7 +34,7 @@ public class RestGetLicenseAction extends BaseRestHandler {
|
|||
@Inject
|
||||
public RestGetLicenseAction(Settings settings, RestController controller, Client client) {
|
||||
super(settings, client);
|
||||
controller.registerHandler(GET, "/_license", this);
|
||||
controller.registerHandler(GET, "/_xpack/license", this);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -30,8 +30,8 @@ public class RestPutLicenseAction extends BaseRestHandler {
|
|||
@Inject
|
||||
public RestPutLicenseAction(Settings settings, RestController controller, Client client) {
|
||||
super(settings, client);
|
||||
controller.registerHandler(PUT, "/_license", this);
|
||||
controller.registerHandler(POST, "/_license", this);
|
||||
controller.registerHandler(PUT, "/_xpack/license", this);
|
||||
controller.registerHandler(POST, "/_xpack/license", this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
"documentation": "https://www.elastic.co/guide/en/shield/current/license-management.html",
|
||||
"methods": ["DELETE"],
|
||||
"url": {
|
||||
"path": "/_license",
|
||||
"paths": ["/_license"],
|
||||
"path": "/_xpack/license",
|
||||
"paths": ["/_xpack/license"],
|
||||
"parts" : {}
|
||||
},
|
||||
"body": null
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
"documentation": "https://www.elastic.co/guide/en/shield/current/license-management.html",
|
||||
"methods": ["GET"],
|
||||
"url": {
|
||||
"path": "/_license",
|
||||
"paths": ["/_license"],
|
||||
"path": "/_xpack/license",
|
||||
"paths": ["/_xpack/license"],
|
||||
"parts" : {
|
||||
},
|
||||
"params": {
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
"documentation": "https://www.elastic.co/guide/en/shield/current/license-management.html",
|
||||
"methods": ["PUT", "POST"],
|
||||
"url": {
|
||||
"path": "/_license",
|
||||
"paths": ["/_license"],
|
||||
"path": "/_xpack/license",
|
||||
"paths": ["/_xpack/license"],
|
||||
"parts" : {
|
||||
},
|
||||
"params": {
|
||||
|
|
Loading…
Reference in New Issue