1 # Copyright 2017 ZTE Corporation.
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
18 MSB_BASE_URL = os.getenv("MSB_ADDR", "http://127.0.0.1:80")
19 MSB_ENABLED = os.getenv("MSB_ENABLED", "false")
22 if MSB_ENABLED == "true":
23 SDC_BASE_URL = MSB_BASE_URL + "/api"
25 SDC_BASE_URL = os.getenv("SDC_ADDR")
27 SDC_PASSWD = "Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U"
29 SERVICE_IP = os.getenv("SERVICE_IP", "127.0.0.1")
32 DMAAP_ENABLED = os.getenv("DMAAP_ENABLED", "false")
33 DMAAP_MR_BASE_URL = os.getenv("DMAAP_ADDR")
34 CONSUMER_GROUP = "consumerGroup"
35 CONSUMER_ID = "consumerId"
39 DB_IP = os.getenv("DB_IP", "127.0.0.1")
40 DB_PORT = os.getenv("DB_PORT", "3306")
41 DB_NAME = "etsicatalog"
42 DB_USER = os.getenv("DB_USER", "etsicatalog")
43 DB_PASSWD = os.getenv("DB_PASSWD", "etsicatalog")
46 SERVICE_NAME = "catalog"
47 FORWARDED_FOR_FIELDS = ["HTTP_X_FORWARDED_FOR", "HTTP_X_FORWARDED_HOST",
48 "HTTP_X_FORWARDED_SERVER"]
51 REG_TO_MSB_WHEN_START = False
52 REG_TO_MSB_REG_URL = "/api/microservices/v1/services"
53 SSL_ENABLED = os.getenv("SSL_ENABLED", "false")
54 REG_TO_MSB_REG_PARAM = [{
55 "serviceName": "catalog",
57 "enable_ssl": SSL_ENABLED,
58 "url": "/api/catalog/v1",
69 "enable_ssl": SSL_ENABLED,
79 "serviceName": "vnfpkgm",
81 "enable_ssl": SSL_ENABLED,
82 "url": "/api/vnfpkgm/v1",
91 "serviceName": "parser",
93 "enable_ssl": SSL_ENABLED,
94 "url": "/api/parser/v1",
103 MSB_SVC_CALALOG_URL = "/api/microservices/v1/services/catalog/version/v1"
104 MSB_SVC_NSD_URL = "/api/microservices/v1/services/nsd/version/v1"
105 MSB_SVC_VNFPKGM_URL = "/api/microservices/v1/services/vnfpkgm/version/v1"
106 MSB_SVC_PARSER_URL = "/api/microservices/v1/services/parser/version/v1"
108 # catalog path(values is defined in settings.py)
109 CATALOG_ROOT_PATH = None
110 CATALOG_URL_PATH = None
112 VNFD_SCHEMA_VERSION_DEFAULT = "base"