Add change ext conn api
[vfc/gvnfm/vnflcm.git] / lcm / lcm / nf / serializers / change_ext_vnf_connectivity_request.py
1 # Copyright (C) 2019 ZTE. 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 from rest_framework import serializers
16 from .ext_virtual_link_data import ExtVirtualLinkDataSerizlizer
17 from .vim_connection_info import VimConnectionInfoSerializer
18
19
20 class ChangeExtVnfConnectivityRequestSerializer(serializers.Serializer):
21     extVirtualLinks = ExtVirtualLinkDataSerizlizer(
22         help_text="Information about external VLs to change (e.g. connect the VNF to).",
23         many=True,
24         required=True,
25         allow_null=False
26     )
27     vimConnectionInfo = VimConnectionInfoSerializer(
28         help_text="Information about VIM connections to be used for " +
29         "managing the resources for the VNF instance, " +
30         "or refer to external virtual links." +
31         "This attribute shall only be supported and may be present " +
32         "if VNF-related resource management in direct mode is applicable.",
33         many=True,
34         required=False,
35         allow_null=True
36     )
37     additionalParams = serializers.DictField(
38         help_text="Additional parameters passed by the NFVO as input to the process, " +
39         "specific to the VNF of which the external connectivity is changed, " +
40         "as declared in the VNFD as part of 'ChangeExtVnfConnectivityOpConfig'.",
41         required=False,
42         allow_null=True
43     )