From a0b2caa54c7d94664d33c83d360f144e4bc966eb Mon Sep 17 00:00:00 2001 From: "ying.yunlong" Date: Mon, 19 Mar 2018 11:16:00 +0800 Subject: Fix vfc-vnflcm instantiation swagger schema Change-Id: I9db7296a015c0fbfba70a3f4d9eb99732cb9649b Issue-ID: VFC-824 Signed-off-by: ying.yunlong --- lcm/lcm/nf/serializers.py | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/lcm/lcm/nf/serializers.py b/lcm/lcm/nf/serializers.py index d3aefebd..2150c93b 100644 --- a/lcm/lcm/nf/serializers.py +++ b/lcm/lcm/nf/serializers.py @@ -283,7 +283,7 @@ class instantiatedVnfInfoSerializer(serializers.Serializer): allow_null=True) vnfState = serializers.ChoiceField( help_text="vnfState", - choices=["STARTED", "STOPPED"], + choices=["STARTED", "STOPPED", "NOT_INSTANTIATED", "INSTANTIATED"], required=True, allow_null=True) scaleStatus = ScaleInfoSerializer( @@ -334,12 +334,14 @@ class VnfInfoSerializer(serializers.Serializer): help_text="vnfdVersion", required=False, max_length=255, - allow_null=True) + allow_null=True, + allow_blank=True) vnfProvider = serializers.CharField( help_text="vnfProvider", required=False, max_length=255, - allow_null=True) + allow_null=True, + allow_blank=True) instantiatedVnfInfo = instantiatedVnfInfoSerializer( help_text="instantiatedVnfInfo", required=True) @@ -382,6 +384,11 @@ class ExtVirtualLinkSerizlizer(serializers.Serializer): class AdditionalParamsSerializer(serializers.Serializer): + vimId = serializers.CharField( + help_text="vimId", + required=False, + max_length=255, + allow_null=True) inputs = serializers.DictField( help_text="inputs", child=serializers.CharField(help_text="custom key-value", allow_blank=True), @@ -410,6 +417,11 @@ class InstantiateVnfRequestSerializer(serializers.Serializer): required=True, max_length=255, allow_null=True) + vnfmId = serializers.CharField( + help_text="vnfmId", + required=False, + max_length=255, + allow_null=True) extVirtualLinks = serializers.ListSerializer( help_text="extVirtualLinks", child=ExtVirtualLinkSerizlizer(help_text="extVirtualLinks", required=False, allow_null=True), -- cgit 1.2.3-korg