summaryrefslogtreecommitdiffstats
path: root/catalog/packages/serializers
diff options
context:
space:
mode:
authorhongyuzhao <zhao.hongyu@zte.com.cn>2019-12-17 16:37:25 +0800
committerhongyuzhao <zhao.hongyu@zte.com.cn>2020-01-04 15:35:30 +0800
commit2479a0739895b15a13a07aa8260598483249c621 (patch)
treead6028ebf9490fa63e19dc5f150d555c003517df /catalog/packages/serializers
parent47aa1d9d81d42c23f128b5bc7fec52b3f404cc8b (diff)
Refactor the notification process code
Change-Id: Ie12527c77e5cacc55bdc3bc1505ec130e9d3c582 Issue-ID: MODELING-269 Signed-off-by: hongyuzhao <zhao.hongyu@zte.com.cn>
Diffstat (limited to 'catalog/packages/serializers')
-rw-r--r--catalog/packages/serializers/vnf_pkg_notifications.py16
1 files changed, 14 insertions, 2 deletions
diff --git a/catalog/packages/serializers/vnf_pkg_notifications.py b/catalog/packages/serializers/vnf_pkg_notifications.py
index 2a73aa3..a0fd495 100644
--- a/catalog/packages/serializers/vnf_pkg_notifications.py
+++ b/catalog/packages/serializers/vnf_pkg_notifications.py
@@ -149,12 +149,18 @@ class PkgChangeNotificationSerializer(serializers.Serializer):
required=True,
allow_null=False
)
- notificationTypes = serializers.ChoiceField(
+ notificationType = serializers.ChoiceField(
help_text="Discriminator for the different notification types.",
choices=["VnfPackageChangeNotification"],
required=True,
allow_null=False
)
+ timeStamp = serializers.DateTimeField(
+ help_text="Date-time of the generation of the notification.",
+ format="%Y-%m-%d %H:%M:%S",
+ required=True,
+ allow_null=False
+ )
subscriptionId = serializers.CharField(
help_text="Identifier of the subscription that this notification relates to.",
required=True,
@@ -202,7 +208,7 @@ class PkgOnboardingNotificationSerializer(serializers.Serializer):
required=True,
allow_null=False
)
- notificationTypes = serializers.ChoiceField(
+ notificationType = serializers.ChoiceField(
help_text="Discriminator for the different notification types.",
choices=["VnfPackageOnboardingNotification"],
required=True,
@@ -213,6 +219,12 @@ class PkgOnboardingNotificationSerializer(serializers.Serializer):
required=True,
allow_null=False
)
+ timeStamp = serializers.DateTimeField(
+ help_text="Date-time of the generation of the notification.",
+ format="%Y-%m-%d %H:%M:%S",
+ required=True,
+ allow_null=False
+ )
vnfPkgId = serializers.UUIDField(
help_text="Identifier of the VNF package.",
required=True,