summaryrefslogtreecommitdiffstats
path: root/gvnfmadapter
diff options
context:
space:
mode:
Diffstat (limited to 'gvnfmadapter')
-rw-r--r--gvnfmadapter/driver/interfaces/views.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/gvnfmadapter/driver/interfaces/views.py b/gvnfmadapter/driver/interfaces/views.py
index d246080..e6c26fc 100644
--- a/gvnfmadapter/driver/interfaces/views.py
+++ b/gvnfmadapter/driver/interfaces/views.py
@@ -112,10 +112,14 @@ class VnfTermInfo(APIView):
logger.debug("Terminate vnf begin!")
vnfm_id = vnfmid
try:
+ term_type = ignorcase_get(request.data, "terminationType")
input_data = {
- "terminationType": ignorcase_get(request.data, "terminationType"),
- "gracefulTerminationTimeout": ignorcase_get(request.data, "gracefulTerminationTimeout")
+ "terminationType": term_type.upper() if term_type else "FORCEFUL"
}
+ term_timeout = ignorcase_get(request.data, "gracefulTerminationTimeout")
+ if term_timeout:
+ input_data["gracefulTerminationTimeout"] = int(term_timeout)
+
logger.debug("do_terminatevnf: vnfm_id=[%s],vnfInstanceId=[%s],input_data=[%s]",
vnfm_id, vnfInstanceId, input_data)
resp = do_terminatevnf(vnfm_id, vnfInstanceId, input_data)