v3 Package

client_fixtures Module

test_access Module

class keystoneclient.tests.v3.test_access.AccessInfoTest(*args, **kwargs)

Bases: keystoneclient.tests.v3.utils.TestCase

test_building_domain_scoped_accessinfo()
test_building_project_scoped_accessinfo()
test_building_unscoped_accessinfo()
test_will_expire_soon()

test_auth Module

class keystoneclient.tests.v3.test_auth.AuthenticateAgainstKeystoneTests(*args, **kwargs)

Bases: keystoneclient.tests.v3.utils.TestCase

setUp()
test_allow_override_of_auth_token(*args, **kw)
test_auth_redirect(*args, **kw)
test_auth_url_token_authentication(*args, **kw)
test_authenticate_failure(*args, **kw)
test_authenticate_success(*args, **kw)
test_authenticate_success_domain_username_password_scoped(*args, **kw)
test_authenticate_success_password_unscoped(*args, **kw)
test_authenticate_success_token_domain_scoped(*args, **kw)
test_authenticate_success_token_project_scoped(*args, **kw)
test_authenticate_success_token_unscoped(*args, **kw)
test_authenticate_success_userid_password_domain_scoped(*args, **kw)
test_authenticate_success_userid_password_project_scoped(*args, **kw)

test_client Module

class keystoneclient.tests.v3.test_client.KeystoneClientTest(*args, **kwargs)

Bases: keystoneclient.tests.v3.utils.TestCase

test_auth_ref_load(*args, **kw)
test_auth_ref_load_with_overridden_arguments(*args, **kw)
test_client_with_region_name_passes_to_service_catalog(*args, **kw)
test_domain_scoped_init(*args, **kw)
test_init_err_no_auth_url()
test_management_url_is_updated_with_domain(*args, **kw)
test_management_url_is_updated_with_project(*args, **kw)
test_project_scoped_init(*args, **kw)
test_trust_init(*args, **kw)
test_unscoped_init(*args, **kw)

test_credentials Module

class keystoneclient.tests.v3.test_credentials.CredentialTests(*args, **kwargs)

Bases: keystoneclient.tests.v3.utils.TestCase, keystoneclient.tests.v3.utils.CrudTests

new_ref(**kwargs)
setUp()
test_create_data_not_blob()
test_update_data_not_blob()

test_discover Module

class keystoneclient.tests.v3.test_discover.DiscoverKeystoneTests(*args, **kwargs)

Bases: keystoneclient.tests.v3.utils.UnauthenticatedTestCase

setUp()
test_get_version_local(*args, **kw)

test_domains Module

class keystoneclient.tests.v3.test_domains.DomainTests(*args, **kwargs)

Bases: keystoneclient.tests.v3.utils.TestCase, keystoneclient.tests.v3.utils.CrudTests

new_ref(**kwargs)
setUp()
test_list_filter_disabled()
test_list_filter_enabled()
test_list_filter_name()

test_endpoint_filter Module

class keystoneclient.tests.v3.test_endpoint_filter.EndpointFilterTests(*args, **kwargs)

Bases: keystoneclient.tests.v3.utils.TestCase

Test project-endpoint associations (a.k.a. EndpointFilter Extension).

Endpoint filter provides associations between service endpoints and projects. These assciations are then used to create ad-hoc catalogs for each project-scoped token request.

new_endpoint_ref(**kwargs)
new_project_ref(**kwargs)
new_ref(**kwargs)
setUp()
test_add_endpoint_to_project_via_id(*args, **kw)
test_add_endpoint_to_project_via_obj(*args, **kw)
test_check_endpoint_in_project(*args, **kw)
test_delete_endpoint_from_project(*args, **kw)
test_list_endpoints_for_project(*args, **kw)
test_list_projects_for_endpoint(*args, **kw)

test_endpoints Module

class keystoneclient.tests.v3.test_endpoints.EndpointTests(*args, **kwargs)

Bases: keystoneclient.tests.v3.utils.TestCase, keystoneclient.tests.v3.utils.CrudTests

new_ref(**kwargs)
setUp()
test_create_admin_interface()
test_create_internal_interface()
test_create_invalid_interface()
test_create_public_interface()
test_list_admin_interface()
test_list_internal_interface()
test_list_invalid_interface()
test_list_public_interface()
test_update_admin_interface()
test_update_internal_interface()
test_update_invalid_interface()
test_update_public_interface()

