1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
# Copyright 2018 ZTE Corporation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from rest_framework import serializers
from .scale_info import ScaleInfoSerializer
from .ext_cp_info import ExtCpInfoSerializer
from .ext_virtual_link_info import ExtVirtualLinkInfoSerializer
from .ext_managed_virtual_link_info import ExtManagedVirtualLinkInfoSerializer
from .vnfc_resource_info import VnfcResourceInfoSerializer
from .vnf_virtual_link_resource_info import VnfVirtualLinkResourceInfoSerializer
from .virtual_storage_resource_info import VirtualStorageResourceInfoSerializer
class InstantiatedVnfInfoSerializer(serializers.Serializer):
flavourId = serializers.CharField(
help_text="Identifier of the VNF deployment flavour applied to this VNF instance.",
max_length=255,
required=True,
allow_null=True,
allow_blank=False)
vnfState = serializers.ChoiceField(
help_text="State of the VNF instance.",
choices=["STARTED", "STOPPED"],
required=True,
allow_null=True,
allow_blank=False)
scaleStatus = ScaleInfoSerializer(
help_text="Scale status of the VNF, one entry per aspect. \
Represents for every scaling aspect how big the VNF has been scaled w.r.t. that aspect.",
many=True,
required=False,
allow_null=True)
extCpInfo = ExtCpInfoSerializer(
help_text="Information about the external CPs exposed by the VNF instance.",
many=True,
required=True,
allow_null=False)
extVirtualLinkInfo = ExtVirtualLinkInfoSerializer(
help_text="Information about the external VLs the VNF instance is connected to.",
many=True,
required=False,
allow_null=True)
extManagedVirtualLinkInfo = ExtManagedVirtualLinkInfoSerializer(
help_text="Information about the externally-managed internal VLs of the VNF instance.",
many=True,
required=False,
allow_null=True)
monitoringParameters = serializers.ListSerializer(
help_text="Active monitoring parameters.",
child=serializers.CharField(help_text="monitoring parameter", allow_blank=True),
required=False,
allow_null=True)
localizationLanguage = serializers.CharField(
help_text="Information about localization language of the VNF.",
max_length=255,
required=False,
allow_null=True,
allow_blank=True)
vnfcResourceInfo = VnfcResourceInfoSerializer(
help_text="Information about the virtualised compute and storage resources used by the VNFCs of the VNF instance.",
many=True,
required=False,
allow_null=True)
vnfVirtualLinkResourceInfo = VnfVirtualLinkResourceInfoSerializer(
help_text="Information about the virtualised network resources used by the VLs of the VNF instance.",
many=True,
required=False,
allow_null=True)
virtualStorageResourceInfo = VirtualStorageResourceInfoSerializer(
help_text="Information about the virtualised storage resources used as storage for the VNF instance.",
many=True,
required=False,
allow_null=True)
|