c1d469597a240e09839b789436c2cb258b092ab9
[modeling/etsicatalog.git] / catalog / pub / config / config.py
1 # Copyright 2017 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
15 # [MSB]
16 MSB_SERVICE_PROTOCOL = 'http'
17 MSB_SERVICE_IP = '127.0.0.1'
18 MSB_SERVICE_PORT = '80'
19 MSB_BASE_URL = "%s://%s:%s" % (MSB_SERVICE_PROTOCOL, MSB_SERVICE_IP, MSB_SERVICE_PORT)
20
21 # [mysql]
22 DB_IP = "127.0.0.1"
23 DB_PORT = 3306
24 DB_NAME = "etsicatalog"
25 DB_USER = "etsicatalog"
26 DB_PASSWD = "etsicatalog"
27
28 # [MDC]
29 SERVICE_NAME = "catalog"
30 FORWARDED_FOR_FIELDS = ["HTTP_X_FORWARDED_FOR", "HTTP_X_FORWARDED_HOST",
31                         "HTTP_X_FORWARDED_SERVER"]
32
33 # [register]
34 REG_TO_MSB_WHEN_START = True
35 SSL_ENABLED = "true"
36 REG_TO_MSB_REG_URL = "/api/microservices/v1/services"
37 if SSL_ENABLED == "true":
38     enable_ssl = "true"
39 else:
40     enable_ssl = "false"
41 REG_TO_MSB_REG_PARAM = [{
42     "serviceName": "catalog",
43     "version": "v1",
44     "enable_ssl": enable_ssl,
45     "url": "/api/catalog/v1",
46     "protocol": "REST",
47     "visualRange": "1",
48     "nodes": [{
49         "ip": "127.0.0.1",
50         "port": "8806",
51         "ttl": 0
52     }]
53 }, {
54     "serviceName": "nsd",
55     "version": "v1",
56     "enable_ssl": enable_ssl,
57     "url": "/api/nsd/v1",
58     "protocol": "REST",
59     "visualRange": "1",
60     "nodes": [{
61         "ip": "127.0.0.1",
62         "port": "8806",
63         "ttl": 0
64     }]
65 }, {
66     "serviceName": "vnfpkgm",
67     "version": "v1",
68     "enable_ssl": enable_ssl,
69     "url": "/api/vnfpkgm/v1",
70     "protocol": "REST",
71     "visualRange": "1",
72     "nodes": [{
73         "ip": "127.0.0.1",
74         "port": "8806",
75         "ttl": 0
76     }]
77 }, {
78     "serviceName": "parser",
79     "version": "v1",
80     "enable_ssl": enable_ssl,
81     "url": "/api/parser/v1",
82     "protocol": "REST",
83     "visualRange": "1",
84     "nodes": [{
85         "ip": "127.0.0.1",
86         "port": "8806",
87         "ttl": 0
88     }]
89 }]
90 MSB_SVC_CALALOG_URL = "/api/microservices/v1/services/catalog/version/v1"
91 MSB_SVC_NSD_URL = "/api/microservices/v1/services/nsd/version/v1"
92 MSB_SVC_VNFPKGM_URL = "/api/microservices/v1/services/vnfpkgm/version/v1"
93 MSB_SVC_PARSER_URL = "/api/microservices/v1/services/parser/version/v1"
94
95 # catalog path(values is defined in settings.py)
96 CATALOG_ROOT_PATH = None
97 CATALOG_URL_PATH = None
98
99 # [sdc config]
100 SDC_BASE_URL = MSB_BASE_URL + "/api"
101 SDC_USER = "modeling"
102 SDC_PASSWD = "Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U"
103
104 # [dmaap config]
105 DMAAP_MR_IP = MSB_SERVICE_IP
106 DMAAP_MR_PORT = '30226'
107 CONSUMER_GROUP = "consumerGroup"
108 CONSUMER_ID = "consumerId"
109 POLLING_INTERVAL = 15
110
111 VNFD_SCHEMA_VERSION_DEFAULT = "base"