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.
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.
Liang Chen [Tue, 6 Aug 2013 23:50:27 +0000 (07:50 +0800)]
Provide a way to clean up testing database
We will need to clean up stacks(hard delete) sometimes in the tests.
Resoure, ResourceData, and Event need to be cleaned up as well because
of the integrity constraints.
JUN JIE NAN [Thu, 1 Aug 2013 03:14:12 +0000 (11:14 +0800)]
HOT parameter validator part
Introduce new class ParamSchema to decouple parameter and its schema,
do validation in schema, for hot template, implement HotParamSchema as
it subclass.
Randall Burt [Tue, 6 Aug 2013 22:07:26 +0000 (17:07 -0500)]
Refactor useful nova functions for re-use.
Refactor handy nova functions out of Instance and into a helper
module. This allows alternate compute implementations to use
this functionality without having to subclass.
Much of the code of InstanceGroup was able to be deleted in
preference for using the native functionality of StackResource.
InstanceGroup now generates a template and updates the nested
stack when it needs to be created or resized.
Only apply soft-delete on stack table for now. event, user_creds
and raw_template records will remain unchanged after stack
deletion, and those 'deleted' data can be cleaned up by the
purge_delete command provided in follow patch.
Andrew Plunk [Thu, 25 Jul 2013 19:04:06 +0000 (14:04 -0500)]
Change token name from context.
Remove password auth from pyrax to conform with
the changes going through the engine regarding
not using a password. Previous commit was an
incorrect branch with a bug.
Luis A. Garcia [Tue, 23 Jul 2013 23:59:32 +0000 (23:59 +0000)]
Small tweaks to recreation of remote errors
The patch adds heat common exceptions to the list of trusted exceptions
that can be re-spawned across RPC calls (this is the default behavior
for all OS components). The patch adds the corresponding package to the
declaration of the allowed_rpc_exception_modules as well as to the conf
sample.
Luis A. Garcia [Thu, 18 Jul 2013 00:49:49 +0000 (00:49 +0000)]
Enable localizable REST API responses via the Accept-Language header
Add support for doing language resolution for a request, based on the
Accept-Language HTTP header. Using the lazy gettext functionality, from
oslo gettextutils, it is possible to use the resolved language to
translate exception messages to the user requested language and
return that translation from the API.
The patch removes individually imported _() so they don't replace the
one installed service-wide.
Also, it adds the ability to fully re-create a remote error
with the same kwargs with which it was originally created, so that we
can translate it and show it to the user.
Zane Bitter [Fri, 2 Aug 2013 12:48:54 +0000 (14:48 +0200)]
Include the resource and action in ResourceFailure exceptions
An update operation performs 3 different kinds of actions on resources
(update, create and delete), and we may want to handle failures differently
depending on the action.
Zane Bitter [Fri, 2 Aug 2013 16:55:30 +0000 (18:55 +0200)]
Rackspace: Don't raise ResourceFailure exceptions
ResourceFailure is meant to be a wrapper around other exceptions that's
invoked by top-level resource operations; don't use it as an all-purpose
exception.
Luis A. Garcia [Tue, 23 Jul 2013 20:32:51 +0000 (20:32 +0000)]
Sync gettextutils from oslo
The oslo changes necessary for delayed translation were refactored in
oslo. This patch set brings in the refactored changes, implemented
under the same change-id mentioned below.
Steve Baker [Sun, 28 Jul 2013 21:23:54 +0000 (09:23 +1200)]
Rename rackspace server ImageName, Flavor, UserData.
Justifications for each rename are as follows:
- ImageName -> image: the Nova API uses imageRef, however heat does
a lookup from image name to id, so 'image' covers either name or id.
- Flavor -> flavor: the Nova API uses flavorRef, but in the future heat
should be able to do a lookup on the flavor name as well, so calling the
attribute 'flavor' will API future-proof that change.
- UserData -> user_data: maps directly to Nova API
Steve Baker [Mon, 29 Jul 2013 22:56:52 +0000 (10:56 +1200)]
Stop delete polling after status == DELETED.
A rackspace server can be in status DELETED for some minutes
until a 404 is raised. This change speeds the deletion of a stack
by considering the resource deleted as soon as the status changes
to DELETED.
But the first unit tests to check the value passed to Cinder for the AZ,
introduced in 134b11ccd145f982b7173bc9a5d0f1bc3e8eef8c, just forced the
value instead of obtaining it from the Instance.
Add a unit test to check the common case, and fix the resulting error (an
empty string is returned instead of None).
Allow the Ceilometer Alarm to be used with cfn-push-stats
This is for when:
- Ceilometer does not support the desired custom metric
- Easier migration to Ceilometer Alarms (reuse most of old templates)
A watchrule is create within the Ceilometer alarm, but it is marked
as belonging to Ceilometer. This is used in the follow situation:
- So we can figure out that we don't need to run the watch periodic task
- when we receive new sample data we can forward the data to Ceilometer