From 381c39c32b65afa4573257ce0e4b2a80202435ff Mon Sep 17 00:00:00 2001 From: Ethan Lynn Date: Thu, 22 Mar 2018 18:26:30 +0800 Subject: Remove msb_register It's legacy from open-o, the code will not use in future. Change-Id: I6522c5359f4c4ef0820e19012308ff7ce716f118 Issue-ID: MULTICLOUD-199 Signed-off-by: Ethan Lynn --- vio/vio/pub/config/config.py | 16 ---------------- vio/vio/settings.py | 1 - vio/vio/urls.py | 10 ---------- 3 files changed, 27 deletions(-) diff --git a/vio/vio/pub/config/config.py b/vio/vio/pub/config/config.py index 47bc3b2..8f18ad5 100644 --- a/vio/vio/pub/config/config.py +++ b/vio/vio/pub/config/config.py @@ -43,19 +43,3 @@ FORWARDED_FOR_FIELDS = ["HTTP_X_FORWARDED_FOR", "HTTP_X_FORWARDED_HOST", # DB_NAME = 'multivimvio' # DB_USER = 'root' # DB_PASSWD = 'password' - -# [register] -REG_TO_MSB_WHEN_START = False -REG_TO_MSB_REG_URL = "/api/microservices/v1/services" -REG_TO_MSB_REG_PARAM = { - "serviceName": "multicloud-vio", - "version": "v0", - "url": "/api/multicloud-vio/v0", - "protocol": "REST", - "visualRange": "1", - "nodes": [{ - "ip": "127.0.0.1", - "port": "9004", - "ttl": 0 - }] -} diff --git a/vio/vio/settings.py b/vio/vio/settings.py index 42330b7..f1dad0f 100644 --- a/vio/vio/settings.py +++ b/vio/vio/settings.py @@ -95,7 +95,6 @@ config.yamlConfig(filepath=LOGGING_FILE, watchDog=True) if 'test' in sys.argv: from vio.pub.config import config - config.REG_TO_MSB_WHEN_START = False DATABASES = {} DATABASES['default'] = { 'ENGINE': 'django.db.backends.sqlite3', diff --git a/vio/vio/urls.py b/vio/vio/urls.py index 9166774..85b3d9c 100644 --- a/vio/vio/urls.py +++ b/vio/vio/urls.py @@ -11,18 +11,8 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. from django.conf.urls import include, url -from vio.pub.config.config import REG_TO_MSB_WHEN_START -from vio.pub.config.config import REG_TO_MSB_REG_URL -from vio.pub.config.config import REG_TO_MSB_REG_PARAM urlpatterns = [ url(r'^', include('vio.swagger.urls')), url(r'^', include('vio.samples.urls')), ] - -# regist to MSB when startup -if REG_TO_MSB_WHEN_START: - import json - from vio.pub.utils.restcall import req_by_msb - req_by_msb(REG_TO_MSB_REG_URL, "POST", - json.JSONEncoder().encode(REG_TO_MSB_REG_PARAM)) -- cgit 1.2.3-korg