Fix bug 1053
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>
diff --git a/osm_lcm/ns.py b/osm_lcm/ns.py
index dc53b98..55bebbe 100644
--- a/osm_lcm/ns.py
+++ b/osm_lcm/ns.py
@@ -1168,7 +1168,6 @@
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 @@
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