diff options
author | hongyuzhao <zhao.hongyu@zte.com.cn> | 2019-08-20 15:13:20 +0800 |
---|---|---|
committer | hongyuzhao <zhao.hongyu@zte.com.cn> | 2019-08-20 15:14:32 +0800 |
commit | ff97187f37cf2e2e862d523e396d602c3aa0b9d9 (patch) | |
tree | 945206a637f4869c1f8e970e114089f50ac47de0 | |
parent | 60fba941ac2e4de0b8c6fe85b649d04b96ba85b2 (diff) |
Add logout msb process before registering msb
Change-Id: Ie38e4f1e760d3805906fa4667fa6598d9311253a
Issue-ID: VFC-1431
Signed-off-by: hongyuzhao <zhao.hongyu@zte.com.cn>
-rw-r--r-- | res/res/pub/config/config.py | 1 | ||||
-rw-r--r-- | res/res/urls.py | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/res/res/pub/config/config.py b/res/res/pub/config/config.py index 9aa2e19..d3ba554 100644 --- a/res/res/pub/config/config.py +++ b/res/res/pub/config/config.py @@ -48,3 +48,4 @@ REG_TO_MSB_REG_PARAM = { "ttl": 0 }] } +MSB_SVC_URL = "/api/microservices/v1/services/vnfres/version/v1" diff --git a/res/res/urls.py b/res/res/urls.py index 895cc25..dc43975 100644 --- a/res/res/urls.py +++ b/res/res/urls.py @@ -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)) |