fix the serializer bug of nslcm 90/82390/1
authortianxing <15210838572@139.com>
Fri, 15 Mar 2019 08:24:44 +0000 (16:24 +0800)
committertianxing <15210838572@139.com>
Fri, 15 Mar 2019 08:24:51 +0000 (16:24 +0800)
Change-Id: I89b2eeabebc0ecc7462c32e13799fddec43488bd
Issue-ID: VFC-1270
Signed-off-by: tianxing <15210838572@139.com>
lcm/ns/serializers/create_ns_serializers.py
lcm/ns/serializers/pub_serializers.py

index 8de7fe5..ad5899f 100644 (file)
@@ -15,6 +15,7 @@
 from rest_framework import serializers
 
 from lcm.ns.serializers.pub_serializers import Links, ipAddressesSerializer, CpProtocolDataSerializer
+from resource_handle import ResourceHandleSerializer
 
 
 class ContextSerializer(serializers.Serializer):
@@ -63,17 +64,17 @@ class PnfInfoSerializer(serializers.Serializer):
                                     required=True, many=True)
 
 
-class ResourceHandleSerializer(serializers.Serializer):
-    vimId = serializers.CharField(help_text="Identifier of the VIM under whose control this resource is"
-                                            "placed.", required=False, allow_null=True)
-    resourceProviderId = serializers.CharField(help_text="Identifier of the entity responsible for the"
-                                                         "management of the resource", required=False,
-                                               allow_null=True)
-    resourceId = serializers.CharField(help_text="Identifier of the resource in the scope of the VIM or the "
-                                                 "resource provider.", required=True)
-    vimLevelResourceType = serializers.CharField(help_text="Type of the resource in the scope of the VIM or"
-                                                           "the resource provider",
-                                                 required=False, allow_null=True)
+class ResourceHandleSerializer(serializers.Serializer):
+    vimId = serializers.CharField(help_text="Identifier of the VIM under whose control this resource is"
+                                            "placed.", required=False, allow_null=True)
+    resourceProviderId = serializers.CharField(help_text="Identifier of the entity responsible for the"
+                                                         "management of the resource", required=False,
+                                               allow_null=True)
+    resourceId = serializers.CharField(help_text="Identifier of the resource in the scope of the VIM or the "
+                                                 "resource provider.", required=True)
+    vimLevelResourceType = serializers.CharField(help_text="Type of the resource in the scope of the VIM or"
+                                                           "the resource provider",
+                                                 required=False, allow_null=True)
 
 
 class NsVirtualLinkInfoSerializer(serializers.Serializer):
index 7150cdd..0e184de 100644 (file)
@@ -13,7 +13,7 @@
 # limitations under the License.
 
 from rest_framework import serializers
-from lcm.ns.serializers.common_Link import LinkSerializer
+from link import LinkSerializer
 from lcm.ns_pnfs.serializers.pnf_serializer import PnfInstanceSerializer