Fix bug 1053 05/8805/2 feature7184
authorsousaedu <eduardo.sousa@canonical.com>
Tue, 21 Apr 2020 11:08:14 +0000 (12:08 +0100)
committersousaedu <eduardo.sousa@canonical.com>
Thu, 30 Apr 2020 09:21:09 +0000 (11:21 +0200)
This fixes bug 1053 by making the sync call before any
of the other functions requires the package.

Change-Id: I95f61fd88cfa84fbb29e05b40f95c82f84e7cf84
Signed-off-by: sousaedu <eduardo.sousa@canonical.com>
osm_lcm/ns.py

index dc53b98..55bebbe 100644 (file)
@@ -1168,7 +1168,6 @@ class NsLcm(LcmBase):
                     element_under_configuration = kdu_name
 
             # Get artifact path
-            self.fs.sync()  # Sync from FSMongo
             artifact_path = "{}/{}/charms/{}".format(
                 base_folder["folder"],
                 base_folder["pkg-dir"],
@@ -1548,6 +1547,9 @@ class NsLcm(LcmBase):
         logging_text = "Task ns={} instantiate={} ".format(nsr_id, nslcmop_id)
         self.logger.debug(logging_text + "Enter")
 
+        # Sync from FSMongo
+        self.fs.sync()
+
         # get all needed from database
 
         # database nsrs record