X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=catalog%2Fpackages%2Fserializers%2Fvnf_pkg_notifications.py;h=c1dab6a6fbdd9305febd46e1306727678dd9833e;hb=a40cb469e3aa364fb2a0f016632bc642b4ecbdb7;hp=2a73aa3ab03ca554c2660401619959a0f91ceb51;hpb=0409420992ea31df6cbaa28e5cbd0ff6ecd03b36;p=modeling%2Fetsicatalog.git diff --git a/catalog/packages/serializers/vnf_pkg_notifications.py b/catalog/packages/serializers/vnf_pkg_notifications.py index 2a73aa3..c1dab6a 100644 --- a/catalog/packages/serializers/vnf_pkg_notifications.py +++ b/catalog/packages/serializers/vnf_pkg_notifications.py @@ -43,7 +43,8 @@ class vnfProductsSerializer(serializers.Serializer): required=True, allow_null=False ) - versions = VersionSerializer( + versions = serializers.ListField( + child=VersionSerializer(), help_text="match VNF packages that contain " "VNF products with certain versions", required=False, @@ -58,7 +59,8 @@ class vnfProductsProvidersSerializer(serializers.Serializer): required=True, allow_null=False ) - vnfProducts = vnfProductsSerializer( + vnfProducts = serializers.ListField( + child=vnfProductsSerializer(), help_text="match VNF packages that contain " "VNF products with certain product names, " "from one particular provider", @@ -85,14 +87,14 @@ class PkgmNotificationsFilter(serializers.Serializer): required=False ) vnfdId = serializers.ListField( - child=serializers.UUIDField(), + child=serializers.CharField(), help_text="Match VNF packages with a VNFD identifier" "listed in the attribute", required=False, allow_null=False ) vnfPkgId = serializers.ListField( - child=serializers.UUIDField(), + child=serializers.CharField(), help_text="Match VNF packages with a VNFD identifier" "listed in the attribute", required=False, @@ -149,23 +151,29 @@ 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, allow_null=False ) - vnfPkgId = serializers.UUIDField( + vnfPkgId = serializers.CharField( help_text="Identifier of the VNF package.", required=True, allow_null=False ) - vnfdId = serializers.UUIDField( + vnfdId = serializers.CharField( help_text="This identifier, which is managed by the VNF provider, " "identifies the VNF package and the VNFD in a globally unique way.", required=True, @@ -202,7 +210,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,12 +221,18 @@ class PkgOnboardingNotificationSerializer(serializers.Serializer): required=True, allow_null=False ) - vnfPkgId = serializers.UUIDField( + 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.CharField( help_text="Identifier of the VNF package.", required=True, allow_null=False ) - vnfdId = serializers.UUIDField( + vnfdId = serializers.CharField( help_text="This identifier, which is managed by the VNF provider, " "identifies the VNF package and the VNFD in a globally unique way.", required=True,