X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FN2VC.git;a=blobdiff_plain;f=n2vc%2Fk8s_conn.py;h=3305ac545713ab03ebffaccd3dc15b8407b14dbb;hp=6ac81195305dbb7894cfa0ca1200a9579b2180c2;hb=d5d83a4250eebe2e82fcb9986bcc1d3db5610c3d;hpb=f00dcaeedafa3a57735abfd9c16515fe5986f41f;ds=sidebyside diff --git a/n2vc/k8s_conn.py b/n2vc/k8s_conn.py index 6ac8119..3305ac5 100644 --- a/n2vc/k8s_conn.py +++ b/n2vc/k8s_conn.py @@ -50,13 +50,13 @@ class K8sConnector(abc.ABC, Loggable): # parent class Loggable.__init__(self, log=log, log_to_console=True, prefix='\nK8S') - self.info('Initializing generic K8S connector') + # self.log.info('Initializing generic K8S connector') # the database and update callback self.db = db self.on_update_db = on_update_db - self.info('K8S generic connector initialized') + # self.log.info('K8S generic connector initialized') @abc.abstractmethod async def init_env( @@ -162,7 +162,8 @@ class K8sConnector(abc.ABC, Loggable): timeout: float = 300, params: dict = None, db_dict: dict = None, - kdu_name: str = None + kdu_name: str = None, + namespace: str = None ): """ Deploys of a new KDU instance. It would implicitly rely on the `install` call to deploy the Chart/Bundle @@ -183,6 +184,7 @@ class K8sConnector(abc.ABC, Loggable): It contains a dict with {collection: , filter: {}, path: }, e.g. {collection: "nsrs", filter: {_id: , path: "_admin.deployed.K8S.3"} :param kdu_name: Name of the KDU instance to be installed + :param namespace: K8s namespace to use for the KDU instance :return: True if successful """ @@ -333,7 +335,7 @@ class K8sConnector(abc.ABC, Loggable): self.warning('No db_dict => No database write') return False - self.debug('status={}'.format(status)) + self.log.debug('status={}'.format(status)) try: @@ -366,5 +368,5 @@ class K8sConnector(abc.ABC, Loggable): return True except Exception as e: - self.info('Exception writing status to database: {}'.format(e)) + self.log.info('Exception writing status to database: {}'.format(e)) return False