26 lines
677 B
Python
26 lines
677 B
Python
# tenant/commands/certrenew.py
|
|
from tenant.utils.common import get_secure_password
|
|
|
|
|
|
def add_subparser(subparsers):
|
|
certrenew_parser = subparsers.add_parser(
|
|
"certrenew", help="Renew certificates for a tenant"
|
|
)
|
|
certrenew_parser.add_argument("tenant_name", help="Name of the tenant")
|
|
certrenew_parser.add_argument(
|
|
"--force", action="store_true", help="Force certificate renewal"
|
|
)
|
|
|
|
|
|
def execute(args):
|
|
tenant_name = args.tenant_name
|
|
force_renewal = args.force
|
|
|
|
# Use the shared function
|
|
# shared_function()
|
|
|
|
# Your logic for certificate renewal
|
|
# ...
|
|
|
|
print(f"Renewing certificates for tenant '{tenant_name}'.")
|