X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=catalog%2Fpackages%2Fbiz%2Fvnf_package.py;h=daf2fb2568dae5914f7990cf54e8964d01d87fef;hb=2479a0739895b15a13a07aa8260598483249c621;hp=be735957e90b74f6407a84364c31f91bfd9159a7;hpb=47aa1d9d81d42c23f128b5bc7fec52b3f404cc8b;p=modeling%2Fetsicatalog.git diff --git a/catalog/packages/biz/vnf_package.py b/catalog/packages/biz/vnf_package.py index be73595..daf2fb2 100644 --- a/catalog/packages/biz/vnf_package.py +++ b/catalog/packages/biz/vnf_package.py @@ -24,7 +24,7 @@ import zipfile from catalog.packages import const from catalog.packages.biz.common import parse_file_range, read, save -from catalog.packages.biz.notificationsutil import prepare_vnfpkg_notification, NotificationsUtil +from catalog.packages.biz.notificationsutil import PkgNotifications from catalog.pub.config.config import CATALOG_ROOT_PATH from catalog.pub.database.models import VnfPackageModel, NSPackageModel from catalog.pub.exceptions import CatalogException, ResourceNotFoundException @@ -293,14 +293,6 @@ def handle_upload_failed(vnf_pkg_id): def send_notification(pkg_id, type, pkg_change_type, operational_state=None): - data = prepare_vnfpkg_notification(vnf_pkg_id=pkg_id, - notification_type=type, - pkg_change_type=pkg_change_type, - operational_state=operational_state) - filters = { - 'vnfdId': 'vnfd_id', - 'vnfPkgId': 'vnf_pkg_id' - } - logger.debug('Notify request data = %s' % data) - logger.debug('Notify request filters = %s' % filters) - NotificationsUtil().send_notification(data, filters, True) + notify = PkgNotifications(type, pkg_id, change_type=pkg_change_type, + operational_state=operational_state) + notify.send_notification()