X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osm_mon%2Fcore%2Fcommon_db.py;fp=osm_mon%2Fcore%2Fcommon_db.py;h=2d31f6ca9fffdf95af36e535ec46b0dcec936964;hb=d099b1bfa95bdfe061d14067da5730d3bc79a273;hp=33eff02fa7d697f6639d9dc0d72cc9c7ea5915ea;hpb=d1743245b3567caf6a585b79add7abe542bd13a0;p=osm%2FMON.git diff --git a/osm_mon/core/common_db.py b/osm_mon/core/common_db.py index 33eff02..2d31f6c 100644 --- a/osm_mon/core/common_db.py +++ b/osm_mon/core/common_db.py @@ -80,9 +80,18 @@ class CommonDbClient: def decrypt_vim_password(self, vim_password: str, schema_version: str, vim_id: str): return self.common_db.decrypt(vim_password, schema_version, vim_id) + def decrypt_sdnc_password(self, sdnc_password: str, schema_version: str, sdnc_id: str): + return self.common_db.decrypt(sdnc_password, schema_version, sdnc_id) + def get_vim_account_id(self, nsr_id: str, vnf_member_index: int) -> str: vnfr = self.get_vnfr(nsr_id, vnf_member_index) return vnfr['vim-account-id'] def get_vim_accounts(self): return self.common_db.get_list('vim_accounts') + + def get_sdncs(self): + return self.common_db.get_list('sdns') + + def get_sdnc(self, sdnc_id: str): + return self.common_db.get_one('sdns', {'_id': sdnc_id})