summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--multivimbroker/multivimbroker/pub/config/config.py16
-rw-r--r--multivimbroker/multivimbroker/settings.py1
-rw-r--r--multivimbroker/multivimbroker/tests/test_urls.py27
-rw-r--r--multivimbroker/multivimbroker/urls.py15
4 files changed, 0 insertions, 59 deletions
diff --git a/multivimbroker/multivimbroker/pub/config/config.py b/multivimbroker/multivimbroker/pub/config/config.py
index 8fba115..bf28b22 100644
--- a/multivimbroker/multivimbroker/pub/config/config.py
+++ b/multivimbroker/multivimbroker/pub/config/config.py
@@ -31,19 +31,3 @@ AAI_PASSWORD = 'AAI'
# [IMAGE LOCAL PATH]
ROOT_PATH = os.path.dirname(
os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-
-# [register]
-REG_TO_MSB_WHEN_START = False
-REG_TO_MSB_REG_URL = "/api/microservices/v1/services"
-REG_TO_MSB_REG_PARAM = {
- "serviceName": "multicloud",
- "version": "v0",
- "url": "/api/multicloud/v0",
- "protocol": "REST",
- "visualRange": "1",
- "nodes": [{
- "ip": "127.0.0.1",
- "port": "9001",
- "ttl": 0
- }]
-}
diff --git a/multivimbroker/multivimbroker/settings.py b/multivimbroker/multivimbroker/settings.py
index dca2dd6..be887b9 100644
--- a/multivimbroker/multivimbroker/settings.py
+++ b/multivimbroker/multivimbroker/settings.py
@@ -96,7 +96,6 @@ config.yamlConfig(filepath=LOGGING_FILE, watchDog=True)
if 'test' in sys.argv:
from multivimbroker.pub.config import config
- config.REG_TO_MSB_WHEN_START = False
DATABASES = {}
DATABASES['default'] = {
'ENGINE': 'django.db.backends.sqlite3',
diff --git a/multivimbroker/multivimbroker/tests/test_urls.py b/multivimbroker/multivimbroker/tests/test_urls.py
deleted file mode 100644
index 7990033..0000000
--- a/multivimbroker/multivimbroker/tests/test_urls.py
+++ /dev/null
@@ -1,27 +0,0 @@
-# Copyright (c) 2017-2018 VMware, Inc.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-
-import json
-import mock
-import unittest
-
-from multivimbroker.pub.config import config
-from multivimbroker import urls
-
-
-class TestUrls(unittest.TestCase):
-
- def test_request_msb(self):
- with mock.patch("multivimbroker.pub.utils.restcall."
- "req_by_msb") as req_by_msb:
- urls.req_msb(True)
- req_by_msb.assert_called_once_with(
- config.REG_TO_MSB_REG_URL, "POST",
- json.JSONEncoder().encode(config.REG_TO_MSB_REG_PARAM))
diff --git a/multivimbroker/multivimbroker/urls.py b/multivimbroker/multivimbroker/urls.py
index 0843bb3..c393210 100644
--- a/multivimbroker/multivimbroker/urls.py
+++ b/multivimbroker/multivimbroker/urls.py
@@ -11,23 +11,8 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
from django.conf.urls import include, url
-import json
-
-from multivimbroker.pub.config import config
-
urlpatterns = [
url(r'^', include('multivimbroker.swagger.urls')),
url(r'^', include('multivimbroker.forwarder.urls')),
]
-
-
-def req_msb(request_when_start):
- # regist to MSB when startup
- if request_when_start:
- from multivimbroker.pub.utils.restcall import req_by_msb
- req_by_msb(config.REG_TO_MSB_REG_URL, "POST",
- json.JSONEncoder().encode(config.REG_TO_MSB_REG_PARAM))
-
-
-req_msb(config.REG_TO_MSB_WHEN_START)