Instead of passing owner to the store() method of parser.Stack,
it is now maintained as an attribute of the Stack instance,
and store() will use that saved attribute when saving.
This fixes the problem of losing the owner_id on updates to
a stack.
Steve Baker [Mon, 12 Aug 2013 21:25:03 +0000 (09:25 +1200)]
Derive keystone_ec2_uri from auth_uri
ec2token auth_uri must be correctly configured for heat to work.
The /ec2tokens path is not an endpoint in its own right, it is
part of the keystone v2.0 API. The keystone_ec2_uri configuration
parameter was only used for ec2 style credentials validation in
the ec2token middleware. It might have also propagated all the
way into the user_creds table to be stored for each stack were it
not for this chain of failures (removed in this commit):
- X-Auth-EC2_URL header is set in ec2token, but header X-Auth-EC2-Url
is read by RequestContext
- RequestContext stores the ec2 uri in aws_auth_uri, but UserCreds
expects aws_auth_url
Lots of unit tests failed with the new SQLAlchemy(0.8.2)
which makes build failed, this patch will fix all the related
bug like no MutableType and changed module name in SQLAlchemy(0.8.2)
Zane Bitter [Tue, 13 Aug 2013 13:18:17 +0000 (15:18 +0200)]
Stub ResourceWithProps instead of GenericResource
Stubbing methods in a superclass is an all-or-nothing affair: once a stub
in the subclass is unset, the subclass will no longer inherit changes in
the superclass (i.e. if you then stub out the same method in the
superclass, the subclass will be unaffected).
Previously, we always set the stubs in the superclass (for historical
reasons, to avoid making this change). This would lead to tests that want
to differentiate between types (by stubbing in the derived class)
interfering with the operation of other tests. This patch changes to always
setting the stubs in the derived class.
Zane Bitter [Tue, 13 Aug 2013 08:48:15 +0000 (10:48 +0200)]
Remove unneccessary Property constraints from unit tests
It doesn't really make a lot of sense to have constraints on the number of
keys in a Map Property, or on the allowed values in a List Property. In
both cases, we can and should define the Schema for each item. Neither is
used anywhere in the code, since the new Schema/Constraints do not allow
it, and SchemaTest.test_all_resource_schemata() tests that all existing
schemata are valid.
Luis A. Garcia [Mon, 12 Aug 2013 21:45:46 +0000 (21:45 +0000)]
Revert "Add missing _ imports to allow doc generation"
This change reverts commit 0453785f3f7b2a578b433cb0544394aac9bcfb95 and
fixes a bug where the _() was not being recognized when building the
documentation while preserving the delayed translation of error
messages.
Zane Bitter [Mon, 12 Aug 2013 09:12:33 +0000 (11:12 +0200)]
Fail fast if Resource action methods are missing
If a resource is not actually a Resource with create(), delete() &c.
methods then something has gone horribly, horribly wrong. This is not a
priority for handling gracefully at runtime.
This patch is to refactor Heat's usage to allow bringing the
policy code from oslo up to the current version to address
many fixed bugs which affect Heat.
1. Refactor the heat wrapper policy.
2. Add netaddr in requirement.txt.
3. Add necessary unit test to cover the refactor part code.
Ben Nemec [Sun, 11 Aug 2013 23:15:17 +0000 (18:15 -0500)]
Enable multi-cloud standalone mode
Adds a multi_cloud configuration parameter for auth_password that
tells a standalone Heat installation to look for its auth_url in
the request headers instead of the configuration file. Also adds
an allowed_auth_uris configuration option to specify which
auth_urls are allowed as targets.
Ben Nemec [Sat, 10 Aug 2013 01:12:23 +0000 (20:12 -0500)]
Fix problem creating ResourceFailure
The ResourceFailure exception is being instantiated improperly in
a couple of places. This changes fixes the problem and adds tests
to cover the problem cases.
Zane Bitter [Fri, 9 Aug 2013 18:19:50 +0000 (20:19 +0200)]
Define a Schema format for properties
Define a Schema class for properties and their constraints that is easily
serialisable to a JSON schema format that matches the proposed Parameter
input syntax for HOT. Since resource properties have not been exposed to
the user before, this format will make the most sense to a user in the long
term.
A future patch will switch the Property validation code over to using
Schema objects instead of the dictionary-based schemata currently in use.
Thomas Spatzier [Thu, 8 Aug 2013 16:59:11 +0000 (18:59 +0200)]
Initial input for HOT template guide and spec
This patch adds initial input for the HOT template guide and the HOT
specification.
Note that content so far is based on features implemented so far and
not forward-looking in any way. Whenever new features get implemented,
the guide and spec will be extended appropriately.
Luis A. Garcia [Tue, 6 Aug 2013 18:36:02 +0000 (18:36 +0000)]
Ensure all REST API error responses are consistent
Heat exceptions are serialized into JSON/XML responses by the fault app,
which is at the end of the WSGI pipeline. Some REST API errors however
are raised as HTTPExceptions, which are treated by WSGI as responses
ready to be sent back to the user, and they can't reach the fault app.
This patch set disguises HTTPExceptions raised by the wsgi.Resource so
they can reach the app that will serialize them just like all other
errors.
Add a purge_deleted command to heat-manage. The command takes an
'age' argument, and removes all database records that have been soft
deleted for more than 'age' days. Default to 90.
Liang Chen [Wed, 7 Aug 2013 00:08:22 +0000 (08:08 +0800)]
Enable stack soft delete for event persistence
Instead of removing database records when deleting data from stack,
table, mark them as deleted through the deleted_at field. And allow
access to soft deleted records by stack Id.