Skip to content

Commit

Permalink
cli: expose insecure argument to disable ssl verification
Browse files Browse the repository at this point in the history
Change-Id: I41aaf21e97610e7f407a52d6967ebb42f3a44633
  • Loading branch information
David Moreau Simard committed Nov 28, 2019
1 parent 24d0218 commit f404247
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ara/api/management/commands/prune.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ def add_arguments(self, parser):
parser.add_argument(
"--password", type=str, default=None, help="API password to use for the query (default: None)"
)
parser.add_argument("--insecure", action="store_true", help="Disables SSL certificate validation")
parser.add_argument("--timeout", type=int, default=10, help="Timeout for API queries (default: 10)")
parser.add_argument(
"--days", type=int, default=31, help="Delete playbooks started this many days ago (default: 31)"
Expand All @@ -47,6 +48,7 @@ def handle(self, *args, **options):
endpoint = options.get("endpoint")
username = options.get("username")
password = options.get("password")
insecure = options.get("insecure")
timeout = options.get("timeout")
days = options.get("days")
confirm = options.get("confirm")
Expand All @@ -58,6 +60,7 @@ def handle(self, *args, **options):
endpoint=endpoint,
username=username,
password=password,
verify=False if insecure else True,
timeout=timeout,
run_sql_migrations=False,
)
Expand Down

0 comments on commit f404247

Please sign in to comment.