-#
-# Copyright 2016 RIFT.IO Inc
+#
+# Copyright 2016-2017 RIFT.IO Inc
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
from . import tosca
import gi
-gi.require_version('NsdYang', '1.0')
-gi.require_version('VnfdYang', '1.0')
gi.require_version('RwPkgMgmtYang', '1.0')
from gi.repository import (
- NsdYang,
- VnfdYang,
RwPkgMgmtYang)
import rift.mano.dts as mano_dts
class ExportRpcHandler(mano_dts.AbstractRpcHandler):
- def __init__(self, log, dts, loop, application, store_map, exporter, catalog_map):
+ def __init__(self, application, catalog_map):
"""
Args:
application: UploaderApplication
- store_map: dict containing VnfdStore & NsdStore
- exporter : DescriptorPackageArchiveExporter
calalog_map: Dict containing Vnfds and Nsd onboarding.
"""
- super().__init__(log, dts, loop)
+ super().__init__(application.log, application.dts, application.loop)
self.application = application
- self.store_map = store_map
- self.exporter = exporter
+ self.store_map = application.package_store_map
+ self.exporter = application.exporter
self.catalog_map = catalog_map
- self.log = log
@property
def xpath(self):
# Parse the IDs
desc_id = msg.package_id
- catalog = self.catalog_map[desc_type]
+ catalog = self.catalog_map[desc_type](project=msg.project_name)
if desc_id not in catalog:
raise ValueError("Unable to find package ID: {}".format(desc_id))