def test_get_hostname(self): self.assertNotEqual(utils.get_hostname(), '')
from oslo_db import options as db_options from oslo_log import log as logging import oslo_messaging as messaging from kosmos._i18n import _, _LI from kosmos.common import utils from kosmos import version LOG = logging.getLogger(__name__) core_opts = [ cfg.IPOpt('bind_host', default='0.0.0.0', help=_("The host IP to bind to")), cfg.PortOpt('bind_port', default=9876, help=_("The port to bind to")), cfg.StrOpt('host', default=utils.get_hostname(), help=_("The hostname Kosmos is running on")), ] core_cli_opts = [] # Register the configuration options cfg.CONF.register_opts(core_opts) cfg.CONF.register_cli_opts(core_cli_opts) cfg.CONF.register_opts([ cfg.StrOpt( 'pybasedir', default=os.path.abspath(os.path.join(os.path.dirname(__file__), '../')),