Merge from master
[osm/SO.git] / rwlaunchpad / plugins / rwpkgmgr / rift / tasklets / rwpkgmgr / subscriber / download_status.py
index b7bed38..6bca858 100644 (file)
@@ -36,21 +36,22 @@ from gi.repository import (
 )
 
 class DownloadStatusSubscriber(mano_dts.AbstractOpdataSubscriber):
+    def __init__(self, log, dts, loop, project, callback):
+        super().__init__(log, dts, loop, project, callback)
+
+    def get_xpath(self):
+        return self._project.add_project(
+            "D,/rw-pkg-mgmt:download-jobs/rw-pkg-mgmt:job")
 
-    def __init__(self, log, dts, loop, callback):
-        super().__init__(log, dts, loop, callback)
-    
-    def get_xpath(self): 
-        return ("D,/rw-pkg-mgmt:download-jobs/rw-pkg-mgmt:job")
 
 class VnfdStatusSubscriber(DownloadStatusSubscriber): 
     DOWNLOAD_DIR = store.VnfdPackageFilesystemStore.DEFAULT_ROOT_DIR
     MODULE_DESC = 'vnfd rw-vnfd'.split()
     DESC_TYPE = 'vnfd'
     
-    def __init__(self, log, dts, loop):
-        super().__init__(log, dts, loop, self.on_change)
-        self.subscriber = mano_dts.VnfdCatalogSubscriber(log, dts, loop)
+    def __init__(self, log, dts, loop, project):
+        super().__init__(log, dts, loop, project, self.on_change)
+        self.subscriber = mano_dts.VnfdCatalogSubscriber(log, dts, loop, project)
 
     def on_change(self, msg, action): 
         log_msg = "1. Vnfd called w/ msg attributes: {} id {} name {} action: {}".format(repr(msg), msg.id, msg.name, repr(action))
@@ -70,9 +71,9 @@ class NsdStatusSubscriber(DownloadStatusSubscriber):
     MODULE_DESC = 'nsd rw-nsd'.split()
     DESC_TYPE = 'nsd'
     
-    def __init__(self, log, dts, loop):
-        super().__init__(log, dts, loop, self.on_change)
-        self.subscriber = mano_dts.NsdCatalogSubscriber(log, dts, loop)
+    def __init__(self, log, dts, loop, project):
+        super().__init__(log, dts, loop, project, self.on_change)
+        self.subscriber = mano_dts.NsdCatalogSubscriber(log, dts, loop, project)
 
     def on_change(self, msg, action): 
         log_msg = "1. Nsd called w/ msg attributes: {} id {} name {} action: {}".format(repr(msg), msg.id, msg.name, repr(action))