Steven Hardy [Fri, 28 Jun 2013 15:43:41 +0000 (16:43 +0100)]
engine : simplify resource state check
Simplify the test to check the resource is in a COMPLETE state
(other than DELETE_COMPLETE), so we don't have to update this for
every new action state which gets added
The default behavior in _do_action is to declare COMPLETE if the
check_$action_complete is not implemented, so these default
functions returning True are not needed.
Steven Hardy [Thu, 27 Jun 2013 15:20:56 +0000 (16:20 +0100)]
autoscaling : Fix issue when scaling to zero instances
As noted in https://review.openstack.org/#/c/34564, we lack
coverage of the scenario when MinSize is 0 and we scale down
to zero instances then try to do a delete. We do the wrong
thing here, by creating a GroupedInstance object with name '',
and this would also result in an incorrect update to the
LoadBalancer. Fix is to reset the resource_id to None.
Steve Baker [Tue, 21 May 2013 01:21:11 +0000 (13:21 +1200)]
Add dependency between RouterGateway and RouterInterface
When a template has a RouterGateway and a RouterInterface with the
same router_id, there is an implicit dependency on delete where
the gateway must be deleted before the interface.
This is implemented by overiding add_dependencies in RouterGateway
and looking in the stack for RouterInterface resource to depend on.
Steven Hardy [Fri, 10 May 2013 17:29:04 +0000 (18:29 +0100)]
api : Add ReST actions POST method
Initial support for an actions subpath, which will be the access-point
for non-lifecycle operations on stacks, e.g suspend/resume
This adds support for a POST method for /actions subpath, so that requests for
specific actions may be made, using a similar interface to that provided by
nova for the admin actions extension. So a body of {'suspend': None}
will suspend the stack, see http://api.openstack.org/api-ref.html
Steven Hardy [Wed, 26 Jun 2013 11:27:05 +0000 (12:27 +0100)]
engine : stack_resource change state_description to status_reason
The internal API changed this name recently, but this got missed
due to lack of test coverage for this exception. Turns out adding
that test coverage is really hard due to all the coroutine magic,
so we'll have to fix that at some later time.
If nova returns an error looking up images during stack validation, we
return a StackValidationFailed, but we should probably catch
this and return ServerError instead, since this is really an internal
error not a validation failure.
Thomas Spatzier [Mon, 17 Jun 2013 11:50:52 +0000 (13:50 +0200)]
Changes for HOT hello world template processing
This patch contains the base enabling code required for processing a most
simple HOT template ("hot hello world"), so that the template can be
parsed and a stack with a single instance can be deployed.
Steven Hardy [Tue, 25 Jun 2013 08:49:34 +0000 (09:49 +0100)]
OS::Quantum::Subnet resource, add enable_dhcp
Add enable_dhcp to the properties schema, since quantumclient
code indicates this is allowed in the body (not only expected
in the response as currently indicated by the docs)
Steve Baker [Mon, 24 Jun 2013 03:21:43 +0000 (15:21 +1200)]
Store created nova client in OpenStackClients.
All created clients are stored in the instance of OpenStackClients
which is associated with a stack - this prevents clients from
being repeatedly created throughout the request.
Commit f3fc5c5 introduced a regression which stopped storing the
nova client. This change addresses that regression.
Steve Baker [Thu, 20 Jun 2013 22:18:37 +0000 (10:18 +1200)]
Do not refresh timestamp from database on read.
Doing a database refresh on timestamp read is causing errors
such as:
heat.openstack.common.rpc.amqp InvalidRequestError:
Could not refresh instance '<Stack at 0x2c95a90>'
This has only been seen using postgres, possibly because the problem is
being masked on mysql due to the driver's lack of concurrency.
The database refresh seems to be unnecessary, as there appears to be
no logic which depends on timestamps being accurate (nor is there
any timestamp comparison logic at all)
Andrew Plunk [Thu, 20 Jun 2013 15:02:37 +0000 (10:02 -0500)]
Unrestricted username length causing error.
When we tried to create a username in keystone with
a length > 64 characters, an error was being raised.
Only use the first 64 characters of the dynamically
generated name in this case.
Steven Hardy [Wed, 19 Jun 2013 13:27:00 +0000 (14:27 +0100)]
Fix BaseException.message DeprecationWarning
https://review.openstack.org/#/c/32154/ introduces a deprecated
TypeError.message reference, which won't work in python3 and
causes a DeprecationWarning to be output on >= python 2.6
Randall Burt [Thu, 13 Jun 2013 17:58:29 +0000 (12:58 -0500)]
Implement attribute schema for resources
Similar to properties, adds attribute_schema and attributes members to
Resources in order to facilitate document generation and template
provider stubs for resources.
Randall Burt [Thu, 13 Jun 2013 17:41:50 +0000 (12:41 -0500)]
Introduce a schema for attributes
Similar to properties, adds attribute_schema and attributes members to
Resources in order to facilitate document generation and template
provider stubs for resources.
Matt Riedemann [Wed, 19 Jun 2013 19:35:14 +0000 (12:35 -0700)]
Restore babel setup config options
Restore the babel configuration values from setup.cfg before the pbr
change so that you can compile the message catalog using "python
setup.py compile_catalog" again.
Steven Hardy [Tue, 18 Jun 2013 17:07:57 +0000 (18:07 +0100)]
Convert Stack to separate action/status
Next and hopefully final step in decoupling action/status
This adjusts the Stack DB columns, model and class to be consistent with
Event/Resource, and split action/status. This also modifies the both
APIs to join the action/status to avoid changing the API
Monty Taylor [Mon, 17 Jun 2013 21:34:33 +0000 (17:34 -0400)]
Support cloud-specific suffixes to server status.
Some clouds, *cough*HP*cough* append extra data to their
status strings. Such as: BUILD(scheduling) or BUILD(networking).
We don't really want to be on the hook for keeping a list of those,
but if we just grab the bit in front of the parenthetical, we should
be able to tell state sensibly, even when people are being weird.