From ff97187f37cf2e2e862d523e396d602c3aa0b9d9 Mon Sep 17 00:00:00 2001 From: hongyuzhao Date: Tue, 20 Aug 2019 15:13:20 +0800 Subject: Add logout msb process before registering msb Change-Id: Ie38e4f1e760d3805906fa4667fa6598d9311253a Issue-ID: VFC-1431 Signed-off-by: hongyuzhao --- res/res/pub/config/config.py | 1 + res/res/urls.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'res') 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)) -- cgit 1.2.3-korg