diff --git a/doc/source/cli/cli.rst b/doc/source/cli/cli.rst index 45185a5a..9cb80acc 100644 --- a/doc/source/cli/cli.rst +++ b/doc/source/cli/cli.rst @@ -685,7 +685,7 @@ repository folder structure. This is used to ensure the correct revision of the site and global repositories are used, as specified in the site's :file:`site-definition.yaml`. -**-p / --path** (Required). +**--path** (Required). Path to pegleg managed encrypted secrets file or directory of files. @@ -703,7 +703,7 @@ Usage: :: - ./pegleg.sh site secrets decrypt -p + ./pegleg.sh site secrets decrypt --path [-s ] Examples @@ -735,7 +735,7 @@ for tracking provenance information in the PeglegManagedDocuments. An attempt is made to automatically determine this value, but should be provided. -**-f / --filename** +**--filename** The relative path to the file to be wrapped. @@ -766,7 +766,7 @@ Examples :: ./pegleg.sh site -r /home/myuser/myrepo \ - secrets wrap -a myuser -f secrets/certificates/new_cert.crt \ + secrets wrap -a myuser --filename secrets/certificates/new_cert.crt \ -o secrets/certificates/new_cert.yaml -s "deckhand/Certificate/v1" \ -n "new-cert" -l site mysite diff --git a/pegleg/cli.py b/pegleg/cli.py index a4b86ab8..84864cce 100644 --- a/pegleg/cli.py +++ b/pegleg/cli.py @@ -477,7 +477,6 @@ def generate_pki(site_name, author, days): 'author', help='Author for the new wrapped file.') @click.option( - '-f', '--filename', 'filename', help='The relative file path for the file to be wrapped.') @@ -703,7 +702,6 @@ def encrypt(*, save_location, author, site_name): help='Command to unwrap and decrypt one site ' 'secrets document and print it to stdout.') @click.option( - '-p', '--path', 'path', type=click.Path(exists=True, readable=True), diff --git a/tests/unit/test_cli.py b/tests/unit/test_cli.py index 5465188e..f7237d2e 100644 --- a/tests/unit/test_cli.py +++ b/tests/unit/test_cli.py @@ -572,7 +572,7 @@ class TestSiteSecretsActions(BaseCLIActionTest): assert "encrypted" in ceph_fsid["data"] assert "managedDocument" in ceph_fsid["data"] - secrets_opts = ['secrets', 'decrypt', '-p', file_path, + secrets_opts = ['secrets', 'decrypt', '--path', file_path, self.site_name] result = self.runner.invoke(cli.site, ['-r', repo_path] + secrets_opts) assert result.exit_code == 0, result.output @@ -604,8 +604,8 @@ class TestSiteSecretsActions(BaseCLIActionTest): with open(file_path, "w") as test_crt_fi: test_crt_fi.write(test_cert) - secrets_opts = ['secrets', 'wrap', "-a", "lm734y", "-f", file_path, - "-s", "deckhand/Certificate/v1", + secrets_opts = ['secrets', 'wrap', "-a", "lm734y", "--filename", + file_path, "-s", "deckhand/Certificate/v1", "-n", "test-certificate", "-l", "site", "--no-encrypt", self.site_name] result = self.runner.invoke(cli.site, ["-r", repo_path] + secrets_opts) @@ -620,7 +620,7 @@ class TestSiteSecretsActions(BaseCLIActionTest): assert doc["data"]["managedDocument"]["metadata"]["storagePolicy"] == "cleartext" os.remove(output_path) - secrets_opts = ['secrets', 'wrap', "-a", "lm734y", "-f", file_path, + secrets_opts = ['secrets', 'wrap', "-a", "lm734y", "--filename", file_path, "-o", output_path, "-s", "deckhand/Certificate/v1", "-n", "test-certificate", "-l", "site", self.site_name]