diff options
author | hongyuzhao <zhao.hongyu@zte.com.cn> | 2019-08-20 12:10:32 +0800 |
---|---|---|
committer | hongyuzhao <zhao.hongyu@zte.com.cn> | 2019-08-20 14:33:47 +0800 |
commit | 05dc30dacd4ef0b409a26eac02419d3a604d0548 (patch) | |
tree | f5b8e05d7eced2c49bec9cbc7aa969a6c1f69584 | |
parent | 6f5ac3474d65c5f4059bfbc70f824d605a476b5d (diff) |
Add logout msb process before registering msb
Change-Id: I58df6203d678f984952deb7aff1d94952036017f
Issue-ID: VFC-1431
Signed-off-by: hongyuzhao <zhao.hongyu@zte.com.cn>
-rw-r--r-- | lcm/lcm/pub/config/config.py | 1 | ||||
-rw-r--r-- | lcm/lcm/urls.py | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/lcm/lcm/pub/config/config.py b/lcm/lcm/pub/config/config.py index 63c1784d..5023aefa 100644 --- a/lcm/lcm/pub/config/config.py +++ b/lcm/lcm/pub/config/config.py @@ -53,3 +53,4 @@ REG_TO_MSB_REG_PARAM = { "ttl": 0 }] } +MSB_SVC_URL = "/api/microservices/v1/services/vnflcm/version/v1" diff --git a/lcm/lcm/urls.py b/lcm/lcm/urls.py index 438c9437..4ff7e862 100644 --- a/lcm/lcm/urls.py +++ b/lcm/lcm/urls.py @@ -15,7 +15,9 @@ from django.conf.urls import include, url from django.contrib import admin -from lcm.pub.config.config import REG_TO_MSB_WHEN_START, REG_TO_MSB_REG_URL, REG_TO_MSB_REG_PARAM +from lcm.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'^api/vnflcm/v1/admin', admin.site.urls), @@ -30,4 +32,6 @@ urlpatterns = [ if REG_TO_MSB_WHEN_START: import json from lcm.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)) |