[Logstash] Change config management license to Gold (elastic/x-pack-elasticsearch#1843)
* [Logstash] Change management license to Gold Previously the license type for LS config management was `BASIC`. In order to use the security features in Standard/Gold, we had to bump Logstash as well to Gold license. relates elastic/x-pack-elasticsearch#1841 Original commit: elastic/x-pack-elasticsearch@29194b2417
This commit is contained in:
parent
ad9797393a
commit
e8472908c1
|
@ -176,9 +176,9 @@ public class XPackLicenseState {
|
|||
|
||||
private static String[] logstashAcknowledgementMessages(OperationMode currentMode, OperationMode newMode) {
|
||||
switch (newMode) {
|
||||
case TRIAL:
|
||||
switch (currentMode) {
|
||||
case BASIC:
|
||||
switch (currentMode) {
|
||||
case TRIAL:
|
||||
case STANDARD:
|
||||
case GOLD:
|
||||
case PLATINUM:
|
||||
|
@ -429,11 +429,25 @@ public class XPackLicenseState {
|
|||
}
|
||||
|
||||
/**
|
||||
* Logstash is always allowed as long as there is an active license
|
||||
* Logstash is allowed as long as there is an active license of type TRIAL, STANDARD, GOLD or PLATINUM
|
||||
* @return {@code true} as long as there is a valid license
|
||||
*/
|
||||
public boolean isLogstashAllowed() {
|
||||
return status.active;
|
||||
Status localStatus = status;
|
||||
|
||||
if (localStatus.active == false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
switch (localStatus.mode) {
|
||||
case TRIAL:
|
||||
case GOLD:
|
||||
case PLATINUM:
|
||||
case STANDARD:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -292,13 +292,22 @@ public class XPackLicenseStateTests extends ESTestCase {
|
|||
assertAllowed(PLATINUM, false, XPackLicenseState::isMachineLearningAllowed, false);
|
||||
}
|
||||
|
||||
public void testLogstashAllowed() {
|
||||
assertAllowed(randomMode(), true, XPackLicenseState::isLogstashAllowed, true);
|
||||
assertAllowed(randomMode(), false, XPackLicenseState::isLogstashAllowed, false);
|
||||
public void testLogstashPlatinumGoldTrialStandard() throws Exception {
|
||||
assertAllowed(TRIAL, true, XPackLicenseState::isLogstashAllowed, true);
|
||||
assertAllowed(GOLD, true, XPackLicenseState::isLogstashAllowed, true);
|
||||
assertAllowed(PLATINUM, true, XPackLicenseState::isLogstashAllowed, true);
|
||||
assertAllowed(STANDARD, true, XPackLicenseState::isLogstashAllowed, true);
|
||||
}
|
||||
|
||||
public void testLogstashAckNotBasicToTrial() {
|
||||
OperationMode from = randomFrom(STANDARD, BASIC, GOLD, PLATINUM);
|
||||
assertAckMesssages(Logstash.NAME, from, TRIAL, 1);
|
||||
public void testLogstashBasicLicense() throws Exception {
|
||||
assertAllowed(BASIC, true, XPackLicenseState::isLogstashAllowed, false);
|
||||
}
|
||||
|
||||
public void testLogstashInactive() {
|
||||
assertAllowed(BASIC, false, XPackLicenseState::isLogstashAllowed, false);
|
||||
assertAllowed(TRIAL, false, XPackLicenseState::isLogstashAllowed, false);
|
||||
assertAllowed(GOLD, false, XPackLicenseState::isLogstashAllowed, false);
|
||||
assertAllowed(PLATINUM, false, XPackLicenseState::isLogstashAllowed, false);
|
||||
assertAllowed(STANDARD, false, XPackLicenseState::isLogstashAllowed, false);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue