in data_validation/cli_tools.py [0:0]
def _configure_connection_parser(subparsers):
"""Configure the Parser for Connection Management."""
connection_parser = subparsers.add_parser(
"connections", help="Manage & Store connections to your Databases"
)
connect_subparsers = connection_parser.add_subparsers(dest="connect_cmd")
_ = connect_subparsers.add_parser("list", help="List your connections")
add_parser = connect_subparsers.add_parser("add", help="Store a new connection")
add_parser.add_argument(
"--connection-name", "-c", help="Name of connection used as reference"
)
add_parser.add_argument(
"--secret-manager-type",
"-sm",
default=None,
help="Secret manager type to store credentials by default will be None ",
)
add_parser.add_argument(
"--secret-manager-project-id",
"-sm-prj-id",
default=None,
help="Project ID for the secret manager that stores the credentials",
)
_configure_database_specific_parsers(add_parser)
delete_parser = connect_subparsers.add_parser(
"delete", help="Delete an existing connection"
)
delete_parser.add_argument(
"--connection-name", "-c", required=True, help="Name of connection to delete"
)
describe_parser = connect_subparsers.add_parser(
"describe", help="Describe an existing connection"
)
describe_parser.add_argument(
"--connection-name", "-c", required=True, help="Name of connection to describe"
)
describe_parser.add_argument(
"--format",
"-f",
dest="output_format",
choices=["json", "yaml"],
default="yaml",
help="Output format for the configuration (default: yaml)",
)