MCPcopy Index your code
hub / github.com/StackStorm/st2 / db_config

Function db_config

st2common/st2common/database_setup.py:29–48  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

27
28
29def db_config():
30 username = getattr(cfg.CONF.database, "username", None)
31 password = getattr(cfg.CONF.database, "password", None)
32
33 return {
34 "db_name": cfg.CONF.database.db_name,
35 "db_host": cfg.CONF.database.host,
36 "db_port": cfg.CONF.database.port,
37 "username": username,
38 "password": password,
39 "tls": cfg.CONF.database.tls,
40 "tls_certificate_key_file": cfg.CONF.database.tls_certificate_key_file,
41 "tls_certificate_key_file_password": cfg.CONF.database.tls_certificate_key_file_password,
42 "tls_allow_invalid_certificates": cfg.CONF.database.tls_allow_invalid_certificates,
43 "tls_ca_file": cfg.CONF.database.tls_ca_file,
44 "tls_allow_invalid_hostnames": cfg.CONF.database.tls_allow_invalid_hostnames,
45 "ssl_cert_reqs": cfg.CONF.database.ssl_cert_reqs, # deprecated
46 "authentication_mechanism": cfg.CONF.database.authentication_mechanism,
47 "ssl_match_hostname": cfg.CONF.database.ssl_match_hostname, # deprecated
48 }
49
50
51def db_setup(ensure_indexes=True):

Callers 2

db_cleanupFunction · 0.90
db_setupFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected