mirror of
https://github.com/OpenMTC/OpenMTC.git
synced 2024-12-18 20:47:58 +00:00
better defaults, fix wrong wsgi interface
This commit is contained in:
parent
900541b3b2
commit
262d6b65fb
@ -13,6 +13,7 @@ SSL_CA=${SSL_CA-"/etc/openmtc/certs/ca-chain.cert.pem"}
|
||||
ORION_HOST=${ORION_HOST-"http://localhost:1026"}
|
||||
ORION_API=${ORION_API-"v2"}
|
||||
ACCUMULATE_ADDRESS=${ACCUMULATE_ADDRESS-"http://localhost:8080"}
|
||||
LABELS=${LABELS-'["openmtc:sensor_data"]'}
|
||||
|
||||
# defaults logging
|
||||
LOGGING_FILE=${LOGGING_FILE-"/var/log/openmtc/orioncontextbroker.log"}
|
||||
@ -48,6 +49,7 @@ JQ_STRING=${JQ_STRING}' |
|
||||
.orion_host = "'${ORION_HOST}'" |
|
||||
.orion_api = "'${ORION_API}'" |
|
||||
.accumulate_address = "'${ACCUMULATE_ADDRESS}'" |
|
||||
.labels = '${LABELS}' |
|
||||
.ssl_certs.cert_file = "'${SSL_CRT}'" |
|
||||
.ssl_certs.key_file = "'${SSL_KEY}'" |
|
||||
.ssl_certs.ca_certs = "'${SSL_CA}'" |
|
||||
|
@ -15,7 +15,7 @@
|
||||
"level": "INFO",
|
||||
"file": "/var/log/openmtc/orioncontextbroker.log"
|
||||
},
|
||||
"labels": [],
|
||||
"labels": ["openmtc:sensor_data"],
|
||||
"interval": 10,
|
||||
"orion_host": "http://localhost:1026",
|
||||
"orion_api": "v2"
|
||||
|
@ -10,7 +10,7 @@ class OrionContextBroker(ResourceManagementXAE):
|
||||
def __init__(self,
|
||||
orion_host="http://localhost:1026",
|
||||
orion_api="v2",
|
||||
labels=None,
|
||||
labels=["openmtc:sensor_data"],
|
||||
accumulate_address="http://localhost:8080",
|
||||
*args,
|
||||
**kw):
|
||||
@ -38,7 +38,7 @@ class OrionContextBroker(ResourceManagementXAE):
|
||||
methods=["POST"])
|
||||
accumulate_ip, accumulate_port = accumulate_address.split('//')[
|
||||
1].split(':')
|
||||
self.server = wsgi.WSGIServer((accumulate_ip, int(accumulate_port)),
|
||||
self.server = wsgi.WSGIServer(("0.0.0.0", int(accumulate_port)),
|
||||
self.app)
|
||||
self.server.start()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user