From db8ea6ae17ac2393829c61f9be61e1b25efb1fe4 Mon Sep 17 00:00:00 2001 From: Benjamin Diaz Date: Tue, 9 Oct 2018 11:44:53 -0300 Subject: [PATCH] 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 --- osm_policy_module/common/db_client.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) 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 -- 2.25.1