X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=catalog%2Fpackages%2Fbiz%2Fnotificationsutil.py;h=114f922c11b2fb262e309aec2d387e60f8f06a72;hb=9812671ef6df484b944355bf5101732d5cf9ea03;hp=8cdfd80ce82d77fdd3847241c6548131b2be021b;hpb=14eb438e920a9905e7254bf3aeb6bc4cc423e6b3;p=modeling%2Fetsicatalog.git diff --git a/catalog/packages/biz/notificationsutil.py b/catalog/packages/biz/notificationsutil.py index 8cdfd80..114f922 100644 --- a/catalog/packages/biz/notificationsutil.py +++ b/catalog/packages/biz/notificationsutil.py @@ -41,7 +41,7 @@ class NotificationsUtil(object): def send_notification(self): notification = self.prepare_notification() - subscriptions_filter = {v + "__contains": notification[k] for k, v in self.filters.items()} + subscriptions_filter = {v + "__contains": notification[k] for k, v in self.filter.items()} subscriptions_filter = remove_none_key(subscriptions_filter) logger.debug('send_notification subscriptions_filter = %s' % subscriptions_filter) q1 = Q() @@ -51,7 +51,7 @@ class NotificationsUtil(object): subscriptions = self.SubscriptionModel.objects.filter(q1) if not subscriptions.exists(): - logger.info("No subscriptions created for the filters %s" % notification) + logger.info("No subscriptions created for the filter %s" % notification) return logger.info("Start sending notifications") for sub in subscriptions: @@ -102,7 +102,7 @@ class NotificationsUtil(object): class PkgNotifications(NotificationsUtil): def __init__(self, notification_type, vnf_pkg_id, change_type=None, operational_state=None): super(PkgNotifications, self).__init__(notification_type) - self.filters = { + self.filter = { 'vnfdId': 'vnfd_id', 'vnfPkgId': 'vnf_pkg_id' } @@ -150,7 +150,7 @@ class PkgNotifications(NotificationsUtil): class NsdNotifications(NotificationsUtil): def __init__(self, notification_type, nsd_info_id, nsd_id, failure_details=None, operational_state=None): super(NsdNotifications, self).__init__(notification_type) - self.filters = { + self.filter = { 'nsdInfoId': 'nsdInfoId', 'nsdId': 'nsdId', } @@ -195,7 +195,7 @@ class NsdNotifications(NotificationsUtil): class PnfNotifications(NotificationsUtil): def __init__(self, notification_type, pnfd_info_id, pnfd_id, failure_details=None): super(PnfNotifications, self).__init__(notification_type) - self.filters = { + self.filter = { 'pnfdId': 'pnfdId', 'pnfdInfoIds': 'pnfdInfoIds', }