diff options
author | fujinhua <fu.jinhua@zte.com.cn> | 2018-02-28 16:00:07 +0800 |
---|---|---|
committer | fujinhua <fu.jinhua@zte.com.cn> | 2018-02-28 16:00:07 +0800 |
commit | 3c9595249ab1edc774af0ef936a78e868c1a5484 (patch) | |
tree | 2ab0ef3e7fe2c421235db9e4385e9c12c2486a96 | |
parent | 34cfc58740b1574679a722560069dad947c05102 (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.py | 13 |
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.", |