aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfujinhua <fu.jinhua@zte.com.cn>2018-02-28 16:00:07 +0800
committerfujinhua <fu.jinhua@zte.com.cn>2018-02-28 16:00:07 +0800
commit3c9595249ab1edc774af0ef936a78e868c1a5484 (patch)
tree2ab0ef3e7fe2c421235db9e4385e9c12c2486a96
parent34cfc58740b1574679a722560069dad947c05102 (diff)
Add CpProtocolData Serializer
Change-Id: Ic8d1812705fca0a495be7b65908a2a951989de02 Issue-ID: VFC-779 Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
-rw-r--r--lcm/v2/serializers.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/lcm/v2/serializers.py b/lcm/v2/serializers.py
index 02d1bcfb..2abaad5f 100644
--- a/lcm/v2/serializers.py
+++ b/lcm/v2/serializers.py
@@ -271,6 +271,19 @@ class IpOverEthernetAddressDataSerializer(serializers.Serializer):
)
+class CpProtocolDataSerializer(serializers.Serializer):
+ layerProtocol = serializers.ChoiceField(
+ help_text="Identifier of layer(s) and protocol(s).",
+ choices=["IP_OVER_ETHERNET"],
+ required=True
+ )
+ ipOverEthernet = IpOverEthernetAddressDataSerializer(
+ help_text="Network address data for IP over Ethernet to assign to the extCP instance.",
+ required=False,
+ allow_null=True,
+ )
+
+
class GrantSerializer(serializers.Serializer):
id = serializers.CharField(
help_text="Identifier of the grant.",