ACTIVITY_DEPLOY_CHARM,
ACTIVITY_CHECK_CHARM_STATUS,
)
+from osm_lcm.data_utils.database.database import Database
from temporalio import activity
"""Handles Juju Controller operations.
Args:
- db (object): Data Access Object
+ db (Database): Data Access Object
"""
- def __init__(self, db):
- self.db = db
+ def __init__(self, db: Database):
+ self.db: Database = db
self.logger = logging.getLogger(f"lcm.act.{self.__class__.__name__}")
self.config = EnvironConfig()
ACTIVITY_UPDATE_LCM_OPERATION_STATE,
ACTIVITY_NSLCM_NO_OP,
)
+from osm_lcm.data_utils.database.database import Database
class NsLcmActivity:
"""
Handles NS Lifecycle Managment operations.
Args:
- db (object): Data Access Object
+ db (Database): Data Access Object
"""
- def __init__(self, db):
- self.db = db
+ def __init__(self, db: Database):
+ self.db: Database = db
self.logger = logging.getLogger(f"lcm.act.{self.__class__.__name__}")
@activity.defn(name=ACTIVITY_NSLCM_NO_OP)
UpdateVimOperationStateInput,
UpdateVimStateInput,
)
+from osm_lcm.data_utils.database.database import Database
class VimDbActivity:
"""Perform Database operations for VIM accounts.
Args:
- db (object): Data Access Object
+ db (Database): Data Access Object
"""
- def __init__(self, db):
- self.db = db
+ def __init__(self, db: Database):
+ self.db: Database = db
self.logger = logging.getLogger(f"lcm.act.{self.__class__.__name__}")
@activity.defn(name=ACTIVITY_UPDATE_VIM_STATE)
GetVnfDetailsOutput,
VnfInstantiateInput,
)
+from osm_lcm.data_utils.database.database import Database
class VnfOperations:
- def __init__(self, db):
- self.db = db
+ def __init__(self, db: Database):
+ self.db: Database = db
self.logger = logging.getLogger(f"lcm.act.{self.__class__.__name__}")
@activity.defn(name=ACTIVITY_GET_TASK_QUEUE)
"""Perform Database operations for NS accounts.
Args:
- db (object): Data Access Object
+ db (Database): Data Access Object
"""
- def __init__(self, db):
- self.db = db
+ def __init__(self, db: Database):
+ self.db: Database = db
self.logger = logging.getLogger(f"lcm.act.{self.__class__.__name__}")
@activity.defn(name=ACTIVITY_CHANGE_VNF_STATE)