Code Review
/
modeling
/
etsicatalog.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Modify notification endpoint interface definition in swagger
[modeling/etsicatalog.git]
/
catalog
/
packages
/
biz
/
notificationsutil.py
diff --git
a/catalog/packages/biz/notificationsutil.py
b/catalog/packages/biz/notificationsutil.py
index
4fa8e79
..
8a653b4
100644
(file)
--- a/
catalog/packages/biz/notificationsutil.py
+++ b/
catalog/packages/biz/notificationsutil.py
@@
-25,6
+25,7
@@
from catalog.pub.config import config as pub_config
import traceback
from django.db.models import Q
import traceback
from django.db.models import Q
+
logger = logging.getLogger(__name__)
logger = logging.getLogger(__name__)
@@
-108,8
+109,6
@@
def prepare_vnfpkg_notification(vnf_pkg_id, notification_type, pkg_change_type,
'timeStamp': catalog.pub.utils.timeutil.now_time(),
'vnfPkgId': vnf_pkg_id,
'vnfdId': vnfd_id,
'timeStamp': catalog.pub.utils.timeutil.now_time(),
'vnfPkgId': vnf_pkg_id,
'vnfdId': vnfd_id,
- 'changeType': pkg_change_type,
- 'operationalState': operational_state,
'_links': {
'vnfPackage': {
'href': 'http://%s:%s/%s/vnf_packages/%s' % (pub_config.MSB_SERVICE_IP,
'_links': {
'vnfPackage': {
'href': 'http://%s:%s/%s/vnf_packages/%s' % (pub_config.MSB_SERVICE_IP,
@@
-119,6
+118,11
@@
def prepare_vnfpkg_notification(vnf_pkg_id, notification_type, pkg_change_type,
}
}
}
}
}
}
+
+ if notification_type == "VnfPackageChangeNotification":
+ notification_content['changeType'] = pkg_change_type
+ notification_content['operationalState'] = operational_state
+
return notification_content
return notification_content