aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--catalog/pub/config/config.py3
-rw-r--r--catalog/urls.py6
2 files changed, 8 insertions, 1 deletions
diff --git a/catalog/pub/config/config.py b/catalog/pub/config/config.py
index f88891e4..b8a5141b 100644
--- a/catalog/pub/config/config.py
+++ b/catalog/pub/config/config.py
@@ -70,6 +70,9 @@ REG_TO_MSB_REG_PARAM = [{
"ttl": 0
}]
}]
+MSB_SVC_CALALOG_URL = "/api/microservices/v1/services/catalog/version/v1"
+MSB_SVC_NSD_URL = "/api/microservices/v1/services/nsd/version/v1"
+MSB_SVC_VNFPKGM_URL = "/api/microservices/v1/services/vnfpkgm/version/v1"
# catalog path(values is defined in settings.py)
CATALOG_ROOT_PATH = None
diff --git a/catalog/urls.py b/catalog/urls.py
index 1a6f241e..76c972bb 100644
--- a/catalog/urls.py
+++ b/catalog/urls.py
@@ -15,7 +15,8 @@
from django.conf.urls import include, url
from django.contrib import admin
-from catalog.pub.config.config import REG_TO_MSB_WHEN_START, REG_TO_MSB_REG_URL, REG_TO_MSB_REG_PARAM
+from catalog.pub.config.config import REG_TO_MSB_WHEN_START, REG_TO_MSB_REG_URL, REG_TO_MSB_REG_PARAM, \
+ MSB_SVC_CALALOG_URL, MSB_SVC_NSD_URL, MSB_SVC_VNFPKGM_URL
urlpatterns = [
url(r'^api/catalog/v1/admin', admin.site.urls),
@@ -29,5 +30,8 @@ urlpatterns = [
if REG_TO_MSB_WHEN_START:
import json
from catalog.pub.utils.restcall import req_by_msb
+ req_by_msb(MSB_SVC_CALALOG_URL, "DELETE")
+ req_by_msb(MSB_SVC_NSD_URL, "DELETE")
+ req_by_msb(MSB_SVC_VNFPKGM_URL, "DELETE")
for reg_param in REG_TO_MSB_REG_PARAM:
req_by_msb(REG_TO_MSB_REG_URL, "POST", json.JSONEncoder().encode(reg_param))