16 package org.openkilda.wfm;
18 import static java.util.Collections.singletonList;
27 import org.apache.commons.lang3.ArrayUtils;
28 import org.kohsuke.args4j.CmdLineException;
30 import java.util.Properties;
33 private static String CLI_OVERLAY =
"cli";
36 private Properties properties;
40 properties = cli.getProperties();
41 properties = makeCliOverlay();
45 return cli.getTopologyName();
56 String[] prefixesWithOverlay = ArrayUtils.addAll(ArrayUtils.toArray(CLI_OVERLAY), prefixes);
71 private String getEnvironmentPrefix() {
73 ArrayUtils.toArray(CLI_OVERLAY));
76 return environmentConfig.getNamingPrefix() != null ? environmentConfig.getNamingPrefix() :
"";
81 for (String
name : overlay.stringPropertyNames()) {
82 newLayer.setProperty(
name, overlay.getProperty(
name));
84 properties = newLayer;
87 private Properties makeCliOverlay() {
90 overlay.setProperty(CLI_OVERLAY +
".local", cli.getIsLocal() ?
"true" :
"false");
91 if (cli.getLocalExecutionTime() != null) {
92 overlay.setProperty(CLI_OVERLAY +
".local.execution.time", cli.getLocalExecutionTime().toString());
void setupOverlay(Properties overlay)
ConfigurationProvider getConfigurationProvider(String... prefixes)
LaunchEnvironment(String[] args)
TopologyNamingStrategy getTopologyNamingStrategy()
KafkaNamingStrategy getKafkaNamingStrategy()
Properties getProperties()