diff options
author | ying.yunlong <ying.yunlong@zte.com.cn> | 2018-02-28 15:37:19 +0800 |
---|---|---|
committer | yunlong ying <ying.yunlong@zte.com.cn> | 2018-02-28 08:10:58 +0000 |
commit | 2c462ad938b2c55b2bf9f1dc85a7bd5ebd5995ea (patch) | |
tree | bda088106bb14a7b7571ec7010de6ee88138c799 | |
parent | 8a8ba869c0554b0ce1396e69fdd7426362cc08c5 (diff) |
Add vfc-vnflcm instantiatedVnfInfo schema
Change-Id: I8c6438aeb5b49fdbce898d6f88b48110b6f7aa59
Issue-ID: VFC-780
Signed-off-by: ying.yunlong <ying.yunlong@zte.com.cn>
-rw-r--r-- | lcm/lcm/v2/serializers.py | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/lcm/lcm/v2/serializers.py b/lcm/lcm/v2/serializers.py index b7415701..7a3d4484 100644 --- a/lcm/lcm/v2/serializers.py +++ b/lcm/lcm/v2/serializers.py @@ -47,6 +47,34 @@ class VimInfoSerializer(serializers.Serializer): allow_null=True) +class ScaleInfoSerializer(serializers.Serializer): + aspectId = serializers.CharField( + help_text="Identifier of the scaling aspect.", + required=True, + max_length=255, + allow_null=True) + scaleLevel = serializers.IntegerField( + help_text="Indicates the scale level.", + required=True) + + +class instantiatedVnfInfoSerializer(serializers.Serializer): + flavourId = serializers.CharField( + help_text="Identifier of the VNF deployment flavour applied to this VNF instance.", + required=True, + max_length=255, + allow_null=True) + vnfState = serializers.ChoiceField( + help_text="State of the VNF instance.", + choices=["STARTED", "STOPPED"], + required=True, + allow_null=True) + scaleStatus = ScaleInfoSerializer( + help_text="Scale status of the VNF, one entry per aspect.", + required=False, + many=True) + + class VnfInstanceSerializer(serializers.Serializer): id = serializers.CharField( help_text="Identifier of the VNF instance", @@ -97,7 +125,7 @@ class VnfInstanceSerializer(serializers.Serializer): required=False, allow_null=True) vimConnectionInfo = VimInfoSerializer( - help_text="vim", + help_text="Information about VIM connections to be used for managing the resources for the VNF instance.", required=False, allow_null=True) instantiationState = serializers.ChoiceField( @@ -105,3 +133,6 @@ class VnfInstanceSerializer(serializers.Serializer): choices=["NOT_INSTANTIATED", "INSTANTIATED"], required=False, allow_null=True) + instantiatedVnfInfo = instantiatedVnfInfoSerializer( + help_text="Information specific to an instantiated VNF instance.", + required=False) |