diff --git a/README.md b/README.md index 906e11b..025a293 100644 --- a/README.md +++ b/README.md @@ -72,22 +72,22 @@ the bash script can take an extra parameter `-b, --bind-directory`. For example $ ./exhibitor-tls-artifacts -b /tmp 192.168.0.1 192.168.0.2 192.168.0.3 $ sudo tree /tmp/artifacts/ -/tmp/artifacts/ -├── node_192_168_0_1 +./artifacts/ +├── 192.168.1.1 │   ├── client-cert.pem │   ├── client-key.pem │   ├── clientstore.jks │   ├── root-cert.pem │   ├── serverstore.jks │   └── truststore.jks -├── node_192_168_0_2 +├── 192.168.1.2 │   ├── client-cert.pem │   ├── client-key.pem │   ├── clientstore.jks │   ├── root-cert.pem │   ├── serverstore.jks │   └── truststore.jks -├── node_192_168_0_3 +├── 192.168.1.3 │   ├── client-cert.pem │   ├── client-key.pem │   ├── clientstore.jks @@ -99,6 +99,7 @@ $ sudo tree /tmp/artifacts/ 3 directories, 20 files + ``` ## Script Usage @@ -120,7 +121,7 @@ Options: All artifacts are found in `./artifacts` or in the user specified directory. This tool creates sub-directories for each `NODE`. If the node ip address is `10.10.10.10`, -the artifacts for that node will land in `/node_10_10_10_10/`. +the artifacts for that node will land in `/10.10.10.10/`. * `clientstore.jks` * Contains `client-cert.pem` and `client-key.pem`. diff --git a/exhibitor_tls_artifacts/gen_artifacts.py b/exhibitor_tls_artifacts/gen_artifacts.py index 21888a1..1be14fd 100644 --- a/exhibitor_tls_artifacts/gen_artifacts.py +++ b/exhibitor_tls_artifacts/gen_artifacts.py @@ -42,7 +42,7 @@ def app(nodes, output_directory): root_truststore = store_generator.create_truststore([root_cert_path]) for node in nodes: - node_path_name = 'node_' + node.replace('.', '_') + node_path_name = str(node) client_cert_path, client_key_path = cert_generator.get_cert( cert_name='client', node_cert_path=node_path_name, diff --git a/setup.py b/setup.py index 68d50f3..c801049 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,6 @@ from setuptools import setup, find_packages -VERSION = '0.3' +VERSION = '0.4.0' with open('requirements.txt') as requirements: INSTALL_REQUIRES = [] diff --git a/tests/test_gen_artifacts.py b/tests/test_gen_artifacts.py index cbf092b..7cb3888 100644 --- a/tests/test_gen_artifacts.py +++ b/tests/test_gen_artifacts.py @@ -34,7 +34,7 @@ def test_default(self): catch_exceptions=False) assert result.exit_code == 0 - artifact_path = temp_path / 'artifacts' / 'node_10_10_10_10' + artifact_path = temp_path / 'artifacts' / '10.10.10.10' assert artifact_path.exists() self._validate_files(artifact_path) @@ -47,7 +47,7 @@ def test_custom_dir(self, tmp_path): catch_exceptions=False) assert result.exit_code == 0 - self._validate_files(new_path / 'node_10_10_10_10') + self._validate_files(new_path / '10.10.10.10') def test_dir_exists(self): """ Test error case when the output directory already exists """