Skip to content
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

Remove references and logic of system property besu.docker #808

Merged
merged 11 commits into from
May 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
264 changes: 118 additions & 146 deletions besu/src/main/java/org/hyperledger/besu/cli/BesuCommand.java

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,6 @@ public interface DefaultCommandValues {
Bytes DEFAULT_EXTRA_DATA = Bytes.EMPTY;
long DEFAULT_MAX_REFRESH_DELAY = 3600000;
long DEFAULT_MIN_REFRESH_DELAY = 1;
String DOCKER_GENESIS_LOCATION = "/etc/besu/genesis.json";
String DOCKER_DATADIR_LOCATION = "/var/lib/besu";
String DOCKER_PLUGINSDIR_LOCATION = "/etc/besu/plugins";
String DOCKER_RPC_HTTP_AUTHENTICATION_CREDENTIALS_FILE_LOCATION =
"/etc/besu/rpc_http_auth_config.toml";
String DOCKER_RPC_WS_AUTHENTICATION_CREDENTIALS_FILE_LOCATION =
"/etc/besu/rpc_ws_auth_config.toml";
String DOCKER_RPC_HTTP_AUTHENTICATION_PUBLIC_KEY_FILE_LOCATION =
"/etc/besu/rpc_http_auth_public_key";
String DOCKER_RPC_WS_AUTHENTICATION_PUBLIC_KEY_FILE_LOCATION = "/etc/besu/rpc_ws_auth_public_key";
String DOCKER_PRIVACY_PUBLIC_KEY_FILE = "/etc/besu/privacy_public_key";
String DOCKER_PERMISSIONS_CONFIG_FILE_LOCATION = "/etc/besu/permissions_config.toml";
String PERMISSIONING_CONFIG_LOCATION = "permissions_config.toml";
String MANDATORY_HOST_FORMAT_HELP = "<HOST>";
String MANDATORY_PORT_FORMAT_HELP = "<PORT>";
Expand Down
106 changes: 0 additions & 106 deletions besu/src/main/java/org/hyperledger/besu/cli/StandaloneCommand.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -29,25 +29,20 @@
import picocli.CommandLine.ParseResult;

public class ConfigOptionSearchAndRunHandler extends AbstractParseResultHandler<List<Object>> {
private static final String DOCKER_CONFIG_LOCATION = "/etc/besu/besu.conf";

private final AbstractParseResultHandler<List<Object>> resultHandler;
private final CommandLine.IExceptionHandler2<List<Object>> exceptionHandler;
private final String configFileOptionName;
private final Map<String, String> environment;
private final boolean isDocker;

public ConfigOptionSearchAndRunHandler(
final AbstractParseResultHandler<List<Object>> resultHandler,
final CommandLine.IExceptionHandler2<List<Object>> exceptionHandler,
final String configFileOptionName,
final Map<String, String> environment,
final boolean isDocker) {
final Map<String, String> environment) {
this.resultHandler = resultHandler;
this.exceptionHandler = exceptionHandler;
this.configFileOptionName = configFileOptionName;
this.environment = environment;
this.isDocker = isDocker;
// use the same output as the regular options handler to ensure that outputs are all going
// in the same place. No need to do this for the exception handler as we reuse it directly.
this.useOut(resultHandler.out());
Expand All @@ -72,10 +67,8 @@ private Optional<File> findConfigFile(
} catch (final Exception e) {
throw new ExecutionException(commandLine, e.getMessage(), e);
}
} else if (isDocker) {
final File dockerConfigFile = new File(DOCKER_CONFIG_LOCATION);
return dockerConfigFile.exists() ? Optional.of(dockerConfigFile) : Optional.empty();
}

return Optional.empty();
}

Expand Down
Loading