Return -o (--output*) option back as deprecated.

Deprecating cli options before removing them is a standard courtesy that
allows project consumers to handle such changes according to their
needs.

Option is removed here: https://review.opendev.org/#/c/701274

Change-Id: Iba4a4574426315a76294269d4287fd3ea18aa99e
This commit is contained in:
Andrii Ostapenko 2020-01-28 19:45:15 -06:00
parent 254275af25
commit 572ce3f6eb
3 changed files with 23 additions and 2 deletions

View File

@ -296,6 +296,10 @@ List known sites.
Location where the output is saved.
**-o / \\-\\-output** (Optional).
Same as -s (--save-location). Deprecated.
::
./pegleg <command> <options> list
@ -322,6 +326,10 @@ Name of site.
Location where the output is saved.
**-o / \\-\\-output** (Optional).
Same as -s (--save-location). Deprecated.
::
./pegleg <command> <options> show site_name
@ -348,6 +356,10 @@ Name of site.
Location where the output is saved.
**-o / \\-\\-output** (Optional).
Same as -s (--save-location). Deprecated.
**-v / \\-\\-validate** (Optional, Default=True).
Whether to pre-validate documents using built-in schema validation.
@ -779,6 +791,10 @@ The relative path to the file to be wrapped.
The output path where the wrapped file is saved. (default: input path with the
extension replaced with .yaml)
**-o / \\-\\-output-path**
Same as --save-location. Deprecated.
**-s / \\-\\-schema**
The schema for the document to be wrapped, e.g. deckhand/Certificate/v1

View File

@ -332,11 +332,13 @@ def generate_pki_deprecated(site_name, author, days, regenerate_all):
'filename',
help='The relative file path for the file to be wrapped.')
@click.option(
'-o', # DEPRECATED
'--output-path', # DEPRECATED
'--save-location',
'save_location',
required=False,
help='The output path where the wrapped file is saved. (default: input '
'path with .yaml).')
'path with .yaml). -o (--output-path) is deprecated and will be removed.')
@click.option(
'-s',
'--schema',

View File

@ -92,8 +92,11 @@ MAIN_REPOSITORY_OPTION = click.option(
SAVE_LOCATION_OPTION = click.option(
'-s',
'--save-location',
'-o', # DEPRECATED
'--output', # DEPRECATED
'save_location',
help='Where to save the output. Defaults to stdout.')
help='Where to save the output. Defaults to stdout. '
'-o (--output) is deprecated and will be removed.')
REPOSITORY_CLONE_PATH_OPTION = click.option(
'-p',