diff --git a/stack_orchestrator/deploy/compose/deploy_docker.py b/stack_orchestrator/deploy/compose/deploy_docker.py index c6397aad..fa0ac1d4 100644 --- a/stack_orchestrator/deploy/compose/deploy_docker.py +++ b/stack_orchestrator/deploy/compose/deploy_docker.py @@ -62,7 +62,7 @@ class DockerDeployer(Deployer): except DockerException as e: raise DeployerException(e) - def update(self): + def update_envs(self): if not opts.o.dry_run: try: return self.docker.compose.restart() diff --git a/stack_orchestrator/deploy/deploy.py b/stack_orchestrator/deploy/deploy.py index 86c1856c..f2bf977c 100644 --- a/stack_orchestrator/deploy/deploy.py +++ b/stack_orchestrator/deploy/deploy.py @@ -182,8 +182,8 @@ def status_operation(ctx): ctx.obj.deployer.status() -def update_operation(ctx): - ctx.obj.deployer.update() +def update_envs_operation(ctx): + ctx.obj.deployer.update_envs() def ps_operation(ctx): diff --git a/stack_orchestrator/deploy/deployer.py b/stack_orchestrator/deploy/deployer.py index d8fb656b..11fb6592 100644 --- a/stack_orchestrator/deploy/deployer.py +++ b/stack_orchestrator/deploy/deployer.py @@ -28,7 +28,7 @@ class Deployer(ABC): pass @abstractmethod - def update(self): + def update_envs(self): pass @abstractmethod diff --git a/stack_orchestrator/deploy/deployment.py b/stack_orchestrator/deploy/deployment.py index b76e6486..902780fb 100644 --- a/stack_orchestrator/deploy/deployment.py +++ b/stack_orchestrator/deploy/deployment.py @@ -31,7 +31,7 @@ from stack_orchestrator.deploy.deploy import ( exec_operation, logs_operation, create_deploy_context, - update_operation, + update_envs_operation, ) from stack_orchestrator.deploy.deploy_types import DeployCommandContext from stack_orchestrator.deploy.deployment_context import DeploymentContext @@ -210,11 +210,11 @@ def status(ctx): status_operation(ctx) -@command.command() +@command.command(name="update-envs") @click.pass_context -def update(ctx): +def update_envs(ctx): ctx.obj = make_deploy_context(ctx) - update_operation(ctx) + update_envs_operation(ctx) @command.command() diff --git a/stack_orchestrator/deploy/k8s/deploy_k8s.py b/stack_orchestrator/deploy/k8s/deploy_k8s.py index f7f8ad43..3b235538 100644 --- a/stack_orchestrator/deploy/k8s/deploy_k8s.py +++ b/stack_orchestrator/deploy/k8s/deploy_k8s.py @@ -598,7 +598,7 @@ class K8sDeployer(Deployer): log_data = "******* No logs available ********\n" return log_stream_from_string(log_data) - def update(self): + def update_envs(self): self.connect_api() ref_deployment = self.cluster_info.get_deployment() if not ref_deployment or not ref_deployment.metadata: diff --git a/stack_orchestrator/deploy/webapp/util.py b/stack_orchestrator/deploy/webapp/util.py index 3c536477..84accbcd 100644 --- a/stack_orchestrator/deploy/webapp/util.py +++ b/stack_orchestrator/deploy/webapp/util.py @@ -696,7 +696,7 @@ def deploy_to_k8s(deploy_record, deployment_dir, recreate, logger): if not deploy_record: commands_to_run = ["start"] else: - commands_to_run = ["update"] + commands_to_run = ["update-envs"] for command in commands_to_run: logger.log(f"Running {command} command on deployment dir: {deployment_dir}")