Remove duplicate flags as options
Multiple occurences of -p or -f in the same command is vague. Removing duplicate shorthand flags in favor of the explicit long form flags instead for several commands. Change-Id: Ic26360e517ea8f7ad2e0e5354d34a61fd622e0f1
This commit is contained in:
parent
4d3e9d171b
commit
489e641702
@ -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 <options> secrets decrypt <site_name> -p <path>
|
||||
./pegleg.sh site <options> secrets decrypt <site_name> --path <path>
|
||||
[-s <output_path>]
|
||||
|
||||
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
|
||||
|
||||
|
@ -477,7 +477,6 @@ def generate_pki(site_name, author, days):
|
||||
'author',
|
||||
help='Author for the new wrapped file.')
|
||||
@click.option(
|
||||
'-f',
|
||||
'--filename',
|
||||
'file_name',
|
||||
help='The relative file path for the file to be wrapped.')
|
||||
@ -694,7 +693,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),
|
||||
|
@ -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]
|
||||
|
Loading…
Reference in New Issue
Block a user