From 059ebc5469200911b901fe41cab29447fa9a9705 Mon Sep 17 00:00:00 2001 From: Jack Lucas Date: Wed, 27 Feb 2019 11:38:13 -0500 Subject: Add k8sclient unit tests Change-Id: I4b664865618bf87822af325e2c2dd43e71c0bdac Issue-ID: DCAEGEN2-1261 Signed-off-by: Jack Lucas --- k8s/k8sclient/k8sclient.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'k8s/k8sclient') diff --git a/k8s/k8sclient/k8sclient.py b/k8s/k8sclient/k8sclient.py index 84ca84f..31631ad 100644 --- a/k8s/k8sclient/k8sclient.py +++ b/k8s/k8sclient/k8sclient.py @@ -38,7 +38,7 @@ FACTORS = {None: 1, "s": 1, "m": 60, "h": 3600} # group 3: protocol # group 4: host port PORTS = re.compile("^([0-9]+)(/(udp|UDP|tcp|TCP))?:([0-9]+)$") - + def _create_deployment_name(component_name): return "dep-{0}".format(component_name) @@ -126,7 +126,7 @@ def _create_resources(resources=None): resources_obj = client.V1ResourceRequirements( limits = resources.get("limits"), requests = resources.get("requests") - ) + ) return resources_obj else: return None @@ -398,9 +398,9 @@ def deploy(namespace, component_name, image, replicas, always_pull, k8sconfig, r } try: - _configure_api() # Get API handles + _configure_api() core = client.CoreV1Api() ext = client.ExtensionsV1beta1Api() -- cgit 1.2.3-korg