Add logout msb process before registering msb 22/93922/1
authorhongyuzhao <zhao.hongyu@zte.com.cn>
Tue, 20 Aug 2019 07:13:20 +0000 (15:13 +0800)
committerhongyuzhao <zhao.hongyu@zte.com.cn>
Tue, 20 Aug 2019 07:14:32 +0000 (15:14 +0800)
Change-Id: Ie38e4f1e760d3805906fa4667fa6598d9311253a
Issue-ID: VFC-1431
Signed-off-by: hongyuzhao <zhao.hongyu@zte.com.cn>
res/res/pub/config/config.py
res/res/urls.py

index 9aa2e19..d3ba554 100644 (file)
@@ -48,3 +48,4 @@ REG_TO_MSB_REG_PARAM = {
         "ttl": 0
     }]
 }
+MSB_SVC_URL = "/api/microservices/v1/services/vnfres/version/v1"
index 895cc25..dc43975 100644 (file)
@@ -14,7 +14,7 @@
 
 from django.conf.urls import include, url
 
-from res.pub.config.config import REG_TO_MSB_WHEN_START, REG_TO_MSB_REG_URL, REG_TO_MSB_REG_PARAM
+from res.pub.config.config import REG_TO_MSB_WHEN_START, REG_TO_MSB_REG_URL, REG_TO_MSB_REG_PARAM, MSB_SVC_URL
 
 urlpatterns = [
     url(r'^', include('res.samples.urls')),
@@ -26,4 +26,5 @@ urlpatterns = [
 if REG_TO_MSB_WHEN_START:
     import json
     from res.pub.utils.restcall import req_by_msb
+    req_by_msb(MSB_SVC_URL, "DELETE")
     req_by_msb(REG_TO_MSB_REG_URL, "POST", json.JSONEncoder().encode(REG_TO_MSB_REG_PARAM))