summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--catalog/pub/utils/toscaparser/testdata/resource-ZteMmeFixVl-csar.csarbin0 -> 35038 bytes
-rw-r--r--catalog/pub/utils/toscaparser/tests.py32
-rw-r--r--requirements.txt2
3 files changed, 33 insertions, 1 deletions
diff --git a/catalog/pub/utils/toscaparser/testdata/resource-ZteMmeFixVl-csar.csar b/catalog/pub/utils/toscaparser/testdata/resource-ZteMmeFixVl-csar.csar
new file mode 100644
index 00000000..7e58ef40
--- /dev/null
+++ b/catalog/pub/utils/toscaparser/testdata/resource-ZteMmeFixVl-csar.csar
Binary files differ
diff --git a/catalog/pub/utils/toscaparser/tests.py b/catalog/pub/utils/toscaparser/tests.py
new file mode 100644
index 00000000..a37ce686
--- /dev/null
+++ b/catalog/pub/utils/toscaparser/tests.py
@@ -0,0 +1,32 @@
+# Copyright 2018 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.
+import os
+
+from django.test import TestCase
+
+from catalog.pub.utils.toscaparser import parse_vnfd
+
+
+class TestNsPackage(TestCase):
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def test_nsd_parse(self):
+ csar_path = os.path.dirname(os.path.abspath(__file__)) + "/testdata/resource-ZteMmeFixVl-csar.csar"
+ input_parameters = [{"value": "111111", "key": "sdncontroller"}]
+ vnfd_json = parse_vnfd(csar_path, input_parameters)
+ print vnfd_json
diff --git a/requirements.txt b/requirements.txt
index edcc7419..8442b511 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -23,7 +23,7 @@ unittest_xml_reporting==1.12.0
# for parser
cryptography==2.0.3
paramiko==2.0.2
-nfv-toscaparser>=0.5.0
+nfv-toscaparser==0.5.1.dev25
# for auto swagger
drf-yasg>=1.2.2