@Test public void testNoGlobalOrder() throws CommandLineParseException { String hostname1 = "other0[4-6]"; String hostname2 = "nifi3(2)"; tlsToolkitStandaloneCommandLine.parse("-n", hostname1, "-n", hostname2); Map<InstanceIdentifier, InstanceDefinition> definitionMap = tlsToolkitStandaloneCommandLine.createConfig().getInstanceDefinitions().stream() .collect(Collectors.toMap(InstanceDefinition::getInstanceIdentifier, Function.identity())); assertEquals(5, definitionMap.size()); InstanceDefinition nifi3_1 = definitionMap.get(new InstanceIdentifier("nifi3", 1)); assertNotNull(nifi3_1); assertEquals(1, nifi3_1.getInstanceIdentifier().getNumber()); assertEquals(1, nifi3_1.getNumber()); InstanceDefinition nifi3_2 = definitionMap.get(new InstanceIdentifier("nifi3", 2)); assertNotNull(nifi3_2); assertEquals(2, nifi3_2.getInstanceIdentifier().getNumber()); assertEquals(2, nifi3_2.getNumber()); InstanceDefinition other04 = definitionMap.get(new InstanceIdentifier("other04", 1)); assertNotNull(other04); assertEquals(1, other04.getInstanceIdentifier().getNumber()); assertEquals(1, other04.getNumber()); InstanceDefinition other05 = definitionMap.get(new InstanceIdentifier("other05", 1)); assertNotNull(other05); assertEquals(1, other05.getInstanceIdentifier().getNumber()); assertEquals(1, other05.getNumber()); InstanceDefinition other06 = definitionMap.get(new InstanceIdentifier("other06", 1)); assertNotNull(other06); assertEquals(1, other06.getInstanceIdentifier().getNumber()); assertEquals(1, other06.getNumber()); }
public StandaloneConfig createConfig() { StandaloneConfig standaloneConfig = new StandaloneConfig(); standaloneConfig.setBaseDir(baseDir); standaloneConfig.setNiFiPropertiesWriterFactory(niFiPropertiesWriterFactory); standaloneConfig.setInstanceDefinitions(instanceDefinitions); standaloneConfig.setOverwrite(overwrite); standaloneConfig.setClientDns(clientDns); standaloneConfig.setClientPasswords(clientPasswords); standaloneConfig.setClientPasswordsGenerated(clientPasswordsGenerated); standaloneConfig.setCaHostname(getCertificateAuthorityHostname()); standaloneConfig.setKeyStore("nifi-ca-" + KEYSTORE + getKeyStoreType().toLowerCase()); standaloneConfig.setKeyStoreType(getKeyStoreType()); standaloneConfig.setKeySize(getKeySize()); standaloneConfig.setKeyPairAlgorithm(getKeyAlgorithm()); standaloneConfig.setSigningAlgorithm(getSigningAlgorithm()); standaloneConfig.setDays(getDays()); standaloneConfig.setDnPrefix(dnPrefix); standaloneConfig.setDnSuffix(dnSuffix); standaloneConfig.setDomainAlternativeNames(domainAlternativeNames); standaloneConfig.initDefaults(); return standaloneConfig; }
TlsToolkitStandaloneCommandLine extends BaseCommandLine { public StandaloneConfig createConfig() { StandaloneConfig standaloneConfig = new StandaloneConfig(); standaloneConfig.setBaseDir(baseDir); standaloneConfig.setNiFiPropertiesWriterFactory(niFiPropertiesWriterFactory); standaloneConfig.setInstanceDefinitions(instanceDefinitions); standaloneConfig.setOverwrite(overwrite); standaloneConfig.setClientDns(clientDns); standaloneConfig.setClientPasswords(clientPasswords); standaloneConfig.setClientPasswordsGenerated(clientPasswordsGenerated); standaloneConfig.setCaHostname(getCertificateAuthorityHostname()); standaloneConfig.setKeyStore("nifi-ca-" + KEYSTORE + getKeyStoreType().toLowerCase()); standaloneConfig.setKeyStoreType(getKeyStoreType()); standaloneConfig.setKeySize(getKeySize()); standaloneConfig.setKeyPairAlgorithm(getKeyAlgorithm()); standaloneConfig.setSigningAlgorithm(getSigningAlgorithm()); standaloneConfig.setDays(getDays()); standaloneConfig.setDnPrefix(dnPrefix); standaloneConfig.setDnSuffix(dnSuffix); standaloneConfig.setDomainAlternativeNames(domainAlternativeNames); standaloneConfig.initDefaults(); return standaloneConfig; } }
TlsToolkitStandaloneCommandLine extends BaseCommandLine { public StandaloneConfig createConfig() { StandaloneConfig standaloneConfig = new StandaloneConfig(); standaloneConfig.setBaseDir(baseDir); standaloneConfig.setNiFiPropertiesWriterFactory(niFiPropertiesWriterFactory); standaloneConfig.setInstanceDefinitions(instanceDefinitions); standaloneConfig.setOverwrite(overwrite); standaloneConfig.setClientDns(clientDns); standaloneConfig.setClientPasswords(clientPasswords); standaloneConfig.setClientPasswordsGenerated(clientPasswordsGenerated); standaloneConfig.setCaHostname(getCertificateAuthorityHostname()); standaloneConfig.setKeyStore("nifi-ca-" + KEYSTORE + getKeyStoreType().toLowerCase()); standaloneConfig.setKeyStoreType(getKeyStoreType()); standaloneConfig.setKeySize(getKeySize()); standaloneConfig.setKeyPairAlgorithm(getKeyAlgorithm()); standaloneConfig.setSigningAlgorithm(getSigningAlgorithm()); standaloneConfig.setDays(getDays()); standaloneConfig.setDnPrefix(dnPrefix); standaloneConfig.setDnSuffix(dnSuffix); standaloneConfig.setDomainAlternativeNames(domainAlternativeNames); standaloneConfig.initDefaults(); return standaloneConfig; } TlsToolkitStandaloneCommandLine(); protected  TlsToolkitStandaloneCommandLine(PasswordUtil passwordUtil); }
TlsToolkitStandaloneCommandLine extends BaseCommandLine { public StandaloneConfig createConfig() { StandaloneConfig standaloneConfig = new StandaloneConfig(); standaloneConfig.setBaseDir(baseDir); standaloneConfig.setNiFiPropertiesWriterFactory(niFiPropertiesWriterFactory); standaloneConfig.setInstanceDefinitions(instanceDefinitions); standaloneConfig.setOverwrite(overwrite); standaloneConfig.setClientDns(clientDns); standaloneConfig.setClientPasswords(clientPasswords); standaloneConfig.setClientPasswordsGenerated(clientPasswordsGenerated); standaloneConfig.setCaHostname(getCertificateAuthorityHostname()); standaloneConfig.setKeyStore("nifi-ca-" + KEYSTORE + getKeyStoreType().toLowerCase()); standaloneConfig.setKeyStoreType(getKeyStoreType()); standaloneConfig.setKeySize(getKeySize()); standaloneConfig.setKeyPairAlgorithm(getKeyAlgorithm()); standaloneConfig.setSigningAlgorithm(getSigningAlgorithm()); standaloneConfig.setDays(getDays()); standaloneConfig.setDnPrefix(dnPrefix); standaloneConfig.setDnSuffix(dnSuffix); standaloneConfig.setDomainAlternativeNames(domainAlternativeNames); standaloneConfig.initDefaults(); return standaloneConfig; } TlsToolkitStandaloneCommandLine(); protected  TlsToolkitStandaloneCommandLine(PasswordUtil passwordUtil); static void main(String[] args); StandaloneConfig createConfig(); }
TlsToolkitStandaloneCommandLine extends BaseCommandLine { public StandaloneConfig createConfig() { StandaloneConfig standaloneConfig = new StandaloneConfig(); standaloneConfig.setBaseDir(baseDir); standaloneConfig.setNiFiPropertiesWriterFactory(niFiPropertiesWriterFactory); standaloneConfig.setInstanceDefinitions(instanceDefinitions); standaloneConfig.setOverwrite(overwrite); standaloneConfig.setClientDns(clientDns); standaloneConfig.setClientPasswords(clientPasswords); standaloneConfig.setClientPasswordsGenerated(clientPasswordsGenerated); standaloneConfig.setCaHostname(getCertificateAuthorityHostname()); standaloneConfig.setKeyStore("nifi-ca-" + KEYSTORE + getKeyStoreType().toLowerCase()); standaloneConfig.setKeyStoreType(getKeyStoreType()); standaloneConfig.setKeySize(getKeySize()); standaloneConfig.setKeyPairAlgorithm(getKeyAlgorithm()); standaloneConfig.setSigningAlgorithm(getSigningAlgorithm()); standaloneConfig.setDays(getDays()); standaloneConfig.setDnPrefix(dnPrefix); standaloneConfig.setDnSuffix(dnSuffix); standaloneConfig.setDomainAlternativeNames(domainAlternativeNames); standaloneConfig.initDefaults(); return standaloneConfig; } TlsToolkitStandaloneCommandLine(); protected  TlsToolkitStandaloneCommandLine(PasswordUtil passwordUtil); static void main(String[] args); StandaloneConfig createConfig(); static final String OUTPUT_DIRECTORY_ARG; static final String NIFI_PROPERTIES_FILE_ARG; static final String KEY_STORE_PASSWORD_ARG; static final String TRUST_STORE_PASSWORD_ARG; static final String KEY_PASSWORD_ARG; static final String HOSTNAMES_ARG; static final String OVERWRITE_ARG; static final String CLIENT_CERT_DN_ARG; static final String CLIENT_CERT_PASSWORD_ARG; static final String GLOBAL_PORT_SEQUENCE_ARG; static final String NIFI_DN_PREFIX_ARG; static final String NIFI_DN_SUFFIX_ARG; static final String SUBJECT_ALTERNATIVE_NAMES; static final String DEFAULT_OUTPUT_DIRECTORY; static final String DESCRIPTION; }