From 68fd0dc06341f32f42aa56c6c182676a5d1771f5 Mon Sep 17 00:00:00 2001 From: Joe Banks Date: Sun, 18 Jul 2021 04:08:15 +0100 Subject: refactor: update variable naming of deployments API --- arthur/apis/kubernetes/deployments.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'arthur/apis/kubernetes/deployments.py') diff --git a/arthur/apis/kubernetes/deployments.py b/arthur/apis/kubernetes/deployments.py index 8d667b0..f7b4d5c 100644 --- a/arthur/apis/kubernetes/deployments.py +++ b/arthur/apis/kubernetes/deployments.py @@ -9,8 +9,8 @@ from kubernetes_asyncio.client.models import V1DeploymentList async def restart_deployment(deployment: str, namespace: str) -> None: """Patch a deployment with a custom annotation to trigger redeployment.""" async with ApiClient() as api: - v1 = client.AppsV1Api(api) - await v1.patch_namespaced_deployment( + api = client.AppsV1Api(api) + await api.patch_namespaced_deployment( name=deployment, namespace=namespace, body={ @@ -33,5 +33,5 @@ async def restart_deployment(deployment: str, namespace: str) -> None: async def list_deployments(namespace: str) -> V1DeploymentList: """Query the Kubernetes API for a list of deployments in the provided namespace.""" async with ApiClient() as api: - v1 = client.AppsV1Api(api) - return await v1.list_namespaced_deployment(namespace=namespace) + api = client.AppsV1Api(api) + return await api.list_namespaced_deployment(namespace=namespace) -- cgit v1.2.3