From 0b9021ee87270a9ff4d11064230dc143595afda0 Mon Sep 17 00:00:00 2001 From: Areek Zillur Date: Tue, 18 Aug 2015 16:05:29 -0400 Subject: [PATCH] Add license acknowledgment mechanism for consumer plugins to notify users when they attempt to install a new license closes elastic/elasticsearch#461 Original commit: elastic/x-pack-elasticsearch@bc30ac2871694f864efb77f811c06a89ef202aa8 --- .../java/org/elasticsearch/marvel/license/LicenseService.java | 2 +- .../elasticsearch/marvel/license/LicenseIntegrationTests.java | 2 +- .../java/org/elasticsearch/shield/license/LicenseService.java | 2 +- .../test/java/org/elasticsearch/integration/LicensingTests.java | 2 +- .../java/org/elasticsearch/watcher/license/LicenseService.java | 2 +- .../elasticsearch/watcher/license/LicenseIntegrationTests.java | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/marvel/src/main/java/org/elasticsearch/marvel/license/LicenseService.java b/marvel/src/main/java/org/elasticsearch/marvel/license/LicenseService.java index 4b5383e2883..bd6a7a36439 100644 --- a/marvel/src/main/java/org/elasticsearch/marvel/license/LicenseService.java +++ b/marvel/src/main/java/org/elasticsearch/marvel/license/LicenseService.java @@ -81,7 +81,7 @@ public class LicenseService extends AbstractLifecycleComponent { @Override protected void doStart() throws ElasticsearchException { - clientService.register(FEATURE_NAME, TRIAL_LICENSE_OPTIONS, expirationLoggers, new InternalListener(this)); + clientService.register(FEATURE_NAME, TRIAL_LICENSE_OPTIONS, expirationLoggers, null, new InternalListener(this)); } @Override diff --git a/marvel/src/test/java/org/elasticsearch/marvel/license/LicenseIntegrationTests.java b/marvel/src/test/java/org/elasticsearch/marvel/license/LicenseIntegrationTests.java index 3e940daf967..04df64f60e7 100644 --- a/marvel/src/test/java/org/elasticsearch/marvel/license/LicenseIntegrationTests.java +++ b/marvel/src/test/java/org/elasticsearch/marvel/license/LicenseIntegrationTests.java @@ -124,7 +124,7 @@ public class LicenseIntegrationTests extends ESIntegTestCase { } @Override - public void register(String s, LicensesService.TrialLicenseOptions trialLicenseOptions, Collection collection, Listener listener) { + public void register(String s, LicensesService.TrialLicenseOptions trialLicenseOptions, Collection collection, AcknowledgementCallback acknowledgementCallback, Listener listener) { listeners.add(listener); enable(); } diff --git a/shield/src/main/java/org/elasticsearch/shield/license/LicenseService.java b/shield/src/main/java/org/elasticsearch/shield/license/LicenseService.java index 52dd6825b6b..778c7f1e498 100644 --- a/shield/src/main/java/org/elasticsearch/shield/license/LicenseService.java +++ b/shield/src/main/java/org/elasticsearch/shield/license/LicenseService.java @@ -87,7 +87,7 @@ public class LicenseService extends AbstractLifecycleComponent { @Override protected void doStart() throws ElasticsearchException { if (settings.getGroups("tribe", true).isEmpty()) { - licensesClientService.register(FEATURE_NAME, TRIAL_LICENSE_OPTIONS, expirationLoggers, new InternalListener()); + licensesClientService.register(FEATURE_NAME, TRIAL_LICENSE_OPTIONS, expirationLoggers, null, new InternalListener()); } else { //TODO currently we disable licensing on tribe node. remove this once es core supports merging cluster new InternalListener().onEnabled(null); diff --git a/shield/src/test/java/org/elasticsearch/integration/LicensingTests.java b/shield/src/test/java/org/elasticsearch/integration/LicensingTests.java index c1ed3323f73..8ed2c5feb03 100644 --- a/shield/src/test/java/org/elasticsearch/integration/LicensingTests.java +++ b/shield/src/test/java/org/elasticsearch/integration/LicensingTests.java @@ -233,7 +233,7 @@ public class LicensingTests extends ShieldIntegTestCase { } @Override - public void register(String s, LicensesClientService.TrialLicenseOptions trialLicenseOptions, Collection collection, Listener listener) { + public void register(String s, LicensesClientService.TrialLicenseOptions trialLicenseOptions, Collection collection, AcknowledgementCallback acknowledgementCallback, Listener listener) { listeners.add(listener); enable(); } diff --git a/watcher/src/main/java/org/elasticsearch/watcher/license/LicenseService.java b/watcher/src/main/java/org/elasticsearch/watcher/license/LicenseService.java index 8e0f89a512b..768398a2698 100644 --- a/watcher/src/main/java/org/elasticsearch/watcher/license/LicenseService.java +++ b/watcher/src/main/java/org/elasticsearch/watcher/license/LicenseService.java @@ -84,7 +84,7 @@ public class LicenseService extends AbstractLifecycleComponent { @Override protected void doStart() throws ElasticsearchException { - clientService.register(FEATURE_NAME, TRIAL_LICENSE_OPTIONS, expirationLoggers, new InternalListener(this)); + clientService.register(FEATURE_NAME, TRIAL_LICENSE_OPTIONS, expirationLoggers, null, new InternalListener(this)); } @Override diff --git a/watcher/src/test/java/org/elasticsearch/watcher/license/LicenseIntegrationTests.java b/watcher/src/test/java/org/elasticsearch/watcher/license/LicenseIntegrationTests.java index 35dc64ef57d..b18883f557a 100644 --- a/watcher/src/test/java/org/elasticsearch/watcher/license/LicenseIntegrationTests.java +++ b/watcher/src/test/java/org/elasticsearch/watcher/license/LicenseIntegrationTests.java @@ -317,7 +317,7 @@ public class LicenseIntegrationTests extends AbstractWatcherIntegrationTests { } @Override - public void register(String s, LicensesService.TrialLicenseOptions trialLicenseOptions, Collection collection, Listener listener) { + public void register(String s, LicensesService.TrialLicenseOptions trialLicenseOptions, Collection collection, AcknowledgementCallback acknowledgementCallback, Listener listener) { listeners.add(listener); enable(); }