def prepare_service(argv=None): argv = [] if argv is None else argv log.register_options(CONF) log.set_defaults(default_log_levels=[ 'amqp=WARNING', 'amqplib=WARNING', 'qpid.messaging=INFO', 'oslo_messaging=INFO', 'sqlalchemy=WARNING', 'stevedore=INFO', 'eventlet.wsgi.server=INFO', 'iso8601=WARNING', 'paramiko=WARNING', 'requests=WARNING', 'neutronclient=WARNING', 'glanceclient=WARNING', 'urllib3.connectionpool=WARNING', 'keystonemiddleware.auth_token=INFO', 'keystoneauth.session=INFO', ]) config.parse_args(argv) # NOTE(vdrok): We need to setup logging after argv was parsed, otherwise # it does not properly parse the options from config file and uses defaults # from oslo_log log.setup(CONF, 'ironic') objects.register_all()
def main(): config.parse_args(sys.argv) logging.setup("nova") global LOG LOG = logging.getLogger('nova.virt.baremetal.deploy_helper') app = BareMetalDeploy() srv = simple_server.make_server('', 10000, app) srv.serve_forever()
def setUp(self): super(ConfFixture, self).setUp() self.conf.set_default('host', 'fake-mini') self.conf.set_default('connection', "sqlite://", group='database') self.conf.set_default('sqlite_synchronous', False, group='database') self.conf.set_default('verbose', True) config.parse_args([], default_config_files=[]) self.addCleanup(self.conf.reset)
def prepare_service(argv=None): argv = [] if argv is None else argv log.register_options(CONF) opts.update_opt_defaults() config.parse_args(argv) # NOTE(vdrok): We need to setup logging after argv was parsed, otherwise # it does not properly parse the options from config file and uses defaults # from oslo_log log.setup(CONF, 'ironic') objects.register_all()
def _set_config(self): self.cfg_fixture = self.useFixture(config_fixture.Config(CONF)) self.config(use_stderr=False, fatal_exception_format_errors=True, tempdir=tempfile.tempdir) self.set_defaults(host='fake-mini', debug=True) self.set_defaults(connection="sqlite://", sqlite_synchronous=False, group='database') ironic_config.parse_args([], default_config_files=[])
def _set_config(self): self.cfg_fixture = self.useFixture(config_fixture.Config(CONF)) self.config(use_stderr=False, fatal_exception_format_errors=True, tempdir=tempfile.tempdir) self.set_defaults(host='fake-mini', verbose=True) self.set_defaults(connection="sqlite://", sqlite_synchronous=False, group='database') ironic_config.parse_args([], default_config_files=[])
def prepare_service(argv=[]): config.parse_args(argv) cfg.set_defaults(log.log_opts, default_log_levels=['amqplib=WARN', 'qpid.messaging=INFO', 'sqlalchemy=WARN', 'keystoneclient=INFO', 'stevedore=INFO', 'eventlet.wsgi.server=WARN', 'iso8601=WARN', 'paramiko=WARN', ]) log.setup('ironic')
def prepare_service(argv=[]): config.parse_args(argv) cfg.set_defaults(log.log_opts, default_log_levels=[ 'amqplib=WARN', 'qpid.messaging=INFO', 'sqlalchemy=WARN', 'keystoneclient=INFO', 'stevedore=INFO', 'eventlet.wsgi.server=WARN', 'iso8601=WARN', 'paramiko=WARN', ]) log.setup('ironic')
def setUp(self): super(ConfFixture, self).setUp() self.conf.set_default('host', 'fake-mini') self.conf.set_default('rpc_backend', 'ironic.openstack.common.rpc.impl_fake') self.conf.set_default('rpc_cast_timeout', 5) self.conf.set_default('rpc_response_timeout', 5) self.conf.set_default('sql_connection', "sqlite://") self.conf.set_default('sqlite_synchronous', False) self.conf.set_default('use_ipv6', True) self.conf.set_default('verbose', True) config.parse_args([], default_config_files=[]) self.addCleanup(self.conf.reset)
def _set_config(self): self.cfg_fixture = self.useFixture(config_fixture.Config(CONF)) self.config(use_stderr=False, fatal_exception_format_errors=True, tempdir=tempfile.tempdir) self.config(cleaning_network_uuid=uuidutils.generate_uuid(), group='neutron') self.config(provisioning_network_uuid=uuidutils.generate_uuid(), group='neutron') self.config(enabled_network_interfaces=['flat', 'noop', 'neutron']) self.set_defaults(host='fake-mini', debug=True) self.set_defaults(connection="sqlite://", sqlite_synchronous=False, group='database') ironic_config.parse_args([], default_config_files=[])
def prepare_service(argv=[]): config.parse_args(argv) cfg.set_defaults(log.log_opts, default_log_levels=['amqp=WARN', 'amqplib=WARN', 'qpid.messaging=INFO', 'oslo.messaging=INFO', 'sqlalchemy=WARN', 'keystoneclient=INFO', 'stevedore=INFO', 'eventlet.wsgi.server=WARN', 'iso8601=WARN', 'paramiko=WARN', 'requests=WARN', 'neutronclient=WARN', 'glanceclient=WARN', 'ironic.openstack.common=WARN', ]) log.setup('ironic')
def prepare_service(argv=[]): log.register_options(CONF) log.set_defaults(default_log_levels=['amqp=WARNING', 'amqplib=WARNING', 'qpid.messaging=INFO', 'oslo_messaging=INFO', 'sqlalchemy=WARNING', 'keystoneclient=INFO', 'stevedore=INFO', 'eventlet.wsgi.server=WARNING', 'paramiko=WARNING', 'requests=WARNING', 'neutronclient=WARNING', 'glanceclient=WARNING', 'ironic.openstack.common=WARNING', 'urllib3.connectionpool=WARNING', ]) config.parse_args(argv) log.setup(CONF, 'ironic')
def _set_config(self): self.cfg_fixture = self.useFixture(config_fixture.Config(CONF)) self.config(use_stderr=False, fatal_exception_format_errors=True, tempdir=tempfile.tempdir) self.config(cleaning_network=uuidutils.generate_uuid(), group='neutron') self.config(provisioning_network=uuidutils.generate_uuid(), group='neutron') self.config(rescuing_network=uuidutils.generate_uuid(), group='neutron') self.config( enabled_hardware_types=['fake-hardware', 'manual-management']) for iface in drivers_base.ALL_INTERFACES: default = None # Restore some reasonable defaults if iface == 'network': values = ['flat', 'noop', 'neutron'] else: values = ['fake'] if iface == 'deploy': values.extend(['iscsi', 'direct']) elif iface == 'boot': values.append('pxe') elif iface == 'storage': default = 'noop' values.append('noop') elif iface not in {'network', 'power', 'management'}: values.append('no-%s' % iface) self.config( **{ 'enabled_%s_interfaces' % iface: values, 'default_%s_interface' % iface: default }) self.set_defaults(host='fake-mini', debug=True) self.set_defaults(connection="sqlite://", sqlite_synchronous=False, group='database') ironic_config.parse_args([], default_config_files=[])
def _set_config(self): self.cfg_fixture = self.useFixture(config_fixture.Config(CONF)) self.config(use_stderr=False, fatal_exception_format_errors=True, tempdir=tempfile.tempdir) self.config(cleaning_network=uuidutils.generate_uuid(), group='neutron') self.config(provisioning_network=uuidutils.generate_uuid(), group='neutron') self.config(rescuing_network=uuidutils.generate_uuid(), group='neutron') self.config(enabled_drivers=['fake']) self.config(enabled_hardware_types=['fake-hardware']) self.config(enabled_network_interfaces=['flat', 'noop', 'neutron']) for iface in drivers_base.ALL_INTERFACES: self.config(**{'default_%s_interface' % iface: None}) self.set_defaults(host='fake-mini', debug=True) self.set_defaults(connection="sqlite://", sqlite_synchronous=False, group='database') ironic_config.parse_args([], default_config_files=[])
def prepare_service(argv=[]): config.parse_args(argv) cfg.set_defaults( log.log_opts, default_log_levels=[ "amqp=WARN", "amqplib=WARN", "qpid.messaging=INFO", "sqlalchemy=WARN", "keystoneclient=INFO", "stevedore=INFO", "eventlet.wsgi.server=WARN", "iso8601=WARN", "paramiko=WARN", "requests=WARN", "neutronclient=WARN", "glanceclient=WARN", "ironic.openstack.common=WARN", ], ) log.setup("ironic")
def prepare_service(argv=[]): log.register_options(CONF) log.set_defaults(default_log_levels=[ 'amqp=WARNING', 'amqplib=WARNING', 'qpid.messaging=INFO', 'oslo_messaging=INFO', 'sqlalchemy=WARNING', 'keystoneclient=INFO', 'stevedore=INFO', 'eventlet.wsgi.server=WARNING', 'iso8601=WARNING', 'paramiko=WARNING', 'requests=WARNING', 'neutronclient=WARNING', 'glanceclient=WARNING', 'urllib3.connectionpool=WARNING', ]) config.parse_args(argv) log.setup(CONF, 'ironic') objects.register_all()
def _set_config(self): self.cfg_fixture = self.useFixture(config_fixture.Config(CONF)) self.config(use_stderr=False, fatal_exception_format_errors=True, tempdir=tempfile.tempdir) self.config(cleaning_network=uuidutils.generate_uuid(), group='neutron') self.config(provisioning_network=uuidutils.generate_uuid(), group='neutron') self.config(rescuing_network=uuidutils.generate_uuid(), group='neutron') self.config(enabled_hardware_types=['fake-hardware', 'manual-management']) for iface in drivers_base.ALL_INTERFACES: default = None # Restore some reasonable defaults if iface == 'network': values = ['flat', 'noop', 'neutron'] else: values = ['fake'] if iface == 'deploy': values.extend(['iscsi', 'direct']) elif iface == 'boot': values.append('pxe') elif iface == 'storage': default = 'noop' values.append('noop') elif iface not in {'network', 'power', 'management'}: values.append('no-%s' % iface) self.config(**{'enabled_%s_interfaces' % iface: values, 'default_%s_interface' % iface: default}) self.set_defaults(host='fake-mini', debug=True) self.set_defaults(connection="sqlite://", sqlite_synchronous=False, group='database') ironic_config.parse_args([], default_config_files=[])
def prepare_service(argv=[]): log.register_options(CONF) log.set_defaults(default_log_levels=['amqp=WARNING', 'amqplib=WARNING', 'qpid.messaging=INFO', 'oslo_messaging=INFO', 'sqlalchemy=WARNING', 'keystoneclient=INFO', 'stevedore=INFO', 'eventlet.wsgi.server=INFO', 'iso8601=WARNING', 'paramiko=WARNING', 'requests=WARNING', 'neutronclient=WARNING', 'glanceclient=WARNING', 'urllib3.connectionpool=WARNING', 'keystonemiddleware.auth_token=INFO', 'keystoneauth.session=INFO', ]) config.parse_args(argv) log.setup(CONF, 'ironic') objects.register_all()