Beispiel #1
0
    cfg.StrOpt('host', default=utils.get_hostname(),
               help=_("The hostname Quantum is running on")),
    cfg.BoolOpt('force_gateway_on_subnet', default=False,
                help=_("Ensure that configured gateway is on subnet")),
]

core_cli_opts = [
    cfg.StrOpt('state_path', default='/var/lib/quantum'),
]

# Register the configuration options
cfg.CONF.register_opts(core_opts)
cfg.CONF.register_cli_opts(core_cli_opts)

# Ensure that the control exchange is set correctly
rpc.set_defaults(control_exchange='quantum')


def parse(args):
    cfg.CONF(args=args, project='quantum',
             version='%%prog %s' % quantum_version.version_string_with_vcs())

    # Validate that the base_mac is of the correct format
    msg = attributes._validate_regex(cfg.CONF.base_mac,
                                     attributes.MAC_PATTERN)
    if msg:
        msg = "Base MAC: %s" % msg
        raise Exception(msg)


def setup_logging(conf):
Beispiel #2
0
               help=_("The hostname Quantum is running on")),
    cfg.BoolOpt('force_gateway_on_subnet',
                default=False,
                help=_("Ensure that configured gateway is on subnet")),
]

core_cli_opts = [
    cfg.StrOpt('state_path', default='/var/lib/quantum'),
]

# Register the configuration options
cfg.CONF.register_opts(core_opts)
cfg.CONF.register_cli_opts(core_cli_opts)

# Ensure that the control exchange is set correctly
rpc.set_defaults(control_exchange='quantum')


def parse(args):
    cfg.CONF(args=args,
             project='quantum',
             version='%%prog %s' % quantum_version.release_string())

    # Validate that the base_mac is of the correct format
    msg = attributes._validate_regex(cfg.CONF.base_mac, attributes.MAC_PATTERN)
    if msg:
        msg = _("Base MAC: %s") % msg
        raise Exception(msg)


def setup_logging(conf):