heat/heat/tests
Steven Hardy 288ae018eb heat_keystoneclient: Fix consuming trusts via v2 API
Contrary to my understanding when I first wrote this code, it is
possible to consume trusts (ie get a trust scoped token) via the
v2 keystone API.  So this patch reworks the heat_keystoneclient
so we:
- Consume trusts via the v2 client (so we can access the ec2tokens
  extension which is v2-only)
- Only create a v3 client when required (when creating or deleting
  a trust), so we minimise the requests to keystone.
- Similarly it's only necessary to create the v2 client when creating
  the client object if we need to consume a trust
- When a trust is found in the context, we always consume it
- Don't modify the request context, as this has undesired side-effects
  if the context is subsequently used to perform actions which require
  obtaining a keystone token, instead create a context containing a
  trust_id and trustor_user_id when the stack is stored.

Note this change depends on this patch to python-keystoneclient:
https://review.openstack.org/#/c/48462/, so consuming trusts won't
work unless a version of keystoneclient including this change is
used.

Change-Id: I61b380bc63d606c128ce029f1960c6812a3324e3
Closes-Bug: #1227901
2013-10-01 23:27:22 +01:00
..
policy heat api : Add policy.json authorization to cloudwatch API 2013-02-07 10:22:14 +00:00
templates Rename Quantum to Neutron 2013-08-06 22:08:27 -07:00
unit Remove the CheckedDict class 2012-11-05 17:56:09 +01:00
v1_1 Replace OpenStack LLC with OpenStack Foundation 2013-09-20 02:43:12 +08:00
__init__.py Enable running tests via testr 2013-04-30 13:51:07 -07:00
common.py Make global TemplateResources usable in the tests 2013-09-07 11:04:35 +12:00
fakes.py Migrate stored credentials to keystone trusts 2013-09-04 00:12:07 +01:00
generic_resource.py unit tests: Add a handle_delete method to GenericResource 2013-08-02 18:57:01 +02:00
test_api_aws.py tests : fix cut/paste test name shadowing 2013-06-03 23:57:33 +01:00
test_api_cfn_v1.py Fix CFN API error responses 2013-08-29 00:12:46 +08:00
test_api_cloudwatch.py assert_ is deprecated, use assertEqual 2013-09-19 17:01:47 +02:00
test_api_ec2token.py api ec2token: allow auth_uri conf to be set via keystone_authtoken 2013-09-25 09:50:56 +01:00
test_api_openstack_v1.py Only send traceback to users when in debug mode 2013-09-06 20:53:58 -07:00
test_attributes.py Clean up the attributes module 2013-07-31 13:04:47 +02:00
test_auth_password.py Replace OpenStack LLC with OpenStack Foundation 2013-09-20 02:43:12 +08:00
test_autoscaling.py Use physical_resource_name as Ref for Instance/AS Group 2013-09-10 12:53:13 +02:00
test_autoscaling_update_policy.py Add UpdatePolicy attribute to Instance/AutoScalingGroup 2013-08-21 16:06:32 -07:00
test_ceilometer_alarm.py Rename counter_name to meter_name in alarm 2013-09-25 20:17:06 +00:00
test_cloudwatch.py Fix a timing sensive cloudwatch testcase 2013-07-26 13:11:29 +10:00
test_common_policy.py Replace OpenStack LLC with OpenStack Foundation 2013-09-20 02:43:12 +08:00
test_components.py assertEquals is deprecated, use assertEqual 2013-09-16 23:00:10 +02:00
test_cw_alarm.py Implement parallel delete 2013-09-04 15:02:02 -05:00
test_dbinstance.py assertEquals is deprecated, use assertEqual 2013-09-16 23:00:10 +02:00
test_dependencies.py Make the API for getting dependency graph edges public 2013-08-22 15:02:08 +02:00
test_eip.py Implement parallel delete 2013-09-04 15:02:02 -05:00
test_engine_api_utils.py Remove unnecessary individual import tests.utils.X 2013-08-09 08:49:42 +08:00
test_engine_service.py heat_keystoneclient: Fix consuming trusts via v2 API 2013-10-01 23:27:22 +01:00
test_environment.py Load deployer/global environment files at startup 2013-08-22 08:25:20 +10:00
test_environment_format.py Add an environment_format.py like the template one 2013-08-22 08:25:20 +10:00
test_event.py Provide config option to cap events per stack 2013-09-26 10:03:51 -07:00
test_exception.py Replace OpenStack LLC with OpenStack Foundation 2013-09-20 02:43:12 +08:00
test_fault_middleware.py Use unicode() when serializing REST API errors 2013-09-19 17:49:50 +00:00
test_heatclient.py heat_keystoneclient: Fix consuming trusts via v2 API 2013-10-01 23:27:22 +01:00
test_hot.py Do not translate HOT param constraints 2013-09-26 15:04:30 +02:00
test_identifier.py Migrate test base class to testtools. 2013-05-25 09:43:40 +02:00
test_instance.py Add security_groups for create_port() 2013-09-11 01:18:52 -07:00
test_instance_group.py Use physical_resource_name as Ref for Instance/AS Group 2013-09-10 12:53:13 +02:00
test_instance_group_update_policy.py Add UpdatePolicy attribute to Instance/AutoScalingGroup 2013-08-21 16:06:32 -07:00
test_instance_network.py Remove unnecessary individual import tests.utils.X 2013-08-09 08:49:42 +08:00
test_iso8601_utils.py Support ISO8601 duration format for UpdatePolicy PauseTime 2013-09-01 13:20:40 -07:00
test_loadbalancer.py Change _testnoexisthost_ references in tests 2013-09-04 00:12:07 +01:00
test_loguserdata.py Revert "Replace part_handler.py with write-files cloudinit mechanism" 2013-08-05 12:13:59 -05:00
test_metadata_refresh.py Implement parallel delete 2013-09-04 15:02:02 -05:00
test_nested_stack.py Conform stack resource error so it gives a 4xx 2013-09-26 23:05:16 -07:00
test_neutron.py Merge "Do not assume fixed_ips is a specified property" 2013-09-30 10:36:07 +00:00
test_neutron_firewall.py Allow resources to be updated in parallel 2013-08-30 20:51:03 +02:00
test_neutron_loadbalancer.py Allow resources to be updated in parallel 2013-08-30 20:51:03 +02:00
test_neutron_vpnservice.py Adding IPsec site connection to Heat resources 2013-09-05 10:57:16 +12:00
test_nokey.py Remove unnecessary individual import tests.utils.X 2013-08-09 08:49:42 +08:00
test_nova_utils.py make get_flavor_id to work if input is flavor id 2013-09-18 12:27:37 -05:00
test_parameters.py Return parsed list value in CommaDelimitedList 2013-09-27 13:56:56 +08:00
test_parser.py heat_keystoneclient: Fix consuming trusts via v2 API 2013-10-01 23:27:22 +01:00
test_plugin_loader.py Migrate test base class to testtools. 2013-05-25 09:43:40 +02:00
test_properties.py Handle HOT param constraints in provider templates 2013-09-26 13:08:37 +00:00
test_provider_template.py Tolerate bad environment until validation 2013-09-20 09:37:05 +01:00
test_resource.py Lazily load resources when loading a Stack 2013-09-30 12:29:12 -05:00
test_rpc_client.py RPC: Add an RPC call to get a resource type schema 2013-08-12 09:51:45 +02:00
test_s3.py Implement parallel delete 2013-09-04 15:02:02 -05:00
test_scheduler.py Use print_function compatible syntax 2013-06-24 15:41:51 +02:00
test_security_group.py Implement parallel delete 2013-09-04 15:02:02 -05:00
test_server.py Merge "Comparing device name values instead of their reference" 2013-09-25 10:44:34 +00:00
test_server_tags.py Use physical_resource_name as Ref for Instance/AS Group 2013-09-10 12:53:13 +02:00
test_short_id.py Migrate test base class to testtools. 2013-05-25 09:43:40 +02:00
test_signal.py Only validate credentials on create based on resources 2013-09-06 11:42:36 +12:00
test_sqlalchemy_api.py Store tenant with trust details in user_creds 2013-09-27 12:07:38 +01:00
test_stack_resource.py StackResource set requires_deferred_auth=True 2013-09-24 13:11:36 +12:00
test_swift.py Implement parallel delete 2013-09-04 15:02:02 -05:00
test_template_format.py assertEquals is deprecated, use assertEqual 2013-09-16 23:00:10 +02:00
test_urlfetch.py Add support for local file urls 2013-08-28 11:00:48 +10:00
test_user.py Implement parallel delete 2013-09-04 15:02:02 -05:00
test_validate.py Lazily load resources when loading a Stack 2013-09-30 12:29:12 -05:00
test_volume.py Remove CinderVolume id attribute 2013-09-25 14:03:16 +02:00
test_vpc.py assertEquals is deprecated, use assertEqual 2013-09-16 23:00:10 +02:00
test_waitcondition.py Implement parallel delete 2013-09-04 15:02:02 -05:00
test_watch.py To support both CW and CM, return alarmurl from policy ref 2013-08-23 10:41:36 +10:00
test_wsgi.py Replace OpenStack LLC with OpenStack Foundation 2013-09-20 02:43:12 +08:00
testing-overview.txt Remove examples and update testing-overview.txt 2013-04-30 13:51:31 -07:00
utils.py heat_keystoneclient: Fix consuming trusts via v2 API 2013-10-01 23:27:22 +01:00