[docker-restapi]: add restapi config to config Db (#4495)

This commit is contained in:
Sumukha Tumkur Vani 2020-04-30 00:25:49 -07:00 committed by GitHub
parent a539cf2f46
commit e1ba5b0f5f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 2 deletions

View File

@ -19,7 +19,7 @@ endif
$(DOCKER_RESTAPI)_CONTAINER_NAME = restapi
$(DOCKER_RESTAPI)_RUN_OPT += --cap-add NET_ADMIN --privileged -t
$(DOCKER_RESTAPI)_RUN_OPT += -v /var/run/redis/redis.sock:/var/run/redis/redis.sock
$(DOCKER_RESTAPI)_RUN_OPT += -v /etc/sonic/certificates:/etc/sonic/certificates:ro
$(DOCKER_RESTAPI)_RUN_OPT += -v /etc/sonic/credentials:/etc/sonic/credentials:ro
$(DOCKER_RESTAPI)_RUN_OPT += -p=8081:8081/tcp
$(DOCKER_RESTAPI)_RUN_OPT += -p=8090:8090/tcp

View File

@ -836,7 +836,19 @@ def parse_xml(filename, platform=None, port_config_file=None):
'ca_crt': '/etc/sonic/telemetry/dsmsroot.cer'
}
}
results['RESTAPI'] = {
'config': {
'client_auth': 'true',
'allow_insecure': 'false',
'log_level': 'trace'
},
'certs': {
'server_crt': '/etc/sonic/credentials/restapiserver.crt',
'server_key': '/etc/sonic/credentials/restapiserver.key',
'client_ca_crt': '/etc/sonic/credentials/restapiclient.crt',
'client_crt_cname': 'client.restapi.sonic'
}
}
# Do not configure the minigraph's mirror session, which is currently unused
# mirror_sessions = {}
# if erspan_dst: