summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorliangke <lokyse@163.com>2017-09-05 13:32:24 +0800
committerliangke <lokyse@163.com>2017-09-11 13:13:29 +0800
commit8d79af2d91da394044ce9a0937252856fe5a195e (patch)
treef3eb8484430572d468125526bed430934748ed4f
parent0cc1fbffa4c74b917dd0f1548a1c6fca6b47afb6 (diff)
Change multivim to multicloud
Change-Id: I8fa45bea85db32f9458be7c2f9598c5ad580bedb Issue-Id: MULTICLOUD-79 Signed-off-by: liangke <lokyse@163.com>
-rw-r--r--multivimbroker/multivimbroker/forwarder/base.py1
-rw-r--r--multivimbroker/multivimbroker/pub/config/config.py4
-rw-r--r--multivimbroker/multivimbroker/pub/utils/syscomm.py18
-rw-r--r--multivimbroker/multivimbroker/swagger/multivim.identity.swagger.json2
4 files changed, 10 insertions, 15 deletions
diff --git a/multivimbroker/multivimbroker/forwarder/base.py b/multivimbroker/multivimbroker/forwarder/base.py
index c96461a..7477842 100644
--- a/multivimbroker/multivimbroker/forwarder/base.py
+++ b/multivimbroker/multivimbroker/forwarder/base.py
@@ -53,7 +53,6 @@ class BaseHandler(object):
try:
url = getMultivimDriver(vimid, full_path=full_path)
-
except exceptions.VimBrokerException as e:
logging.exception("vimbroker exception: %s" % e)
return HttpResponse(e.content, status=e.status_code)
diff --git a/multivimbroker/multivimbroker/pub/config/config.py b/multivimbroker/multivimbroker/pub/config/config.py
index 71b4d2a..72932dd 100644
--- a/multivimbroker/multivimbroker/pub/config/config.py
+++ b/multivimbroker/multivimbroker/pub/config/config.py
@@ -40,8 +40,8 @@ REDIS_PASSWD = ''
REG_TO_MSB_WHEN_START = False
REG_TO_MSB_REG_URL = "/api/microservices/v1/services"
REG_TO_MSB_REG_PARAM = {
- "serviceName": "multivim",
- "version": "v1",
+ "serviceName": "multicloud",
+ "version": "v0",
"url": "/api/multicloud/v0",
"protocol": "REST",
"visualRange": "1",
diff --git a/multivimbroker/multivimbroker/pub/utils/syscomm.py b/multivimbroker/multivimbroker/pub/utils/syscomm.py
index 0d0419a..cdc6480 100644
--- a/multivimbroker/multivimbroker/pub/utils/syscomm.py
+++ b/multivimbroker/multivimbroker/pub/utils/syscomm.py
@@ -37,25 +37,21 @@ def findMultivimDriver(vim=None):
if vim and vim["type"] == "openstack":
if vim["version"] == "kilo":
- multivimdriver = "multivim-kilo"
+ multivimdriver = "multicloud-kilo"
elif vim["version"] == "newton":
- multivimdriver = "multivim-newton"
+ multivimdriver = "multicloud-newton"
else:
# if vim type is openstack, use latest "newton" version as default
- multivimdriver = "multivim-newton"
+ multivimdriver = "multicloud-newton"
elif vim and vim["type"] == "vmware":
- multivimdriver = "multivim-vio"
+ multivimdriver = "multicloud-vio"
else:
raise exceptions.NotFound("Not support VIM type")
return multivimdriver
def getMultivimDriver(vimid, full_path=""):
-
- multivim = "multivim"
+ multcloud = "multicloud"
vim = get_vim_by_id(vimid)
- if vim["type"] and vim["version"]:
- pass
-
- multivimdriver = findMultivimDriver(vim=vim)
- return re.sub(multivim, multivimdriver, full_path)
+ multclouddriver = findMultivimDriver(vim=vim)
+ return re.sub(multcloud, multclouddriver, full_path)
diff --git a/multivimbroker/multivimbroker/swagger/multivim.identity.swagger.json b/multivimbroker/multivimbroker/swagger/multivim.identity.swagger.json
index 923924e..a81b431 100644
--- a/multivimbroker/multivimbroker/swagger/multivim.identity.swagger.json
+++ b/multivimbroker/multivimbroker/swagger/multivim.identity.swagger.json
@@ -4,7 +4,7 @@
"version": "1.0.0",
"title": "MultiVIM Service rest API"
},
- "basePath": "/openoapi/multivim/v1/",
+ "basePath": "/api/multicloud/v0/",
"tags": [
{
"name": "MultiVIM services"