1 # Copyright (C) 2018 Verizon. 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.
16 from rest_framework import serializers
18 from vim_connection_info import VimConnectionInfoSerializer
21 class VnfInfoModificationsSerializer(serializers.Serializer):
22 vnfInstanceName = serializers.CharField(
23 help_text="If present, this attribute signals modifications of the " +
24 "'vnfInstanceName' attribute in 'VnfInstance'",
29 vnfInstanceDescription = serializers.CharField(
30 help_text="If present, this attribute signals modifications of the " +
31 "'vnfInstanceDescription' attribute in 'VnfInstance'",
35 vnfdId = serializers.CharField(
36 help_text="If present, this attribute signals modifications of the " +
37 "'vnfdId' attribute in 'VnfInstance'",
42 vnfProvider = serializers.CharField(
43 help_text="If present, this attribute signals modifications of the " +
44 "'vnfProvider' attribute in 'VnfInstance'",
48 vnfProductName = serializers.CharField(
49 help_text="If present, this attribute signals modifications of the " +
50 "'vnfProductName' attribute in 'vnfInstance'",
55 vnfSoftwareVersion = serializers.CharField(
56 help_text="If present, this attribute signals modifications of the " +
57 "'vnfSoftwareVersion' attribute in 'VnfInstance'.",
62 vnfdVersion = serializers.CharField(
63 help_text="If present, this attribute signals modifications of the " +
64 "'vnfdVersion' attribute in 'VnfInstance'. ",
69 vnfPkgId = serializers.CharField(
70 help_text="If present, this attribute signals modifications of the " +
71 "'vnfPkgId' attribute in 'VnfInstance'.",
76 vnfConfigurableProperties = serializers.DictField(
77 help_text="If present, this attribute signals modifications of the " +
78 "'vnfConfigurableProperties' attribute in 'VnfInstance'. ",
79 child=serializers.CharField(help_text="KeyValue Pairs", allow_blank=True),
82 vimConnectionInfo = VimConnectionInfoSerializer(
83 help_text="If present, this attribute signals modifications of certain" +
84 "entries in the 'vimConnectionInfo'",
88 metadata = serializers.DictField(
89 help_text="If present, this attribute signals modifications of certain" +
90 "'metadata' attribute in 'vnfInstance'.",
91 child=serializers.CharField(help_text="KeyValue Pairs", allow_blank=True),
94 extensions = serializers.DictField(
95 help_text="If present, this attribute signals modifications of certain" +
96 "'extensions' attribute in 'vnfInstance'.",
97 child=serializers.CharField(help_text="KeyValue Pairs", allow_blank=True),