8098a6cac9f078c45f6e52ec94d02cffbfc146e9
[vfc/gvnfm/vnflcm.git] / lcm / lcm / nf / serializers / vnf_info_modifications.py
1 # Copyright (C) 2018 Verizon. All Rights Reserved.
2 #
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
6 #
7 #         http://www.apache.org/licenses/LICENSE-2.0
8 #
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.
14
15
16 from rest_framework import serializers
17
18 from vim_connection_info import VimConnectionInfoSerializer
19
20
21 class VnfInfoModificationsSerializer(serializers.Serializer):
22     vnfInstanceName = serializers.CharField(
23         help_text="If present, this attribute signals modifications of the " +
24         "'vnfInstanceName' attribute in 'VnfInstance'",
25         max_length=255,
26         required=False,
27         allow_null=True,
28         allow_blank=True)
29     vnfInstanceDescription = serializers.CharField(
30         help_text="If present, this attribute signals modifications of the " +
31         "'vnfInstanceDescription' attribute in 'VnfInstance'",
32         required=False,
33         allow_null=True,
34         allow_blank=True)
35     vnfdId = serializers.CharField(
36         help_text="If present, this attribute signals modifications of the " +
37         "'vnfdId' attribute in 'VnfInstance'",
38         max_length=255,
39         required=False,
40         allow_null=True,
41         allow_blank=True)
42     vnfProvider = serializers.CharField(
43         help_text="If present, this attribute signals modifications of the " +
44         "'vnfProvider'  attribute in 'VnfInstance'",
45         max_length=255,
46         required=False,
47         allow_null=True)
48     vnfProductName = serializers.CharField(
49         help_text="If present, this attribute signals modifications of the " +
50         "'vnfProductName' attribute in 'vnfInstance'",
51         max_length=255,
52         required=False,
53         allow_null=True,
54         allow_blank=True)
55     vnfSoftwareVersion = serializers.CharField(
56         help_text="If present, this attribute signals modifications of the " +
57         "'vnfSoftwareVersion' attribute in 'VnfInstance'.",
58         max_length=255,
59         required=False,
60         allow_null=True,
61         allow_blank=True)
62     vnfdVersion = serializers.CharField(
63         help_text="If present, this attribute signals modifications of the " +
64         "'vnfdVersion' attribute in 'VnfInstance'. ",
65         max_length=255,
66         required=False,
67         allow_null=True,
68         allow_blank=False)
69     vnfPkgId = serializers.CharField(
70         help_text="If present, this attribute signals modifications of the " +
71         "'vnfPkgId' attribute in 'VnfInstance'.",
72         max_length=255,
73         required=False,
74         allow_null=True,
75         allow_blank=False)
76     vnfConfigurableProperties = serializers.DictField(
77         help_text="If present, this attribute signals modifications of the " +
78         "'vnfConfigurableProperties'  attribute in 'VnfInstance'. ",
79         child=serializers.CharField(help_text="KeyValue Pairs", allow_blank=True),
80         required=False,
81         allow_null=True,)
82     vimConnectionInfo = VimConnectionInfoSerializer(
83         help_text="If present, this attribute signals modifications of certain" +
84         "entries in the 'vimConnectionInfo'",
85         required=False,
86         many=True,
87         allow_null=True)
88     metadata = serializers.DictField(
89         help_text="If present, this attribute signals modifications of certain" +
90         "'metadata' attribute in 'vnfInstance'.",
91         child=serializers.CharField(help_text="KeyValue Pairs", allow_blank=True),
92         required=False,
93         allow_null=True)
94     extensions = serializers.DictField(
95         help_text="If present, this attribute signals modifications of certain" +
96         "'extensions' attribute in 'vnfInstance'.",
97         child=serializers.CharField(help_text="KeyValue Pairs", allow_blank=True),
98         required=False,
99         allow_null=True)