1 # Copyright (C) 2019 ZTE. 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
16 from .ext_virtual_link_data import ExtVirtualLinkDataSerizlizer
17 from .vim_connection_info import VimConnectionInfoSerializer
18 from .ext_managed_virtual_link_data import ExtManagedVirtualLinkDataSerizlizer
21 class ChangeVnfFlavourRequestSerializer(serializers.Serializer):
22 newFlavourId = serializers.CharField(
23 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.",
35 extVirtualLinks = ExtVirtualLinkDataSerizlizer(
36 help_text="Information about external VLs to connect the VNF to.",
41 extManagedVirtualLinks = ExtManagedVirtualLinkDataSerizlizer(
42 help_text="Information about internal VLs that are managed by the NFVO.",
47 vimConnectionInfo = VimConnectionInfoSerializer(
48 help_text="Information about VIM connections to be used for managing " +
49 "the resources for the VNF instance, " +
50 "or refer to external / externally-managed virtual links." +
51 "This attribute shall only be supported and may be present if VNF-related " +
52 "resource management in direct mode is applicable.",
57 additionalParams = serializers.DictField(
58 help_text="Additional input parameters for the flavour change process, " +
59 "specific to the VNF being modified, " +
60 "as declared in the VNFD as part of 'ChangeVnfFlavourOpConfig'.",