def __init__(self,
log: object = None,
loop: object = None,
- url: str = None,
- username: str = None,
vca_config: dict = None,
on_update_db=None, ):
"""
self,
log=log,
loop=loop,
- url=url,
- username=username,
- vca_config=vca_config,
on_update_db=on_update_db,
db=self.db,
fs=self.fs
)
+ self.vca_config = vca_config
self.log.debug("Initialize helm N2VC connector")
self.log.debug("initial vca_config: {}".format(vca_config))
self.log.debug("install helm chart: {}".format(full_path))
if vca_type == "helm":
- helm_id = await self._k8sclusterhelm2.install(system_cluster_uuid, kdu_model=full_path,
- namespace=self._KUBECTL_OSM_NAMESPACE,
- params=config,
- db_dict=db_dict,
- timeout=progress_timeout)
+ helm_id = self._k8sclusterhelm2.generate_kdu_instance_name(
+ db_dict=db_dict,
+ kdu_model=full_path,
+ )
+ await self._k8sclusterhelm2.install(system_cluster_uuid, kdu_model=full_path,
+ kdu_instance=helm_id,
+ namespace=self._KUBECTL_OSM_NAMESPACE,
+ params=config,
+ db_dict=db_dict,
+ timeout=progress_timeout)
else:
- helm_id = await self._k8sclusterhelm3.install(system_cluster_uuid, kdu_model=full_path,
- namespace=self._KUBECTL_OSM_NAMESPACE,
- params=config,
- db_dict=db_dict,
- timeout=progress_timeout)
+ helm_id = self._k8sclusterhelm2.generate_kdu_instance_name(
+ db_dict=db_dict,
+ kdu_model=full_path,
+ )
+ await self._k8sclusterhelm3.install(system_cluster_uuid, kdu_model=full_path,
+ kdu_instance=helm_id,
+ namespace=self._KUBECTL_OSM_NAMESPACE,
+ params=config,
+ db_dict=db_dict,
+ timeout=progress_timeout)
ee_id = "{}:{}.{}".format(vca_type, self._KUBECTL_OSM_NAMESPACE, helm_id)
return ee_id, None
# nothing to do
pass
- async def install_configuration_sw(self,
- ee_id: str,
- artifact_path: str,
- db_dict: dict,
- progress_timeout: float = None,
- total_timeout: float = None,
- config: dict = None,
- num_units: int = 1,
- vca_type: str = None
- ):
+ async def install_configuration_sw(self, *args, **kwargs):
# nothing to do
pass
- async def add_relation(self, ee_id_1: str, ee_id_2: str, endpoint_1: str, endpoint_2: str):
+ async def add_relation(self, *args, **kwargs):
# nothing to do
pass
# nothing to to
pass
- async def get_status(self, namespace: str, yaml_format: bool = True):
+ async def get_status(self, *args, **kwargs):
# not used for this connector
pass
- async def get_ee_ssh_public__key(self, ee_id: str, db_dict: dict, progress_timeout: float = None,
- total_timeout: float = None) -> str:
+ async def get_ee_ssh_public__key(
+ self,
+ ee_id: str,
+ db_dict: dict,
+ progress_timeout: float = None,
+ total_timeout: float = None,
+ **kwargs,
+ ) -> str:
"""
Obtains ssh-public key from ee executing GetSShKey method from the ee.
self.log.error("Error obtaining ee ssh_key: {}".format(e), exc_info=True)
raise N2VCException("Error obtaining ee ssh_ke: {}".format(e))
- async def exec_primitive(self, ee_id: str, primitive_name: str, params_dict: dict, db_dict: dict = None,
- progress_timeout: float = None, total_timeout: float = None) -> str:
+ async def exec_primitive(
+ self,
+ ee_id: str,
+ primitive_name: str,
+ params_dict: dict,
+ db_dict: dict = None,
+ progress_timeout: float = None,
+ total_timeout: float = None,
+ **kwargs,
+ ) -> str:
"""
Execute a primitive in the execution environment
# nothing to be done
pass
- async def delete_execution_environment(self, ee_id: str, db_dict: dict = None, total_timeout: float = None):
+ async def delete_execution_environment(
+ self,
+ ee_id: str,
+ db_dict: dict = None,
+ total_timeout: float = None,
+ **kwargs,
+ ):
"""
Delete an execution environment
:param str ee_id: id of the execution environment to delete, included namespace.helm_id