SHOW:
|
|
- or go back to the newest paste.
| 1 | #/etc/my.conf | |
| 2 | ||
| 3 | [DEFAULT] | |
| 4 | ||
| 5 | ########### | |
| 6 | # Logging # | |
| 7 | ########### | |
| 8 | # syslog server configuration (default port(UDP): 514) | |
| 9 | # NOTE: Following logging configuration can be left as is for logs to come on UI | |
| 10 | syslog_host=127.0.0.1 | |
| 11 | syslog_port=514 | |
| 12 | ||
| 13 | # log facility | |
| 14 | log_facility=LOG_LOCAL3 | |
| 15 | ||
| 16 | [HA] | |
| 17 | NODE_NAME=NODE1 | |
| 18 | DIR_STR=/opt | |
| 19 | ||
| 20 | [OPENSTACK] | |
| 21 | HA_VIRTUAL_IP=192.168.0.26 | |
| 22 | ||
| 23 | ||
| 24 | #app.py | |
| 25 | ||
| 26 | ||
| 27 | from lib.logging import logging_module | |
| 28 | from oslo.config import cfg | |
| 29 | ||
| 30 | ||
| 31 | cfg.CONF.register_opt(cfg.StrOpt('NODE_NAME'), cfg.OptGroup('HA'))
| |
| 32 | ||
| 33 | ||
| 34 | def main(): | |
| 35 | - | print cfg.CONF.HA.NODE_NAME |
| 35 | + | print cfg.CONF.HA.NODE_NAME |
| 36 | ||
| 37 | if __name__ == '__main__': | |
| 38 | main() |