upgrade code to add HTTP/HTTPS protocol registration switch to MSB
[modeling/etsicatalog.git] / catalog / pub / config / config.py
index a4a8ce5..c1d4695 100644 (file)
 # limitations under the License.
 
 # [MSB]
-MSB_SERVICE_PROTOCOL = 'https'
+MSB_SERVICE_PROTOCOL = 'http'
 MSB_SERVICE_IP = '127.0.0.1'
 MSB_SERVICE_PORT = '80'
 MSB_BASE_URL = "%s://%s:%s" % (MSB_SERVICE_PROTOCOL, MSB_SERVICE_IP, MSB_SERVICE_PORT)
 
-# [REDIS]
-# REDIS_HOST = '127.0.0.1'
-# REDIS_PORT = '6379'
-# REDIS_PASSWD = ''
-
 # [mysql]
 DB_IP = "127.0.0.1"
 DB_PORT = 3306
@@ -37,10 +32,16 @@ FORWARDED_FOR_FIELDS = ["HTTP_X_FORWARDED_FOR", "HTTP_X_FORWARDED_HOST",
 
 # [register]
 REG_TO_MSB_WHEN_START = True
+SSL_ENABLED = "true"
 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",
+    "enable_ssl": enable_ssl,
     "url": "/api/catalog/v1",
     "protocol": "REST",
     "visualRange": "1",
@@ -52,6 +53,7 @@ REG_TO_MSB_REG_PARAM = [{
 }, {
     "serviceName": "nsd",
     "version": "v1",
+    "enable_ssl": enable_ssl,
     "url": "/api/nsd/v1",
     "protocol": "REST",
     "visualRange": "1",
@@ -63,6 +65,7 @@ REG_TO_MSB_REG_PARAM = [{
 }, {
     "serviceName": "vnfpkgm",
     "version": "v1",
+    "enable_ssl": enable_ssl,
     "url": "/api/vnfpkgm/v1",
     "protocol": "REST",
     "visualRange": "1",
@@ -74,6 +77,7 @@ REG_TO_MSB_REG_PARAM = [{
 }, {
     "serviceName": "parser",
     "version": "v1",
+    "enable_ssl": enable_ssl,
     "url": "/api/parser/v1",
     "protocol": "REST",
     "visualRange": "1",
@@ -93,8 +97,15 @@ CATALOG_ROOT_PATH = None
 CATALOG_URL_PATH = None
 
 # [sdc config]
-SDC_BASE_URL = "https://msb-iag/api"
+SDC_BASE_URL = MSB_BASE_URL + "/api"
 SDC_USER = "modeling"
 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"