Module Import alias ImportFrom alias Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Str Import alias identifier ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ClassDef bases AttributeLoad NameLoad attr body Expr Str FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign NameStore Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr Str Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad keyword Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Str keyword Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Str keyword Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Str keyword Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr keyword Str keyword NameLoad keyword Str keyword Str Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign AttributeStore AttributeLoad NameLoad attr attr Str Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr Dict Str Dict Str Dict Str Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr keyword Dict Str Str Str Dict Str Str keyword Str keyword Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr Dict Str Dict Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr keyword Dict Str Str Str Str keyword Str keyword Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr Dict Str Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign AttributeStore AttributeLoad NameLoad attr attr Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr keyword Str keyword Str keyword Str keyword Str keyword Str Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str ClassDef bases NameLoad body Assign NameStore Str decorator_list Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str ListLoad Str Assign NameStore Call AttributeLoad NameLoad attr keyword ListLoad Str Str Assign AttributeStore Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Assign AttributeStore AttributeLoad AttributeLoad NameLoad attr attr attr Str Assign AttributeStore AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr attr Call NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore ListLoad Call AttributeLoad NameLoad attr keyword Str keyword Str keyword Str keyword Str keyword Str Call AttributeLoad NameLoad attr keyword Str keyword Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr ListLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr attr keyword Str keyword Str keyword Str keyword NameLoad keyword ListLoad Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr FunctionDef arguments args defaults body Expr AttributeLoad NameLoad attr decorator_list Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr FunctionDef arguments args defaults body Expr AttributeLoad NameLoad attr decorator_list Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign AttributeStore AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr Str Assign AttributeStore AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr keyword Str keyword Str keyword Str keyword Str keyword Str Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign AttributeStore AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr keyword Str Expr Call AttributeLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr attr Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr keyword Str decorator_list decorator_list Call AttributeLoad NameLoad attr Str
N/A N/A mock oslo_config cfg N/A N/A N/A N/A cfg CONF import_group keystone_authtoken keystonemiddleware.auth_token N/A keystoneclient.exceptions kc_exception solum.common exception solum.common solum_keystoneclient solum.tests base solum.tests utils KeystoneClientTest N/A N/A base BaseTestCase N/A N/A Test cases for solum.common.solum_keystoneclient. setUp N/A N/A self N/A N/A N/A N/A N/A N/A super KeystoneClientTest self setUp N/A dummy_url http://server.test:5000/v2.0 N/A N/A self ctx N/A N/A utils dummy_context N/A N/A N/A self ctx auth_url dummy_url N/A N/A N/A self ctx auth_token abcd1234 N/A N/A N/A self ctx auth_token_info None N/A N/A N/A N/A cfg CONF set_override auth_uri dummy_url group keystone_authtoken N/A N/A N/A N/A cfg CONF set_override admin_user solum group keystone_authtoken N/A N/A N/A N/A cfg CONF set_override admin_password verybadpass group keystone_authtoken N/A N/A N/A N/A cfg CONF set_override admin_tenant_name service group keystone_authtoken N/A test_init_v3_token N/A N/A self mock_ks N/A N/A N/A Test creating the client, token auth. N/A N/A N/A self ctx tenant None N/A N/A N/A self ctx trust_id None N/A solum_ks_client N/A N/A solum_keystoneclient KeystoneClientV3 N/A self ctx N/A N/A solum_ks_client client N/A N/A N/A self assertIsNotNone N/A solum_ks_client _client N/A N/A N/A mock_ks assert_called_once_with token abcd1234 project_id None auth_url http://server.test:5000/v3 endpoint http://server.test:5000/v3 N/A N/A N/A N/A N/A mock_ks return_value authenticate assert_called_once_with N/A test_init_v3_bad_nocreds N/A N/A self mock_ks N/A N/A N/A Test creating the client, no credentials. N/A N/A N/A self ctx auth_token None N/A N/A N/A self ctx trust_id None N/A N/A N/A self ctx username None N/A solum_ks_client N/A N/A solum_keystoneclient KeystoneClientV3 N/A self ctx N/A N/A N/A self assertRaises N/A exception AuthorizationFailure N/A solum_ks_client _v3_client_init N/A test_init_trust_token_access N/A N/A self mock_ks N/A N/A N/A Test creating the client, token auth. N/A N/A N/A self ctx tenant abcd1234 N/A N/A N/A self ctx trust_id None N/A N/A N/A self ctx auth_token_info N/A access N/A token N/A id placeholder N/A solum_ks_client N/A N/A solum_keystoneclient KeystoneClientV3 N/A self ctx N/A N/A solum_ks_client client N/A N/A N/A self assertIsNotNone N/A solum_ks_client _client N/A N/A N/A mock_ks assert_called_once_with auth_ref N/A version token v2.0 N/A id abcd1234 endpoint http://server.test:5000/v3 auth_url http://server.test:5000/v3 N/A test_init_trust_token_token N/A N/A self mock_ks N/A N/A N/A N/A N/A self ctx tenant None N/A N/A N/A self ctx trust_id None N/A N/A N/A self ctx auth_token_info N/A token N/A N/A solum_ks_client N/A N/A solum_keystoneclient KeystoneClientV3 N/A self ctx N/A N/A solum_ks_client client N/A N/A N/A self assertIsNotNone N/A solum_ks_client _client N/A N/A N/A mock_ks assert_called_once_with auth_ref N/A auth_token version abcd1234 v3 endpoint http://server.test:5000/v3 auth_url http://server.test:5000/v3 N/A test_init_trust_token_none N/A N/A self mock_ks N/A N/A N/A N/A N/A self ctx tenant None N/A N/A N/A self ctx trust_id None N/A N/A N/A self ctx auth_token_info N/A not_this urg N/A solum_ks_client N/A N/A solum_keystoneclient KeystoneClientV3 N/A self ctx N/A N/A N/A self assertRaises N/A exception AuthorizationFailure N/A solum_ks_client _v3_client_init N/A test_create_trust_context_trust_id N/A N/A self mock_ks N/A N/A N/A Test create_trust_context with existing trust_id. N/A N/A N/A self ctx trust_id atrust123 N/A solum_ks_client N/A N/A solum_keystoneclient KeystoneClientV3 N/A self ctx N/A trust_context N/A N/A solum_ks_client create_trust_context N/A N/A N/A self assertEqual N/A N/A N/A self ctx to_dict N/A N/A trust_context to_dict N/A N/A N/A mock_ks assert_called_once_with username solum auth_url http://server.test:5000/v3 password verybadpass endpoint http://server.test:5000/v3 trust_id atrust123 N/A N/A N/A N/A N/A mock_ks return_value authenticate assert_called_once_with N/A test_create_trust_context_trust_create N/A N/A self mock_ks N/A N/A N/A Test create_trust_context when creating a trust. FakeTrust N/A object N/A N/A id atrust123 N/A N/A N/A N/A N/A cfg CONF set_override trusts_delegated_roles N/A solum_assembly_update N/A getter_mock N/A N/A mock PropertyMock side_effect N/A 1234 5678 N/A N/A N/A type N/A N/A mock_ks return_value auth_ref user_id getter_mock N/A N/A N/A N/A mock_ks return_value auth_ref project_id 42 N/A N/A N/A N/A N/A mock_ks return_value trusts create return_value N/A FakeTrust N/A N/A N/A self ctx trust_id None N/A solum_ks_client N/A N/A solum_keystoneclient KeystoneClientV3 N/A self ctx N/A trust_context N/A N/A solum_ks_client create_trust_context N/A expected N/A N/A N/A mock call username solum project_name service password verybadpass auth_url http://server.test:5000/v3 endpoint http://server.test:5000/v3 N/A N/A mock call token abcd1234 project_id fake_project_id auth_url http://server.test:5000/v3 endpoint http://server.test:5000/v3 N/A N/A N/A self assertEqual expected N/A mock_ks call_args_list N/A N/A N/A self assertEqual N/A N/A N/A mock call N/A N/A mock call N/A N/A N/A mock_ks return_value authenticate call_args_list N/A N/A N/A self assertEqual atrust123 N/A trust_context trust_id N/A N/A N/A N/A N/A N/A mock_ks return_value trusts create assert_called_once_with trustor_user 5678 trustee_user 1234 project 42 impersonation True role_names N/A solum_assembly_update N/A test_init_admin_client_denied N/A N/A self mock_ks N/A N/A N/A Test the admin_client property, auth failure path. N/A N/A N/A self ctx username None N/A N/A N/A self ctx password None N/A N/A N/A self ctx trust_id None N/A N/A N/A N/A mock_ks return_value authenticate return_value False N/A solum_ks_client N/A N/A solum_keystoneclient KeystoneClientV3 N/A self ctx get_admin_client N/A N/A N/A N/A N/A N/A solum_ks_client admin_client N/A N/A N/A N/A self assertRaises N/A exception AuthorizationFailure get_admin_client N/A test_init_lp_admin_client_denied N/A N/A self mock_ks N/A N/A N/A Test the get_lp_admin_client property, auth failure path. N/A N/A N/A self ctx username None N/A N/A N/A self ctx password None N/A N/A N/A self ctx trust_id None N/A N/A N/A N/A mock_ks return_value authenticate return_value False N/A solum_ks_client N/A N/A solum_keystoneclient KeystoneClientV3 N/A self ctx get_lp_admin_client N/A N/A N/A N/A N/A N/A solum_ks_client lp_admin_client N/A N/A N/A N/A self assertRaises N/A exception AuthorizationFailure get_lp_admin_client N/A test_init_with_no_context N/A N/A self mock_ks N/A N/A N/A Init with no context. N/A N/A N/A N/A mock_ks return_value authenticate return_value False N/A solum_ks_client N/A N/A solum_keystoneclient KeystoneClientV3 None N/A N/A N/A self assertEqual N/A solum_ks_client endpoint http://server.test:5000/v3 N/A test_trust_init_fail N/A N/A self mock_ks N/A N/A N/A Test consuming a trust when initializing, error scoping. N/A N/A N/A self ctx username None N/A N/A N/A self ctx auth_token None N/A N/A N/A self ctx trust_id atrust123 N/A N/A N/A N/A mock_ks return_value auth_ref trust_scoped False N/A N/A N/A self assertRaises N/A exception AuthorizationFailure N/A solum_keystoneclient KeystoneClientV3 N/A self ctx N/A test_trust_init_token N/A N/A self mock_ks N/A N/A N/A Test trust_id takes precedence when token specified. N/A N/A N/A self ctx username None N/A N/A N/A self ctx trust_id atrust123 N/A solum_ks_client N/A N/A solum_keystoneclient KeystoneClientV3 N/A self ctx N/A N/A N/A self assertIsNotNone N/A solum_ks_client _client N/A N/A N/A mock_ks assert_called_once_with username solum auth_url http://server.test:5000/v3 password verybadpass endpoint http://server.test:5000/v3 trust_id atrust123 N/A N/A N/A N/A N/A mock_ks return_value authenticate assert_called_once_with N/A test_delete_trust N/A N/A self mock_ks N/A N/A N/A Test delete_trust when deleting trust. N/A N/A N/A N/A N/A mock_ks return_value trusts delete return_value None N/A solum_ks_client N/A N/A solum_keystoneclient KeystoneClientV3 N/A self ctx N/A N/A N/A self assertIsNone N/A N/A solum_ks_client delete_trust trust_id atrust123 N/A N/A N/A N/A N/A N/A mock_ks return_value trusts delete assert_called_once_with atrust123 N/A test_delete_trust_not_found N/A N/A self mock_ks N/A N/A N/A Test delete_trust when trust already deleted. N/A mock_delete N/A N/A N/A mock_ks return_value trusts delete N/A N/A mock_delete side_effect N/A N/A kc_exception NotFound N/A solum_ks_client N/A N/A solum_keystoneclient KeystoneClientV3 N/A self ctx N/A N/A N/A self assertIsNone N/A N/A solum_ks_client delete_trust trust_id atrust123 N/A N/A N/A N/A mock patch keystoneclient.v3.client.Client