def setUp(self): super(MigrateNovaAuth, self).setUp() CONF(config_files=[test.etcdir('keystone.conf'), test.testsdir('test_overrides.conf'), test.testsdir('backend_sql.conf')]) sql_util.setup_test_database() self.identity_api = identity_sql.Identity() self.ec2_api = ec2_sql.Ec2()
def __init__(self, db_string): self.db = sqlalchemy.create_engine(db_string) self.identity_driver = identity_sql.Identity() self.identity_driver.db_sync() self.ec2_driver = ec2_sql.Ec2() self._data = {} self._user_map = {} self._project_map = {} self._role_map = {}
def setUp(self): super(MigrateNovaAuth, self).setUp() self.config([test.etcdir('keystone.conf.sample'), test.testsdir('test_overrides.conf'), test.testsdir('backend_sql.conf'), test.testsdir('backend_sql_disk.conf')]) sql_util.setup_test_database() self.identity_man = identity.Manager() self.identity_api = identity_sql.Identity() self.ec2_api = ec2_sql.Ec2()
def import_auth(data): identity_api = identity_sql.Identity() tenant_map = _create_tenants(identity_api, data['tenants']) user_map = _create_users(identity_api, data['users']) _create_memberships(identity_api, data['user_tenant_list'], user_map, tenant_map) role_map = _create_roles(identity_api, data['roles']) _assign_roles(identity_api, data['role_user_tenant_list'], role_map, user_map, tenant_map) ec2_api = ec2_sql.Ec2() ec2_creds = data['ec2_credentials'] _create_ec2_creds(ec2_api, identity_api, ec2_creds, user_map)
def __init__(self, db_string): self.db = sqlalchemy.create_engine(db_string) #TODO(ayoung): Replace with call via Manager self.identity_driver = identity_sql.Identity() self.assignment_driver = assignment_sql.Assignment() self.identity_driver.assignment_api = self.assignment_driver self.assignment_driver.identity_api = self.identity_driver self.identity_driver.db_sync() self.assignment_driver.db_sync() self.ec2_driver = ec2_sql.Ec2() self._data = {} self._user_map = {} self._project_map = {} self._role_map = {}