Added more comments
This commit is contained in:
parent
6608e1216b
commit
b546e03e37
6
cli.py
6
cli.py
@ -193,6 +193,10 @@ def recover_env(args: argparse.Namespace):
|
||||
|
||||
|
||||
def create_env(args: argparse.Namespace):
|
||||
"""
|
||||
Managing environments works in a declarative way and thus it can
|
||||
also be used for updating.
|
||||
"""
|
||||
if (args.num_nginx_web + args.num_nginx_lb + args.num_postgres) == 0:
|
||||
raise Exception("At least one item should be deployed")
|
||||
|
||||
@ -306,7 +310,7 @@ def main() -> int:
|
||||
|
||||
# CLI definition for positional arg "create"
|
||||
cenv_parser = sub_parser.add_parser("create",
|
||||
help="create a new environment")
|
||||
help="create/update an environment")
|
||||
cenv_parser.add_argument("customer_name",
|
||||
type=str,
|
||||
help="name of the customer")
|
||||
|
@ -80,6 +80,8 @@ def main() -> int:
|
||||
lambda x: bool(RE_TEXT.match(x)))
|
||||
"""
|
||||
Ensures the necessary customer setup.
|
||||
|
||||
NOTE: The customer and the `envs` directory inside of it never get removed.
|
||||
"""
|
||||
envs_dir = path.join("customers", customer_name, "envs")
|
||||
Path(envs_dir).mkdir(parents=True, exist_ok=True)
|
||||
|
Loading…
x
Reference in New Issue
Block a user