def setUp(self): super(BaseDBTestCase, self).setUp() conf = test_utils.TestConfigOpts(CONF) self.adm_context = context.RequestContext(is_admin=True) self.context = context.RequestContext(is_admin=False) db_api.configure_db(conf) self.destroy_fixtures() self.create_fixtures()
def __init__(self, options): logger.info("Initializing scrubber with options: %s" % options) self.options = options scrub_time = config.get_option(options, 'scrub_time', type='int', default=0) logger.info("Scrub interval set to %s seconds" % scrub_time) self.scrub_time = datetime.timedelta(seconds=scrub_time) db_api.configure_db(options)
def __init__(self, options): logger.info(_("Initializing scrubber with options: %s") % options) self.options = options scrub_time = config.get_option(options, "scrub_time", type="int", default=0) logger.info(_("Scrub interval set to %s seconds") % scrub_time) self.scrub_time = datetime.timedelta(seconds=scrub_time) db_api.configure_db(options) store.create_stores(options)
def setUp(self): """Establish a clean test environment""" super(TestRegistryDb, self).setUp() conf = test_utils.TestConfigOpts(CONF) self.adm_context = rcontext.RequestContext(is_admin=True) self.context = rcontext.RequestContext(is_admin=False) db_api.configure_db(conf) self.destroy_fixtures() self.create_fixtures()
def __init__(self, options): logger.info(_("Initializing scrubber with options: %s") % options) self.options = options scrub_time = config.get_option(options, 'scrub_time', type='int', default=0) logger.info(_("Scrub interval set to %s seconds") % scrub_time) self.scrub_time = datetime.timedelta(seconds=scrub_time) db_api.configure_db(options) store.create_stores(options)
def setUp(self): """Establish a clean test environment""" self.stubs = stubout.StubOutForTesting() stubs.stub_out_registry_and_store_server(self.stubs) stubs.stub_out_filesystem_backend() conf = test_utils.TestConfigOpts(CONF) self.adm_context = rcontext.RequestContext(is_admin=True) self.context = rcontext.RequestContext(is_admin=False) db_api.configure_db(conf) self.destroy_fixtures() self.create_fixtures()
def __init__(self, conf): self.conf = conf db_api.configure_db(conf)
'dry-run', help='Print output but do not make db changes.'), glance.openstack.common.cfg.StrOpt('keystone-auth-uri', help='Authentication endpoint'), glance.openstack.common.cfg.StrOpt( 'keystone-admin-tenant-name', help='Administrative user\'s tenant name'), glance.openstack.common.cfg.StrOpt('keystone-admin-user', help='Administrative user\'s id'), glance.openstack.common.cfg.StrOpt( 'keystone-admin-password', help='Administrative user\'s password'), ] config.register_cli_opts(extra_cli_opts) config() config.register_opts(glance.common.context.ContextMiddleware.opts) db_api.configure_db(config) context = glance.common.context.RequestContext(is_admin=True) auth_uri = config.keystone_auth_uri admin_tenant_name = config.keystone_admin_tenant_name admin_user = config.keystone_admin_user admin_password = config.keystone_admin_password if not (auth_uri and admin_tenant_name and admin_user and admin_password): logger.critical('Missing authentication arguments') sys.exit(1) ks = keystoneclient.v2_0.client.Client(username=admin_user, password=admin_password, tenant_name=admin_tenant_name,
def __init__(self, options): self.options = options db_api.configure_db(options)
def __init__(self, conf): self.conf = conf self.conf.register_opts(self.opts) db_api.configure_db(conf)
glance.common.cfg.BoolOpt('dry-run', help='Print output but do not make db changes.'), glance.common.cfg.StrOpt('keystone-auth-uri', help='Authentication endpoint'), glance.common.cfg.StrOpt('keystone-admin-tenant-name', help='Administrative user\'s tenant name'), glance.common.cfg.StrOpt('keystone-admin-user', help='Administrative user\'s id'), glance.common.cfg.StrOpt('keystone-admin-password', help='Administrative user\'s password'), ] config.register_cli_opts(extra_cli_opts) config() config.register_opts(glance.common.context.ContextMiddleware.opts) db_api.configure_db(config) context = glance.registry.context.RequestContext(is_admin=True) auth_uri = config.keystone_auth_uri admin_tenant_name = config.keystone_admin_tenant_name admin_user = config.keystone_admin_user admin_password = config.keystone_admin_password if not (auth_uri and admin_tenant_name and admin_user and admin_password): logger.critical('Missing authentication arguments') sys.exit(1) ks = keystoneclient.v2_0.client.Client(username=admin_user, password=admin_password, tenant_name=admin_tenant_name,