Modify vnf instantiation related stuffs. 53/59853/1
authorlaili <lai.li@zte.com.cn>
Thu, 9 Aug 2018 12:45:10 +0000 (20:45 +0800)
committerlaili <lai.li@zte.com.cn>
Thu, 9 Aug 2018 12:45:10 +0000 (20:45 +0800)
Add inst_or_teri_vnf_response.py for vnf instantiation.
Correct minor errors in ext_link_port_data.py and instantiate_vnf_request.py.

Change-Id: I22f28b62132f8d1147cfa467041f49f38977a274
Issue-ID: VFC-1017
Signed-off-by: laili <lai.li@zte.com.cn>
lcm/lcm/nf/serializers/ext_link_port_data.py
lcm/lcm/nf/serializers/inst_or_teri_vnf_response.py [new file with mode: 0644]
lcm/lcm/nf/serializers/instantiate_vnf_request.py

index e134502..c6dafdd 100644 (file)
@@ -26,5 +26,4 @@ class ExtLinkPortDataSerializer(serializers.Serializer):
     resourceHandle = ResourceHandleSerializer(
         help_text="Reference to the virtualised resource realizing this link port.",
         required=True,
-        allow_null=False,
-        allow_blank=False)
+        allow_null=False)
diff --git a/lcm/lcm/nf/serializers/inst_or_teri_vnf_response.py b/lcm/lcm/nf/serializers/inst_or_teri_vnf_response.py
new file mode 100644 (file)
index 0000000..17b9c0d
--- /dev/null
@@ -0,0 +1,24 @@
+# Copyright 2017 ZTE Corporation.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+from rest_framework import serializers
+
+
+class InstOrTeriVnfResponseSerializer(serializers.Serializer):
+    jobId = serializers.CharField(
+        help_text="jobId",
+        required=True,
+        max_length=255,
+        allow_null=True)
index c5214fc..2c3547d 100644 (file)
@@ -46,7 +46,6 @@ class InstantiateVnfRequestSerializer(serializers.Serializer):
         or refer to external / externally-managed virtual links.",
         many=True,
         required=False,
-        max_length=255,
         allow_null=True)
     localizationLanguage = serializers.CharField(
         help_text="Localization language of the VNF to be instantiated. \