summaryrefslogtreecommitdiffstats
path: root/zte
diff options
context:
space:
mode:
Diffstat (limited to 'zte')
-rw-r--r--zte/vmanager/driver/interfaces/data/inputs.json16
-rw-r--r--zte/vmanager/driver/interfaces/views.py6
2 files changed, 21 insertions, 1 deletions
diff --git a/zte/vmanager/driver/interfaces/data/inputs.json b/zte/vmanager/driver/interfaces/data/inputs.json
new file mode 100644
index 00000000..640626c6
--- /dev/null
+++ b/zte/vmanager/driver/interfaces/data/inputs.json
@@ -0,0 +1,16 @@
+{
+ "inputs": [
+ {
+ "default": "",
+ "key_name": "Key1",
+ "type": "string",
+ "value": "Value1"
+ },
+ {
+ "default": "",
+ "key_name": "Key2",
+ "type": "string",
+ "value": "Value2"
+ }
+ ]
+}
diff --git a/zte/vmanager/driver/interfaces/views.py b/zte/vmanager/driver/interfaces/views.py
index b981c9a1..3e62b068 100644
--- a/zte/vmanager/driver/interfaces/views.py
+++ b/zte/vmanager/driver/interfaces/views.py
@@ -138,10 +138,11 @@ class InstantiateVnf(APIView):
logger.debug("[%s] packageInfo=%s", fun_name(), packageInfo)
logger.debug("VNF_FTP=%s", VNF_FTP)
data = {
+ "vnfinstancename": "default",
"NFVOID": 1,
"VNFMID": vnfmid,
"vnfd_id": packageInfo.get("vnfdId"),
- "deployflavorid": "TODO",
+ "deployflavorid": "default",
"extension": {},
"inputs": []
}
@@ -150,6 +151,9 @@ class InstantiateVnf(APIView):
for name, value in ignorcase_get(additionalParam, "inputs").items():
data["inputs"].append({"key_name": name, "value": value, "type": "TODO"})
+ inputs_json = load_json_file("inputs.json")
+ [data["inputs"].append(item) for item in inputs_json["inputs"]]
+
logger.debug("[%s] call_req data=%s", fun_name(), data)
ret = restcall.call_req(