test_federation Module

class keystoneclient.tests.v3.test_federation.IdentityProviderTests(*args, **kwargs)

Bases: keystoneclient.tests.v3.utils.TestCase, keystoneclient.tests.v3.utils.CrudTests

new_ref(**kwargs)
setUp()
test_create(*args, **kw)
test_positional_parameters_expect_fail()

Ensure CrudManager raises TypeError exceptions.

After passing wrong number of positional arguments an exception should be raised.

Operations to be tested:
  • create()
  • get()
  • list()
  • delete()
  • update()
class keystoneclient.tests.v3.test_federation.MappingTests(*args, **kwargs)

Bases: keystoneclient.tests.v3.utils.TestCase, keystoneclient.tests.v3.utils.CrudTests

new_ref(**kwargs)
setUp()
test_create(*args, **kw)

test_groups Module

class keystoneclient.tests.v3.test_groups.GroupTests(*args, **kwargs)

Bases: keystoneclient.tests.v3.utils.TestCase, keystoneclient.tests.v3.utils.CrudTests

new_ref(**kwargs)
setUp()
test_list_groups_for_domain(*args, **kw)
test_list_groups_for_user(*args, **kw)

test_policies Module

class keystoneclient.tests.v3.test_policies.PolicyTests(*args, **kwargs)

Bases: keystoneclient.tests.v3.utils.TestCase, keystoneclient.tests.v3.utils.CrudTests

new_ref(**kwargs)
setUp()

test_projects Module

class keystoneclient.tests.v3.test_projects.ProjectTests(*args, **kwargs)

Bases: keystoneclient.tests.v3.utils.TestCase, keystoneclient.tests.v3.utils.CrudTests

new_ref(**kwargs)
setUp()
test_list_projects_for_domain(*args, **kw)
test_list_projects_for_user(*args, **kw)

test_roles Module

class keystoneclient.tests.v3.test_roles.RoleTests(*args, **kwargs)

Bases: keystoneclient.tests.v3.utils.TestCase, keystoneclient.tests.v3.utils.CrudTests

new_ref(**kwargs)
setUp()
test_domain_group_role_check(*args, **kw)
test_domain_group_role_grant(*args, **kw)
test_domain_group_role_list(*args, **kw)
test_domain_group_role_revoke(*args, **kw)
test_domain_project_role_check_fails()
test_domain_project_role_grant_fails(*args, **kw)
test_domain_project_role_list_fails()
test_domain_project_role_revoke_fails()
test_domain_role_check(*args, **kw)
test_domain_role_grant(*args, **kw)
test_domain_role_list(*args, **kw)
test_domain_role_revoke(*args, **kw)
test_project_group_role_check(*args, **kw)
test_project_group_role_grant(*args, **kw)
test_project_group_role_list(*args, **kw)
test_project_group_role_revoke(*args, **kw)
test_project_role_check(*args, **kw)
test_project_role_grant(*args, **kw)
test_project_role_list(*args, **kw)
test_project_role_revoke(*args, **kw)
test_user_group_role_check_fails()
test_user_group_role_grant_fails()
test_user_group_role_list_fails()
test_user_group_role_revoke_fails()

test_service_catalog Module

class keystoneclient.tests.v3.test_service_catalog.ServiceCatalogTest(*args, **kwargs)

Bases: keystoneclient.tests.v3.utils.TestCase

setUp()
test_building_a_service_catalog()
test_servcie_catalog_get_url_region_names()
test_service_catalog_empty()
test_service_catalog_endpoints()
test_service_catalog_get_endpoints_region_names()
test_service_catalog_param_overrides_body_region()
test_service_catalog_regions()
test_service_catalog_service_name()
test_service_catalog_url_for_region_names()
test_service_catalog_without_name()

test_services Module

class keystoneclient.tests.v3.test_services.ServiceTests(*args, **kwargs)

Bases: keystoneclient.tests.v3.utils.TestCase, keystoneclient.tests.v3.utils.CrudTests

new_ref(**kwargs)
setUp()

test_trusts Module

class keystoneclient.tests.v3.test_trusts.TrustTests(*args, **kwargs)

Bases: keystoneclient.tests.v3.utils.TestCase, keystoneclient.tests.v3.utils.CrudTests

new_ref(**kwargs)
setUp()
test_create()
test_create_expires()
test_create_imp()
test_create_roles()
test_create_roles_imp()
test_list_filter_trustee()
test_list_filter_trustor()
test_update()

