9290d84a61aaee7c2095b000734d83de4a302420
[vfc/gvnfm/vnflcm.git] / lcm / lcm / nf / serializers / instantiate_vnf_request.py
1 # Copyright 2018 ZTE Corporation.
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 from rest_framework import serializers
16
17 from ext_virtual_link_data import ExtVirtualLinkDataSerizlizer
18 from ext_managed_virtual_link_data import ExtManagedVirtualLinkDataSerizlizer
19 from vim_connection_info import VimConnectionInfoSerializer
20
21
22 class InstantiateVnfRequestSerializer(serializers.Serializer):
23     flavourId = serializers.CharField(
24         help_text="Identifier of the VNF deployment flavour to be instantiated.",
25         max_length=255,
26         required=True,
27         allow_null=True)
28     instantiationLevelId = serializers.CharField(
29         help_text="Identifier of the instantiation level of the deployment flavour to be instantiated. \
30         If not present, the default instantiation level as declared in the VNFD is instantiated.",
31         max_length=255,
32         required=False,
33         allow_null=True)
34     extVirtualLinks = ExtVirtualLinkDataSerizlizer(
35         help_text="Information about external VLs to connect the VNF to.",
36         many=True,
37         required=False,
38         allow_null=True)
39     extManagedVirtualLinks = ExtManagedVirtualLinkDataSerizlizer(
40         help_text="Information about internal VLs that are managed by the NFVO.",
41         many=True,
42         required=False,
43         allow_null=True)
44     vimConnectionInfo = VimConnectionInfoSerializer(
45         help_text="Information about VIM connections to be used for managing the resources for the VNF instance, \
46         or refer to external / externally-managed virtual links.",
47         many=True,
48         required=False,
49         allow_null=True)
50     localizationLanguage = serializers.CharField(
51         help_text="Localization language of the VNF to be instantiated. \
52         The value shall comply with the format defined in IETF RFC 5646.",
53         max_length=255,
54         required=False,
55         allow_null=True)
56     additionalParams = serializers.JSONField(
57         help_text="Additional input parameters for the instantiation process, \
58         specific to the VNF being instantiated, \
59         as declared in the VNFD as part of InstantiateVnfOpConfig.",
60         # child=serializers.CharField(help_text="KeyValue Pairs", allow_blank=True),
61         required=False,
62         allow_null=True)