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.
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.
Since https://review.openstack.org/#/c/31083/ we're using the
Resource.update() method to update the LoadBalancer, which requires
the resource snippet to be statically resolved (as is done in
parser.Stack for stack updates)
Zane Bitter [Tue, 18 Jun 2013 08:41:40 +0000 (10:41 +0200)]
Return None for physical resource name during validation
During template validation, the resources have not been stored in the
database. Therefore any resources that return self.physical_resource_name()
in either FnGetRef() or FnGetAtt() would cause assertions whenever either
of those functions were called during validation. Instead, return None from
physical_resource_name() in this phase, as we do for other data that is not
available yet during validation.
Zane Bitter [Tue, 18 Jun 2013 08:25:52 +0000 (10:25 +0200)]
Standardise resource names in Invalid Attribute errors
These should always refer to the resource name in the template (i.e.
logical resource name), and never the physcial resource name (since these
errors necessarily occur during validation, before any physical resource is
created).
Steve Baker [Tue, 21 May 2013 01:21:22 +0000 (13:21 +1200)]
Add dependency between FloatingIP and RouterGateway
When a template has a FloatingIP and a RouterGateway on the same
external network, there is an implicit dependency on create where
the gateway must be created before the floating ip.
This is implemented by overiding add_dependencies in FloatingIP
and looking in the stack for RouterGateway resource to depend on.
Jeff Peeler [Mon, 17 Jun 2013 16:19:49 +0000 (12:19 -0400)]
Add InstanceId property to EIP resource
This also changes the InstanceId property for an EIPAssociation
to not be required, which was necessary for testing and is inline
with AWS documentation.
Zane Bitter [Mon, 17 Jun 2013 15:42:04 +0000 (17:42 +0200)]
scheduler: Improve task descriptions in debug logs
Tasks that were simply defined as ordinary functions (not methods) were
identified by their repr() in the logs, which is only really desirable as a
last resort and for objects (where the __call__() method is the task). Use
the function name instead.
Angus Salkeld [Mon, 17 Jun 2013 04:39:19 +0000 (14:39 +1000)]
API support for Environments
Support "Environment" section in the create/update body.
We the roll up the parameters and the environment and send
that as json using the rpc "params" argument. So no changes
to the rpc layer are needed. The engine knows how to deal
with both formats in the Environments class.
Zane Bitter [Mon, 17 Jun 2013 10:24:49 +0000 (12:24 +0200)]
Use physical resource names with a short_id
The short_id is a random, but stable, 12-character alphanumeric ID.
This will allow two resources of the same name to exist concurrently. That
is necessary for resources to be replaced during an update without
interruption.
Steven Hardy [Fri, 14 Jun 2013 10:02:09 +0000 (11:02 +0100)]
Convert Resource to separate action/status
Next step in decoupling action/status
This adjusts the Resource DB columns, model and class to be consistent
with Event, and split action/status. This also modifies the both APIs
to join the action/status to avoid changing the API (we can't change
the CFN one anyway and it's desirable to avoid breaking compatibility
with the ReST API, or needing a version bump for this simple change)
Zane Bitter [Fri, 14 Jun 2013 10:31:23 +0000 (12:31 +0200)]
Store stacks in the database when running unit tests
If stacks are not stored in the database before they are create()'d,
anything that refers to a stack (e.g. Resources and Events) cannot be added
to the database either, and we get numerous errors in any output logs.