aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryangyan <yangyanyj@chinamobile.com>2019-03-26 15:35:33 +0800
committeryangyan <yangyanyj@chinamobile.com>2019-03-26 15:35:44 +0800
commitc52d182d9708a0c95d3af733c15b2c5f266f0583 (patch)
tree2896fe13f6f0d1cc6f176d239d118e132b7bcd3b
parent3a732a86e10186ad4639424a24996240d549b404 (diff)
fix serializer bug
Change-Id: I283598ef88cbf3c9ec7deeb8fd962eb46985968b Issue-ID: VFC-1317 Signed-off-by: yangyan <yangyanyj@chinamobile.com>
-rw-r--r--lcm/ns/serializers/sol/ext_managed_virtual_link_info.py8
-rw-r--r--lcm/ns/serializers/sol/ns_instance.py39
2 files changed, 26 insertions, 21 deletions
diff --git a/lcm/ns/serializers/sol/ext_managed_virtual_link_info.py b/lcm/ns/serializers/sol/ext_managed_virtual_link_info.py
index 72a98cee..3e6bbb77 100644
--- a/lcm/ns/serializers/sol/ext_managed_virtual_link_info.py
+++ b/lcm/ns/serializers/sol/ext_managed_virtual_link_info.py
@@ -29,12 +29,16 @@ class VnfLinkPortInfo(serializers.Serializer):
allow_null=False)
cpInstanceId = serializers.CharField(
help_text="When the link port is used for external connectivity by the VNF, \
- this attribute represents the identifier of the external CP of the VNF to be connected to this link port.",
+ this attribute represents the identifier of the external CP of the VNF to be connected to this \
+ link port.",
max_length=255,
required=False,
allow_null=True,
allow_blank=True)
- cpInstanceType = serializers.ChoiceField(required=False, choices=['VNFC_CP', 'EXT_CP'], help_text="Type of the CP instance that is identified by cpInstanceId."),
+ cpInstanceType = serializers.ChoiceField(
+ required=False,
+ choices=['VNFC_CP', 'EXT_CP'],
+ help_text="Type of the CP instance that is identified by cpInstanceId.")
class ExtManagedVirtualLinkInfo(serializers.Serializer):
diff --git a/lcm/ns/serializers/sol/ns_instance.py b/lcm/ns/serializers/sol/ns_instance.py
index 6140654e..f8e3d824 100644
--- a/lcm/ns/serializers/sol/ns_instance.py
+++ b/lcm/ns/serializers/sol/ns_instance.py
@@ -19,9 +19,10 @@ from lcm.ns.serializers.sol.pub_serializers import LinkSerializer
from lcm.ns.serializers.sol.cp_serializers import CpProtocolDataSerializer, CpProtocolInfoSerializer, VnfExtCpInfoSerializer
from lcm.ns.serializers.sol.resource_handle import ResourceHandleSerializer
from lcm.ns.serializers.sol.ext_virtual_link_info import ExtVirtualLinkInfoSerializer
-from lcm.ns.serializers.sol.ext_managed_virtual_link_info import ExtManagedVirtualLinkInfo
+from lcm.ns.serializers.sol.ext_managed_virtual_link_info import ExtManagedVirtualLinkInfo, VnfLinkPortInfo
from lcm.ns.serializers.sol.pub_serializers import AffinityOrAntiAffinityRuleSerializer
+
INSTANTIATION_STATE = [
"NOT_INSTANTIATED",
"INSTANTIATED"
@@ -110,24 +111,24 @@ class VnfcResourceInfoSerializer(serializers.Serializer):
allow_null=True)
-class VnfLinkPortInfo(serializers.Serializer):
- id = serializers.CharField(
- help_text="Identifier of this link port as provided by the entity that has created the link port.",
- max_length=255,
- required=True,
- allow_null=False,
- allow_blank=False)
- resourceHandle = ResourceHandleSerializer(
- help_text="Reference to the virtualised network resource realizing this link port.",
- required=True,
- allow_null=False)
- cpInstanceId = serializers.CharField(
- help_text="When the link port is used for external connectivity by the VNF, \
- this attribute represents the identifier of the external CP of the VNF to be connected to this link port.",
- max_length=255,
- required=False,
- allow_null=True,
- allow_blank=True)
+# class VnfLinkPortInfo(serializers.Serializer):
+# id = serializers.CharField(
+# help_text="Identifier of this link port as provided by the entity that has created the link port.",
+# max_length=255,
+# required=True,
+# allow_null=False,
+# allow_blank=False)
+# resourceHandle = ResourceHandleSerializer(
+# help_text="Reference to the virtualised network resource realizing this link port.",
+# required=True,
+# allow_null=False)
+# cpInstanceId = serializers.CharField(
+# help_text="When the link port is used for external connectivity by the VNF, \
+# this attribute represents the identifier of the external CP of the VNF to be connected to this link port.",
+# max_length=255,
+# required=False,
+# allow_null=True,
+# allow_blank=True)
class VnfVirtualLinkResourceInfoSerializer(serializers.Serializer):