def resource_setup(cls): super(BaseMonascaTest, cls).resource_setup() auth_version = CONF.identity.auth_version cls.cred_provider = credentials_factory.get_credentials_provider( cls.__name__, force_tenant_isolation=True, identity_version=auth_version) credentials = cls.cred_provider.get_creds_by_roles( ['monasca-user', 'anotherrole']).credentials cls.os = clients.Manager(credentials=credentials) cls.monasca_client = cls.os.monasca_client
def resource_setup(cls): super(TestReadOnlyRole, cls).resource_setup() credentials = cls.cred_provider.get_creds_by_roles( ['monasca-read-only-user']).credentials cls.os = clients.Manager(credentials=credentials) cls.monasca_client = cls.os.monasca_client
def resource_setup(cls): super(BaseMonascaTest, cls).resource_setup() cls.os = clients.Manager() cls.monasca_client = cls.os.monasca_client