diff options
author | hongyuzhao <zhao.hongyu@zte.com.cn> | 2019-08-20 15:01:46 +0800 |
---|---|---|
committer | hongyuzhao <zhao.hongyu@zte.com.cn> | 2019-08-20 15:03:06 +0800 |
commit | 392d996c52e7ae1ada8dd977afef3fa7c62ed861 (patch) | |
tree | ab9e1acd83e2944584cf193b910bb041154611e2 | |
parent | a5aa779dbf9989b83348a528e9f12378f28db05e (diff) |
Add logout msb process before registering msb
Change-Id: I81b01fdcb93b399299c005cdf57a14307eeab845
Issue-ID: VFC-1431
Signed-off-by: hongyuzhao <zhao.hongyu@zte.com.cn>
-rw-r--r-- | lcm/pub/config/config.py | 2 | ||||
-rw-r--r-- | lcm/urls.py | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/lcm/pub/config/config.py b/lcm/pub/config/config.py index 021b1b79..a02d4bac 100644 --- a/lcm/pub/config/config.py +++ b/lcm/pub/config/config.py @@ -49,6 +49,8 @@ REG_TO_MSB_REG_PARAM = { "ttl": 0 }] } +MSB_SVC_URL = "/api/microservices/v1/services/nslcm/version/%s" + # [aai config] AAI_BASE_URL = "http://10.0.14.1:80/aai/v11" diff --git a/lcm/urls.py b/lcm/urls.py index 67268ea7..0af60a19 100644 --- a/lcm/urls.py +++ b/lcm/urls.py @@ -16,7 +16,7 @@ from django.conf.urls import include, url from django.contrib import admin from lcm.pub.config.config import DEPLOY_WORKFLOW_WHEN_START -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 = [ @@ -36,7 +36,10 @@ urlpatterns = [ if REG_TO_MSB_WHEN_START: import json from lcm.pub.utils.restcall import req_by_msb + req_by_msb(MSB_SVC_URL % "v1", "DELETE") req_by_msb(REG_TO_MSB_REG_URL, "POST", json.JSONEncoder().encode(REG_TO_MSB_REG_PARAM)) + + req_by_msb(MSB_SVC_URL % "v2", "DELETE") v2_param = REG_TO_MSB_REG_PARAM.copy() v2_param["version"] = "v2" v2_param["url"] = v2_param["url"].replace("v1", "v2") |