From 831e4a14ff53ede3d0eb43da155df42602e096e0 Mon Sep 17 00:00:00 2001 From: Prathamesh Musale Date: Thu, 6 Feb 2025 16:56:21 +0530 Subject: [PATCH] Handle lint errors --- .../deploy/webapp/deploy_webapp_from_registry.py | 5 ++--- stack_orchestrator/deploy/webapp/util.py | 3 ++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/stack_orchestrator/deploy/webapp/deploy_webapp_from_registry.py b/stack_orchestrator/deploy/webapp/deploy_webapp_from_registry.py index 95b82383..a31467f6 100644 --- a/stack_orchestrator/deploy/webapp/deploy_webapp_from_registry.py +++ b/stack_orchestrator/deploy/webapp/deploy_webapp_from_registry.py @@ -26,7 +26,6 @@ import yaml import click import gnupg -from stack_orchestrator import constants from stack_orchestrator.deploy.images import remote_image_exists from stack_orchestrator.deploy.webapp import deploy_webapp from stack_orchestrator.deploy.webapp.util import ( @@ -49,7 +48,7 @@ from stack_orchestrator.deploy.webapp.util import ( ) -def process_app_deployment_request( +def process_app_deployment_request( # noqa ctx, laconic: LaconicRegistryClient, app_deployment_request, @@ -171,7 +170,7 @@ def process_app_deployment_request( # Existing deployment record: take the first lrn that resolves deployment_record = None fqdns_to_release = [] - existing_deployment_dir = deployment_dir # Default to target dir in case the app had been undeployed + existing_deployment_dir = deployment_dir # Default to target dir in case the app had been undeployed for app_deployment_lrn in app_deployment_lrns: deployment_record = laconic.get_record(app_deployment_lrn) diff --git a/stack_orchestrator/deploy/webapp/util.py b/stack_orchestrator/deploy/webapp/util.py index 6c2bab05..5949693e 100644 --- a/stack_orchestrator/deploy/webapp/util.py +++ b/stack_orchestrator/deploy/webapp/util.py @@ -702,7 +702,6 @@ def publish_deployment( int(deploy_record.attributes.version.split(".")[-1]) + 1 ) - dns_ids = [] for dns_lrn in dns_lrns: dns_record = existing_dns_records_by_lrns[dns_lrn] @@ -769,10 +768,12 @@ def publish_deployment( deployment_id = laconic.publish(new_deployment_record, [deployment_lrns]) return {"dns": dns_ids, "deployment": deployment_id} + def get_requested_names(app_deployment_request): request_dns = app_deployment_request.attributes.dns return request_dns.split(",") if request_dns else [] + def hostnames_for_deployment_request(app_deployment_request, laconic): requested_names = get_requested_names(app_deployment_request)