1 # Copyright (C) 2019 Verizon. All Rights Reserved
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
15 from rest_framework import serializers
17 from catalog.packages.const import NSDM_NOTIFICATION_TYPES
20 class NsdmNotificationsFilter(serializers.Serializer):
21 notificationTypes = serializers.ListField(
22 child=serializers.ChoiceField(
24 choices=NSDM_NOTIFICATION_TYPES
26 help_text="Match particular notification types",
30 nsdInfoId = serializers.ListField(
31 child=serializers.CharField(),
32 help_text="Match NS packages with particular nsdInfoIds",
36 nsdId = serializers.ListField(
37 child=serializers.CharField(),
38 help_text="Match NS Packages with particular nsdIds",
42 nsdName = serializers.ListField(
43 child=serializers.CharField(
47 help_text="Match NS Packages with particular nsdNames",
51 nsdVersion = serializers.ListField(
52 child=serializers.CharField(
56 help_text="match NS packages that belong to certain nsdversion",
60 nsdInvariantId = serializers.ListField(
61 child=serializers.CharField(),
62 help_text="Match NS Packages with particular nsdInvariantIds",
66 vnfPkgIds = serializers.ListField(
67 child=serializers.CharField(),
68 help_text="Match NS Packages that has VNF PackageIds",
72 nestedNsdInfoIds = serializers.ListField(
73 child=serializers.CharField(),
74 help_text="Match NS Packages with particular nsdInvariantIds",
78 nsdOnboardingState = serializers.ListField(
79 child=serializers.ChoiceField(
88 help_text="Match NS Packages with particular NS Onboarding State",
92 nsdOperationalState = serializers.ListField(
93 child=serializers.ChoiceField(
95 choices=['ENABLED', 'DISABLED']
97 help_text="Match NS Packages with particular NS Operational State",
101 nsdUsageState = serializers.ListField(
102 child=serializers.ChoiceField(
104 choices=['IN_USE', 'NOT_IN_USE']
106 help_text="Match NS Packages with particular NS Usage State",
110 pnfdInfoIds = serializers.ListField(
111 child=serializers.CharField(),
112 help_text="Match PF packages with particular pnfdInfoIds",
116 pnfdId = serializers.ListField(
117 child=serializers.CharField(),
118 help_text="Match PF packages with particular pnfdInfoIds",
122 pnfdName = serializers.ListField(
123 child=serializers.CharField(
127 help_text="Match PF Packages with particular pnfdNames",
131 pnfdVersion = serializers.ListField(
132 child=serializers.CharField(
136 help_text="match PF packages that belong to certain pnfd version",
140 pnfdProvider = serializers.ListField(
141 child=serializers.CharField(
145 help_text="Match PF Packages with particular pnfdProvider",
149 pnfdInvariantId = serializers.ListField(
150 child=serializers.CharField(),
151 help_text="Match PF Packages with particular pnfdInvariantIds",
155 pnfdOnboardingState = serializers.ListField(
156 child=serializers.ChoiceField(
165 help_text="Match PF Packages with particular PNF Onboarding State ",
169 pnfdUsageState = serializers.ListField(
170 child=serializers.ChoiceField(
172 choices=['IN_USE', 'NOT_IN_USE']
174 help_text="Match PF Packages with particular PNF usage State",