Don't modify the config file with sed in the docker entrypoint script
[vfc/nfvo/lcm.git] / lcm / pub / config / config.py
1 # Copyright 2016 ZTE Corporation.
2 #
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
6 #
7 #         http://www.apache.org/licenses/LICENSE-2.0
8 #
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.
14 import os
15
16 # [MSB]
17 MSB_BASE_URL = os.getenv("MSB_HOST", "http://127.0.0.1:80")
18 MSB_ENABLED = os.getenv("MSB_ENABLED", True)
19
20 # [mysql]
21 DB_IP = os.getenv("MYSQL_ADDR", "127.0.0.1:3306").split(':')[0]
22 DB_PORT = os.getenv("MYSQL_ADDR", "127.0.0.1:3306").split(':')[1]
23 DB_NAME = "vfcnfvolcm"
24 DB_USER = "vfcnfvolcm"
25 DB_PASSWD = "vfcnfvolcm"
26
27 # [REDIS]
28 REDIS_HOST = os.getenv("REDIS_HOST", DB_IP)
29 REDIS_PORT = '6379'
30 REDIS_PASSWD = ''
31
32 # [MDC]
33 SERVICE_NAME = "nslcm"
34 FORWARDED_FOR_FIELDS = ["HTTP_X_FORWARDED_FOR", "HTTP_X_FORWARDED_HOST",
35                         "HTTP_X_FORWARDED_SERVER"]
36
37 # [register]
38 REG_TO_MSB_WHEN_START = os.getenv("REG_TO_MSB_WHEN_START", "false")
39 SSL_ENABLED = os.getenv("SSL_ENABLED", "false")
40 REG_TO_MSB_REG_URL = "/api/microservices/v1/services"
41 REG_TO_MSB_REG_PARAM = {
42     "serviceName": "nslcm",
43     "version": "v1",
44     "enable_ssl": SSL_ENABLED,
45     "url": "/api/nslcm/v1",
46     "protocol": "REST",
47     "visualRange": "1",
48     "nodes": [{
49         "ip": "127.0.0.1",
50         "port": "8403",
51         "ttl": 0
52     }]
53 }
54 MSB_SVC_URL = "/api/microservices/v1/services/nslcm/version/%s"
55
56 # [aai config]
57 AAI_BASE_URL = "http://10.0.14.1:80/aai/v11"
58 AAI_USER = "AAI"
59 AAI_PASSWD = "AAI"
60 REPORT_TO_AAI = True
61
62 # [sdc config]
63 SDC_BASE_URL = "http://10.0.14.1:80/api"
64 SDC_USER = "SDC"
65 SDC_PASSWD = "SDC"
66
67 # [DMaaP]
68 MR_IP = '127.0.0.1'
69 MR_PORT = '3904'
70
71 # [workflow]
72 DEPLOY_WORKFLOW_WHEN_START = False
73 # Support option: activiti/wso2/buildin/grapflow
74 WORKFLOW_OPTION = "buildin"
75
76 # [OOF config]
77 OOF_BASE_URL = "https://oof-osdf.onap:8698"
78 OOF_USER = "vfc_test"
79 OOF_PASSWD = "vfc_testpwd"
80
81 # [Customer information]
82 CUST_NAME = "some_company"
83 CUST_LAT = "32.897480"
84 CUST_LONG = "97.040443"