Setup micro-service of multivim broker
[multicloud/framework.git] / multivimbroker / multivimbroker / pub / config / config.py
1 # Copyright (c) 2017 Wind River Systems, Inc.
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 #       http://www.apache.org/licenses/LICENSE-2.0
7 #
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
12 import os
13
14 # [MSB]
15 MSB_SERVICE_IP = '127.0.0.1'
16 MSB_SERVICE_PORT = '10080'
17
18 # [IMAGE LOCAL PATH]
19 ROOT_PATH = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
20
21 # [REDIS]
22 REDIS_HOST = '127.0.0.1'
23 REDIS_PORT = '6379'
24 REDIS_PASSWD = ''
25
26 # [mysql]
27 DB_IP = "127.0.0.1"
28 DB_PORT = 3306
29 DB_NAME = "multivimbroker"
30 DB_USER = "root"
31 DB_PASSWD = "password"
32
33 # [register]
34 REG_TO_MSB_WHEN_START = True
35 REG_TO_MSB_REG_URL = "/openoapi/microservices/v1/services"
36 REG_TO_MSB_REG_PARAM = {
37     "serviceName": "multivim",
38     "version": "v1",
39     "url": "/openoapi/multivim/v1",
40     "protocol": "REST",
41     "visualRange": "1",
42     "nodes": [{
43         "ip": "127.0.0.1",
44         "port": "9001",
45         "ttl": 0
46     }]
47 }