From: Benjamin Diaz Date: Tue, 9 Oct 2018 14:44:53 +0000 (-0300) Subject: Removes filter param from osm-common function calls X-Git-Tag: v5.0.0~17 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=db8ea6ae17ac2393829c61f9be61e1b25efb1fe4;hp=29d590a038ce5c8d745f97ab935393c0bd6a8228;p=osm%2FPOL.git Removes filter param from osm-common function calls The filter argument was replaced to q_filter. Instead of renaming the keyword arg, now functions are called using only positional args. Signed-off-by: Benjamin Diaz --- diff --git a/osm_policy_module/common/db_client.py b/osm_policy_module/common/db_client.py index e93747f..1eed0f3 100644 --- a/osm_policy_module/common/db_client.py +++ b/osm_policy_module/common/db_client.py @@ -35,8 +35,8 @@ class DbClient: 'name': 'osm'}) def get_vnfr(self, nsr_id: str, member_index: int): - vnfr = self.common_db.get_one(table="vnfrs", - filter={"nsr-id-ref": nsr_id, "member-vnf-index-ref": str(member_index)}) + vnfr = self.common_db.get_one("vnfrs", + {"nsr-id-ref": nsr_id, "member-vnf-index-ref": str(member_index)}) return vnfr def get_vnfrs(self, nsr_id: str): @@ -44,16 +44,16 @@ class DbClient: self.get_nsr(nsr_id)['nsd']['constituent-vnfd']] def get_vnfd(self, vnfd_id: str): - vnfr = self.common_db.get_one(table="vnfds", - filter={"_id": vnfd_id}) + vnfr = self.common_db.get_one("vnfds", + {"_id": vnfd_id}) return vnfr def get_nsr(self, nsr_id: str): - nsr = self.common_db.get_one(table="nsrs", - filter={"id": nsr_id}) + nsr = self.common_db.get_one("nsrs", + {"id": nsr_id}) return nsr def get_nslcmop(self, nslcmop_id): - nslcmop = self.common_db.get_one(table="nslcmops", - filter={"_id": nslcmop_id}) + nslcmop = self.common_db.get_one("nslcmops", + {"_id": nslcmop_id}) return nslcmop