From 7b6d7f124aafc1cff25428bc1303e133a349ecf4 Mon Sep 17 00:00:00 2001
From: cuongmax <cuongbo97@gmail.com>
Date: Sun, 20 Jun 2021 01:00:36 +0700
Subject: [PATCH] Fix bug read ns record: not found any nsr with filter

Change-Id: I4fc642080dcefe18a6465ef5536e0cab4f04de75
Signed-off-by: cuongmax <cuongbo97@gmail.com>
---
 osm_lcm/ns.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/osm_lcm/ns.py b/osm_lcm/ns.py
index cb281e4..cc0937f 100644
--- a/osm_lcm/ns.py
+++ b/osm_lcm/ns.py
@@ -237,7 +237,7 @@ class NsLcm(LcmBase):
             nsr_id = filter.get("_id")
 
             # read ns record from database
-            nsr = self.db.get_one(table="nsrs", q_filter=filter)
+            nsr = self.db.get_one(table="nslcmops", q_filter=filter)
             current_ns_status = nsr.get("nsState")
 
             # get vca status for NS
@@ -320,7 +320,7 @@ class NsLcm(LcmBase):
                     db_dict["nsState"] = "READY"
 
             # write to database
-            self.update_db_2("nsrs", nsr_id, db_dict)
+            self.update_db_2("nslcmops", nsr_id, db_dict)
 
         except (asyncio.CancelledError, asyncio.TimeoutError):
             raise
-- 
GitLab