aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfujinhua <fu.jinhua@zte.com.cn>2018-02-07 15:47:20 +0800
committerfujinhua <fu.jinhua@zte.com.cn>2018-02-07 15:47:20 +0800
commit8c2bdca0aabd9d55e3e014778b984f62c29ed6da (patch)
tree48a59801ca5054e243d81d46c0d3375910799116
parent8eed2283a9e405e8839304e5a85efb656c0e6393 (diff)
Add scale vnf req serializer
Change-Id: I397f284f19824dd5e96b82f907b68b2402c7cb9a Issue-ID: VFC-714 Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
-rw-r--r--lcm/ns/vnfs/serializers.py16
1 files changed, 16 insertions, 0 deletions
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
+ )