def setUp(self):
        super(NovaClientCompatMasterTestCase, self).setUp()

        revdir = test.checkout_vendor(NOVACLIENT_REPO, 'master')
        self.add_path(revdir)
        from novaclient.keystone import client as ks_client
        from novaclient import client as base_client
        reload(ks_client)
        reload(base_client)

        self.app = self.loadapp('keystoneclient_compat_master')
        self.options = self.appconfig('keystoneclient_compat_master')

        self.identity_backend = utils.import_object(
            self.options['identity_driver'], options=self.options)
        self.token_backend = utils.import_object(self.options['token_driver'],
                                                 options=self.options)
        self.catalog_backend = utils.import_object(
            self.options['catalog_driver'], options=self.options)

        self.server = self.serveapp('keystoneclient_compat_master')

        self.tenant_bar = self.identity_backend.create_tenant(
            'bar', models.Tenant(id='bar', name='BAR'))

        self.user_foo = self.identity_backend.create_user(
            'foo',
            models.User(id='foo',
                        name='FOO',
                        tenants=[self.tenant_bar['id']],
                        password='******'))

        self.extras_bar_foo = self.identity_backend.create_extras(
            self.user_foo['id'], self.tenant_bar['id'],
            dict(roles=[], roles_links=[]))
    def setUp(self):
        super(MasterCompatTestCase, self).setUp()

        revdir = test.checkout_vendor(KEYSTONECLIENT_REPO, "master")
        self.add_path(revdir)
        from keystoneclient.v2_0 import client as ks_client

        reload(ks_client)

        self.app = self.loadapp("keystoneclient_compat_master")
        self.options = self.appconfig("keystoneclient_compat_master")

        self.identity_backend = utils.import_object(self.options["identity_driver"], options=self.options)
        self.token_backend = utils.import_object(self.options["token_driver"], options=self.options)
        self.catalog_backend = utils.import_object(self.options["catalog_driver"], options=self.options)

        self.server = self.serveapp("keystoneclient_compat_master")

        self.tenant_bar = self.identity_backend.create_tenant("bar", models.Tenant(id="bar", name="BAR"))

        self.user_foo = self.identity_backend.create_user(
            "foo", models.User(id="foo", name="FOO", tenants=[self.tenant_bar["id"]], password="******")
        )

        self.extras_bar_foo = self.identity_backend.create_extras(
            self.user_foo["id"], self.tenant_bar["id"], dict(roles=[], is_admin="1", roles_links=[])
        )
  def setUp(self):
    revdir = test.checkout_vendor(KEYSTONE_REPO, 'stable/diablo')
    self.sampledir = os.path.join(revdir, KEYSTONE_SAMPLE_DIR)
    self.app = self.loadapp('keystone_compat_diablo')
    self.options = self.appconfig('keystone_compat_diablo')

    self.identity_backend = utils.import_object(
        self.options['identity_driver'], options=self.options)
    self.token_backend = utils.import_object(
        self.options['token_driver'], options=self.options)
    self.catalog_backend = utils.import_object(
        self.options['catalog_driver'], options=self.options)

    super(DiabloCompatTestCase, self).setUp()
  def setUp(self):
    super(NovaClientCompatMasterTestCase, self).setUp()

    revdir = test.checkout_vendor(NOVACLIENT_REPO, 'master')
    self.add_path(revdir)
    from novaclient.keystone import client as ks_client
    from novaclient import client as base_client
    reload(ks_client)
    reload(base_client)

    self.app = self.loadapp('keystoneclient_compat_master')
    self.options = self.appconfig('keystoneclient_compat_master')

    self.identity_backend = utils.import_object(
        self.options['identity_driver'], options=self.options)
    self.token_backend = utils.import_object(
        self.options['token_driver'], options=self.options)
    self.catalog_backend = utils.import_object(
        self.options['catalog_driver'], options=self.options)

    self.server = self.serveapp('keystoneclient_compat_master')

    self.tenant_bar = self.identity_backend.create_tenant(
        'bar',
        models.Tenant(id='bar', name='BAR'))

    self.user_foo = self.identity_backend.create_user(
        'foo',
        models.User(id='foo',
                    name='FOO',
                    tenants=[self.tenant_bar['id']],
                    password='******'))

    self.extras_bar_foo = self.identity_backend.create_extras(
        self.user_foo['id'], self.tenant_bar['id'],
        dict(roles=[],
             roles_links=[]))