Code Review
/
modeling
/
etsicatalog.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
upgrade code to add HTTP/HTTPS protocol registration switch to MSB
[modeling/etsicatalog.git]
/
catalog
/
pub
/
config
/
config.py
diff --git
a/catalog/pub/config/config.py
b/catalog/pub/config/config.py
index
b8a5141
..
c1d4695
100644
(file)
--- a/
catalog/pub/config/config.py
+++ b/
catalog/pub/config/config.py
@@
-13,20
+13,17
@@
# limitations under the License.
# [MSB]
# limitations under the License.
# [MSB]
+MSB_SERVICE_PROTOCOL = 'http'
MSB_SERVICE_IP = '127.0.0.1'
MSB_SERVICE_PORT = '80'
MSB_SERVICE_IP = '127.0.0.1'
MSB_SERVICE_PORT = '80'
-
-# [REDIS]
-REDIS_HOST = '127.0.0.1'
-REDIS_PORT = '6379'
-REDIS_PASSWD = ''
+MSB_BASE_URL = "%s://%s:%s" % (MSB_SERVICE_PROTOCOL, MSB_SERVICE_IP, MSB_SERVICE_PORT)
# [mysql]
DB_IP = "127.0.0.1"
DB_PORT = 3306
# [mysql]
DB_IP = "127.0.0.1"
DB_PORT = 3306
-DB_NAME = "
nfvo
catalog"
-DB_USER = "
nfvo
catalog"
-DB_PASSWD = "
nfvo
catalog"
+DB_NAME = "
etsi
catalog"
+DB_USER = "
etsi
catalog"
+DB_PASSWD = "
etsi
catalog"
# [MDC]
SERVICE_NAME = "catalog"
# [MDC]
SERVICE_NAME = "catalog"
@@
-35,10
+32,16
@@
FORWARDED_FOR_FIELDS = ["HTTP_X_FORWARDED_FOR", "HTTP_X_FORWARDED_HOST",
# [register]
REG_TO_MSB_WHEN_START = True
# [register]
REG_TO_MSB_WHEN_START = True
+SSL_ENABLED = "true"
REG_TO_MSB_REG_URL = "/api/microservices/v1/services"
REG_TO_MSB_REG_URL = "/api/microservices/v1/services"
+if SSL_ENABLED == "true":
+ enable_ssl = "true"
+else:
+ enable_ssl = "false"
REG_TO_MSB_REG_PARAM = [{
"serviceName": "catalog",
"version": "v1",
REG_TO_MSB_REG_PARAM = [{
"serviceName": "catalog",
"version": "v1",
+ "enable_ssl": enable_ssl,
"url": "/api/catalog/v1",
"protocol": "REST",
"visualRange": "1",
"url": "/api/catalog/v1",
"protocol": "REST",
"visualRange": "1",
@@
-50,6
+53,7
@@
REG_TO_MSB_REG_PARAM = [{
}, {
"serviceName": "nsd",
"version": "v1",
}, {
"serviceName": "nsd",
"version": "v1",
+ "enable_ssl": enable_ssl,
"url": "/api/nsd/v1",
"protocol": "REST",
"visualRange": "1",
"url": "/api/nsd/v1",
"protocol": "REST",
"visualRange": "1",
@@
-61,6
+65,7
@@
REG_TO_MSB_REG_PARAM = [{
}, {
"serviceName": "vnfpkgm",
"version": "v1",
}, {
"serviceName": "vnfpkgm",
"version": "v1",
+ "enable_ssl": enable_ssl,
"url": "/api/vnfpkgm/v1",
"protocol": "REST",
"visualRange": "1",
"url": "/api/vnfpkgm/v1",
"protocol": "REST",
"visualRange": "1",
@@
-69,18
+74,38
@@
REG_TO_MSB_REG_PARAM = [{
"port": "8806",
"ttl": 0
}]
"port": "8806",
"ttl": 0
}]
+}, {
+ "serviceName": "parser",
+ "version": "v1",
+ "enable_ssl": enable_ssl,
+ "url": "/api/parser/v1",
+ "protocol": "REST",
+ "visualRange": "1",
+ "nodes": [{
+ "ip": "127.0.0.1",
+ "port": "8806",
+ "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"
}]
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"
+MSB_SVC_PARSER_URL = "/api/microservices/v1/services/parser/version/v1"
# catalog path(values is defined in settings.py)
CATALOG_ROOT_PATH = None
CATALOG_URL_PATH = None
# [sdc config]
# catalog path(values is defined in settings.py)
CATALOG_ROOT_PATH = None
CATALOG_URL_PATH = None
# [sdc config]
-SDC_BASE_URL =
"http://msb-iag
/api"
-SDC_USER = "
aai
"
+SDC_BASE_URL =
MSB_BASE_URL + "
/api"
+SDC_USER = "
modeling
"
SDC_PASSWD = "Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U"
SDC_PASSWD = "Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U"
+# [dmaap config]
+DMAAP_MR_IP = MSB_SERVICE_IP
+DMAAP_MR_PORT = '30226'
+CONSUMER_GROUP = "consumerGroup"
+CONSUMER_ID = "consumerId"
+POLLING_INTERVAL = 15
+
VNFD_SCHEMA_VERSION_DEFAULT = "base"
VNFD_SCHEMA_VERSION_DEFAULT = "base"