X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FN2VC.git;a=blobdiff_plain;f=n2vc%2Fk8s_conn.py;h=a82919acc5d049bd732f15f236d734524263844a;hp=f9aefa722e19cbfd6f060e3e95ef8aceae0b97c1;hb=e2bd3dab53da1ac8ff732b71d5bb66d06e01e368;hpb=12aa0840d594fcb9c236fbb4d0e4aa85687ab4f8;ds=sidebyside diff --git a/n2vc/k8s_conn.py b/n2vc/k8s_conn.py index f9aefa7..a82919a 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( @@ -122,6 +122,20 @@ class K8sConnector(abc.ABC, Loggable): :return: True if successful """ + @abc.abstractmethod + async def synchronize_repos( + self, + cluster_uuid: str, + name: str + ): + """ + Synchronizes the list of repositories created in the cluster with + the repositories added by the NBI + + :param cluster_uuid: the cluster + :return: List of repositories deleted from the cluster and dictionary with repos added + """ + @abc.abstractmethod async def reset( self, @@ -319,7 +333,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: @@ -352,5 +366,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