1 # Copyright 2018 ZTE Corporation.
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 ext_virtual_link_data import ExtVirtualLinkDataSerizlizer
18 from ext_managed_virtual_link_data import ExtManagedVirtualLinkDataSerizlizer
19 from vim_connection_info import VimConnectionInfoSerializer
22 class InstantiateVnfRequestSerializer(serializers.Serializer):
23 flavourId = serializers.CharField(
24 help_text="Identifier of the VNF deployment flavour to be instantiated.",
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.",
34 extVirtualLinks = ExtVirtualLinkDataSerizlizer(
35 help_text="Information about external VLs to connect the VNF to.",
39 extManagedVirtualLinks = ExtManagedVirtualLinkDataSerizlizer(
40 help_text="Information about internal VLs that are managed by the NFVO.",
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.",
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.",
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),