예제 #1
0
 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()
예제 #2
0
파일: scrubber.py 프로젝트: emonty/glance
 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)
예제 #3
0
파일: scrubber.py 프로젝트: jkoelker/glance
 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)
예제 #4
0
파일: test_db.py 프로젝트: altai/glance
 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 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()
예제 #6
0
 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()
예제 #7
0
 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)
예제 #8
0
파일: test_db.py 프로젝트: russellb/glance
 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()
예제 #9
0
파일: test_db.py 프로젝트: russellb/glance
 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()
예제 #10
0
파일: members.py 프로젝트: russellb/glance
 def __init__(self, conf):
     self.conf = conf
     db_api.configure_db(conf)
예제 #11
0
            '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,
예제 #12
0
 def __init__(self, options):
     self.options = options
     db_api.configure_db(options)
 def __init__(self, conf):
     self.conf = conf
     db_api.configure_db(conf)
예제 #14
0
파일: images.py 프로젝트: russellb/glance
 def __init__(self, conf):
     self.conf = conf
     self.conf.register_opts(self.opts)
     db_api.configure_db(conf)
예제 #15
0
파일: images.py 프로젝트: AsylumCorp/glance
 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,
예제 #17
0
파일: images.py 프로젝트: nicoleLiu/glance
 def __init__(self, options):
     self.options = options
     db_api.configure_db(options)