Fix retrieval of services from K8s manifests of a helm-based KDU
Change-Id: I31ca19f3484df4a74d5c06541f7409c57a7588d4
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
diff --git a/osm_lcm/n2vc/k8s_helm3_conn.py b/osm_lcm/n2vc/k8s_helm3_conn.py
index 98f4beb..29e4349 100644
--- a/osm_lcm/n2vc/k8s_helm3_conn.py
+++ b/osm_lcm/n2vc/k8s_helm3_conn.py
@@ -338,14 +338,11 @@
cluster_name=cluster_id, create_if_not_exist=True
)
- command1 = "env KUBECONFIG={} {} get manifest {} --namespace={}".format(
+ command = "env KUBECONFIG={} {} get manifest {} --namespace={}".format(
kubeconfig, self._helm_command, quote(kdu_instance), quote(namespace)
)
- command2 = "{} get --namespace={} -f -".format(
- self.kubectl_command, quote(namespace)
- )
- output, _rc = await self._local_async_exec_pipe(
- command1, command2, env=env, raise_exception_on_error=True
+ output, _rc = await self._local_async_exec(
+ command, env=env, raise_exception_on_error=True
)
services = self._parse_services(output)