test_users Module

class keystoneclient.tests.v3.test_users.UserTests(*args, **kwargs)

Bases: keystoneclient.tests.v3.utils.TestCase, keystoneclient.tests.v3.utils.CrudTests

new_ref(**kwargs)
setUp()
test_add_user_to_group(*args, **kw)
test_check_user_in_group(*args, **kw)
test_create_with_project(*args, **kw)
test_create_with_project_and_default_project(*args, **kw)
test_list_users_in_group(*args, **kw)
test_remove_user_from_group(*args, **kw)
test_update_password(*args, **kw)
test_update_password_with_bad_inputs()
test_update_with_project(*args, **kw)
test_update_with_project_and_default_project(*args, **kw)

utils Module

class keystoneclient.tests.v3.utils.CrudTests

Bases: object

assertEntityRequestBodyIs(entity)
collection_key = None
encode(entity)
key = None
manager = None
model = None
new_ref(**kwargs)
path_prefix = None
stub_entity(method, parts=None, entity=None, id=None, **kwargs)
test_create(*args, **kw)
test_delete(*args, **kw)
test_find(*args, **kw)
test_get(*args, **kw)
test_list(*args, **kw)
test_list_params(*args, **kw)
test_update(*args, **kw)
class keystoneclient.tests.v3.utils.TestCase(*args, **kwargs)

Bases: keystoneclient.tests.v3.utils.UnauthenticatedTestCase

TEST_ADMIN_IDENTITY_ENDPOINT = 'http://127.0.0.1:35357/v3'
TEST_SERVICE_CATALOG = [{'endpoints': [{'url': 'http://cdn.admin-nets.local:8774/v1.0/', 'interface': 'public', 'region': 'RegionOne'}, {'url': 'http://127.0.0.1:8774/v1.0', 'interface': 'internal', 'region': 'RegionOne'}, {'url': 'http://cdn.admin-nets.local:8774/v1.0', 'interface': 'admin', 'region': 'RegionOne'}], 'type': 'nova_compat'}, {'endpoints': [{'url': 'http://nova/novapi/public', 'interface': 'public', 'region': 'RegionOne'}, {'url': 'http://nova/novapi/internal', 'interface': 'internal', 'region': 'RegionOne'}, {'url': 'http://nova/novapi/admin', 'interface': 'admin', 'region': 'RegionOne'}], 'type': 'compute'}, {'endpoints': [{'url': 'http://glance/glanceapi/public', 'interface': 'public', 'region': 'RegionOne'}, {'url': 'http://glance/glanceapi/internal', 'interface': 'internal', 'region': 'RegionOne'}, {'url': 'http://glance/glanceapi/admin', 'interface': 'admin', 'region': 'RegionOne'}], 'type': 'image', 'name': 'glance'}, {'endpoints': [{'url': 'http://127.0.0.1:5000/v3', 'interface': 'public', 'region': 'RegionOne'}, {'url': 'http://127.0.0.1:5000/v3', 'interface': 'internal', 'region': 'RegionOne'}, {'url': 'http://127.0.0.1:35357/v3', 'interface': 'admin', 'region': 'RegionOne'}], 'type': 'identity'}, {'endpoints': [{'url': 'http://swift/swiftapi/public', 'interface': 'public', 'region': 'RegionOne'}, {'url': 'http://swift/swiftapi/internal', 'interface': 'internal', 'region': 'RegionOne'}, {'url': 'http://swift/swiftapi/admin', 'interface': 'admin', 'region': 'RegionOne'}], 'type': 'object-store'}]
setUp()
stub_auth(subject_token=None, **kwargs)
class keystoneclient.tests.v3.utils.UnauthenticatedTestCase(*args, **kwargs)

Bases: keystoneclient.tests.utils.TestCase

Class used as base for unauthenticated calls.

TEST_ADMIN_URL = 'http://127.0.0.1:35357/v3'
TEST_ROOT_ADMIN_URL = 'http://127.0.0.1:35357/'
TEST_ROOT_URL = 'http://127.0.0.1:5000/'
TEST_URL = 'http://127.0.0.1:5000/v3'
keystoneclient.tests.v3.utils.parameterize(ref)

Rewrites attributes to match the kwarg naming convention in client.

>>> parameterize({'project_id': 0})
{'project': 0}