Refactor the notification process code
[modeling/etsicatalog.git] / catalog / packages / serializers / vnf_pkg_notifications.py
index 2a73aa3..a0fd495 100644 (file)
@@ -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,