# contact with: nfvlabs@tid.es
##
import asyncio
+from typing import Union
import os
import yaml
happen before any _initial-config-primitive_of the VNF is called).
:param cluster_uuid: UUID of a K8s cluster known by OSM
- :param kdu_model: chart/ reference (string), which can be either
+ :param kdu_model: chart/reference (string), which can be either
of these options:
- a name of chart available via the repos known by OSM
- - a path to a packaged chart
- - a path to an unpacked chart directory or a URL
+ (e.g. stable/openldap, stable/openldap:1.2.4)
+ - a path to a packaged chart (e.g. mychart.tgz)
+ - a path to an unpacked chart directory or a URL (e.g. mychart)
:param kdu_instance: Kdu instance name
:param atomic: If set, installation process purges chart/bundle on fail, also
will wait until all the K8s objects are active
cluster_id: str,
kdu_instance: str,
namespace: str = None,
+ yaml_format: bool = False,
show_error_log: bool = False,
- return_text: bool = False,
- ):
+ ) -> Union[str, dict]:
self.log.debug(
"status of kdu_instance: {}, namespace: {} ".format(kdu_instance, namespace)
env=env,
)
- if return_text:
+ if yaml_format:
return str(output)
if rc != 0:
)
status = await self._status_kdu(
- cluster_id=cluster_id, kdu_instance=kdu_instance, return_text=False
+ cluster_id=cluster_id, kdu_instance=kdu_instance, yaml_format=False
)
# extract info.status.resources-> str