From: fujinhua Date: Wed, 7 Feb 2018 07:47:20 +0000 (+0800) Subject: Add scale vnf req serializer X-Git-Tag: v1.1.0~157 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=8c2bdca0aabd9d55e3e014778b984f62c29ed6da;p=vfc%2Fnfvo%2Flcm.git Add scale vnf req serializer Change-Id: I397f284f19824dd5e96b82f907b68b2402c7cb9a Issue-ID: VFC-714 Signed-off-by: fujinhua --- diff --git a/lcm/ns/vnfs/serializers.py b/lcm/ns/vnfs/serializers.py index 497d350c..e01aaf3d 100644 --- a/lcm/ns/vnfs/serializers.py +++ b/lcm/ns/vnfs/serializers.py @@ -159,3 +159,19 @@ class NotifyLcmReqSerializer(serializers.Serializer): affectedVl = AffectedVirtualLinkSerializer(help_text="Affected VL", many=True) affectedCp = AffectedCpSerializer(help_text="Affected CP", many=True) affectedVirtualStorage = AffectedVirtualStorage(help_text="Affected Virtual Storage(Not supported)", many=True) + + +class VnfScaleReqSerializer(serializers.Serializer): + type = serializers.ChoiceField( + help_text="Direction of the scaling", + choices=["SCALE_IN", "SCALE_OUT"], + required=True + ) + aspectId = serializers.CharField(help_text="Aspect ID of the VNF that is requested to be scaled", required=False, allow_null=True) + numberOfSteps = serializers.CharField(help_text="Number of scaling steps to be executed as part of this ScaleVnf operation", required=False, allow_null=True) + additionalParam = serializers.DictField( + help_text="Additional parameters passed by the NFVO as input to the scaling process, specific to the VNF being scaled", + child=serializers.CharField(help_text="Additional parameters", allow_blank=True), + required=False, + allow_null=True + )