Skip to content

Commit

Permalink
_xpack/license -> _license
Browse files Browse the repository at this point in the history
  • Loading branch information
jbudz committed Jan 28, 2019
1 parent 9c1a6ec commit 0cc008c
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion x-pack/plugins/license_management/server/lib/license.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/

const getLicensePath = (acknowledge) => `/_xpack/license${ acknowledge ? '?acknowledge=true' : ''}`;
const getLicensePath = (acknowledge) => `/_license${ acknowledge ? '?acknowledge=true' : ''}`;

export async function putLicense(req, xpackInfo) {
const { acknowledge } = req.query;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/

const getStartBasicPath = (acknowledge) => `/_xpack/license/start_basic${ acknowledge ? '?acknowledge=true' : ''}`;
const getStartBasicPath = (acknowledge) => `/_license/start_basic${ acknowledge ? '?acknowledge=true' : ''}`;


export async function startBasic(req, xpackInfo) {
Expand Down
4 changes: 2 additions & 2 deletions x-pack/plugins/license_management/server/lib/start_trial.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export async function canStartTrial(req) {
const { callWithRequest } = req.server.plugins.elasticsearch.getCluster('admin');
const options = {
method: 'GET',
path: '/_xpack/license/trial_status'
path: '/_license/trial_status'
};
try {
const response = await callWithRequest(req, 'transport.request', options);
Expand All @@ -22,7 +22,7 @@ export async function startTrial(req, xpackInfo) {
const { callWithRequest } = req.server.plugins.elasticsearch.getCluster('admin');
const options = {
method: 'POST',
path: '/_xpack/license/start_trial?acknowledge=true'
path: '/_license/start_trial?acknowledge=true'
};
try {
/*eslint camelcase: 0*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const LicenseUpdateInfoForRemote = ({ isPrimaryCluster }) => {
</p>
<EuiSpacer />
<EuiCodeBlock>
{`curl -XPUT -u <user> 'https://<host>:<port>/_xpack/license' -H 'Content-Type: application/json' -d @license.json`}
{`curl -XPUT -u <user> 'https://<host>:<port>/_license' -H 'Content-Type: application/json' -d @license.json`}
</EuiCodeBlock>
</EuiPanel>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
function mockGetXPackLicense(callCluster, license) {
callCluster.withArgs('transport.request', {
method: 'GET',
path: '/_xpack/license',
path: '/_license',
query: {
local: 'true'
}
Expand Down Expand Up @@ -54,7 +54,7 @@ describe('get_xpack', () => {

describe('getXPackLicense', () => {

it('uses callCluster to get /_xpack/license API', async () => {
it('uses callCluster to get /_license API', async () => {
const response = { type: 'basic' };
const callCluster = sinon.stub();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { TIMEOUT } from './constants';
/**
* Get the cluster stats from the connected cluster.
*
* This is the equivalent of GET /_xpack/license?local=true .
* This is the equivalent of GET /_license?local=true .
*
* Like any X-Pack related API, X-Pack must installed for this to work.
*
Expand All @@ -19,7 +19,7 @@ import { TIMEOUT } from './constants';
export function getXPackLicense(callCluster) {
return callCluster('transport.request', {
method: 'GET',
path: '/_xpack/license',
path: '/_license',
query: {
// Fetching the local license is cheaper than getting it from the master and good enough
local: 'true'
Expand Down Expand Up @@ -51,7 +51,7 @@ export function getXPackUsage(callCluster) {
/**
* Combine the X-Pack responses into a single response as Monitoring does already.
*
* @param {Object} license The license returned from /_xpack/license
* @param {Object} license The license returned from /_license
* @param {Object} usage The usage details returned from /_xpack/usage
* @return {Object} An object containing both the license and usage.
*/
Expand Down

0 comments on commit 0cc008c

Please sign in to comment.