27 lines
750 B
Python
27 lines
750 B
Python
# TenantGenerator/main.py
|
|
import argparse
|
|
from tenant.commands import init, certrenew, resize
|
|
|
|
def main():
|
|
parser = argparse.ArgumentParser(description="TenantGenerator - Generate tenant folder structure")
|
|
subparsers = parser.add_subparsers(dest="command", help="Available commands")
|
|
|
|
# Add subparsers for each command
|
|
init.add_subparser(subparsers)
|
|
certrenew.add_subparser(subparsers)
|
|
resize.add_subparser(subparsers)
|
|
|
|
args = parser.parse_args()
|
|
|
|
if args.command == "init":
|
|
init.execute(args)
|
|
elif args.command == "certrenew":
|
|
certrenew.execute(args)
|
|
elif args.command == "resize":
|
|
resize.execute(args)
|
|
else:
|
|
print("Unknown command")
|
|
|
|
if __name__ == "__main__":
|
|
main()
|