diff options
author | ying.yunlong <ying.yunlong@zte.com.cn> | 2018-01-27 16:52:11 +0800 |
---|---|---|
committer | ying.yunlong <ying.yunlong@zte.com.cn> | 2018-01-27 16:52:11 +0800 |
commit | 7a5314818ef755b81a23d10baf8895f7f60a2fcb (patch) | |
tree | a4f50e679df125b14970ab68e2bfa1bdb6dd3245 /lcm | |
parent | 27fffd87ef051b21bb006b690f94ad3e27c04fb6 (diff) |
Add vfc-vnflcm getVnfs schema
Change-Id: I14e4c58cc4d98a8d0dbfa193793608b7138e443c
Issue-ID: VFC-682
Signed-off-by: ying.yunlong <ying.yunlong@zte.com.cn>
Diffstat (limited to 'lcm')
-rw-r--r-- | lcm/lcm/nf/vnfs/serializers.py | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/lcm/lcm/nf/vnfs/serializers.py b/lcm/lcm/nf/vnfs/serializers.py index cabae3b9..2ec38b29 100644 --- a/lcm/lcm/nf/vnfs/serializers.py +++ b/lcm/lcm/nf/vnfs/serializers.py @@ -37,16 +37,45 @@ class vnfcResourceInfoSerializer(serializers.Serializer): pass +class accessInfoSerializer(serializers.Serializer): + tenant = serializers.CharField(help_text="tenant", required=True) + username = serializers.CharField(help_text="username", required=True) + password = serializers.CharField(help_text="password", required=True) + + +class InterfaceInfoSerializer(serializers.Serializer): + vimType = serializers.CharField(help_text="vimType", required=True) + apiVersion = serializers.CharField(help_text="apiVersion", required=True) + protocolType = serializers.ChoiceField(help_text="protocolType", choices=['http', 'https'], required=True) + + class vimInfoSerializer(serializers.Serializer): - pass + vimInfoId = serializers.CharField(help_text="vimInfoId", required=True) + vimId = serializers.CharField(help_text="vimId", required=True) + interfaceEndpoint = serializers.CharField(help_text="interfaceEndpoint", required=True) + interfaceInfo = InterfaceInfoSerializer(help_text="vimInfoId", required=True) + accessInfo = accessInfoSerializer(help_text="accessInfo", required=True) class monitoringParametersSerializer(serializers.Serializer): pass +class linkPortsSerializer(serializers.Serializer): + resourceId = serializers.CharField(help_text="resourceId", required=True) + vimId = serializers.CharField(help_text="vimId", required=False) + + +class resourceHandleSerializer(serializers.Serializer): + resourceId = serializers.CharField(help_text="resourceId", required=True) + vimId = serializers.CharField(help_text="vimId", required=False) + resourceProviderId = serializers.CharField(help_text="resourceProviderId", required=False) + + class ExtVirtualLinkInfoSerializer(serializers.Serializer): - pass + extVirtualLinkId = serializers.CharField(help_text="extVirtualLinkId", required=True) + resourceHandle = resourceHandleSerializer(help_text="iPAddress", required=True) + linkPorts = linkPortsSerializer(help_text="iPAddress", many=True, allow_null=True) class l3AddressDataSerializer(serializers.Serializer): |