Clint Byrum [Wed, 1 May 2013 22:51:03 +0000 (15:51 -0700)]
Wait for any nova server status that makes sense
Nova may return some transient states based on operator actions that do
not mean a resource has failed. Rather than report these as unexpected,
wait on them just like BUILD.
Zane Bitter [Tue, 7 May 2013 13:10:10 +0000 (15:10 +0200)]
Add a wrappertask decorator
It is common that we might want to create a task that is a light wrapper
around another task. This allows us to, for example, call some clean-up
function after a PollingTaskGroup has completed. We really want to make
sure that any exceptions caused by timeout or cancellation get passed on to
the subtask as well.
Python 3 sports the "yield from" keyword (PEP 380) that effectively allows
the sort of nesting of generators that we want to do here. This change
provides a decorator function that allows the decorated generator function
to do the same thing using the "yield" keyword, even in Python 2.
Add alternative authentication middleware to authenticate against Keystone using
username and password instead of validating existing auth token. The benefit
being that you no longer require admin/service token to authenticate users.
To use, update heat-api.conf:
[paste_deploy]
flavor = standalone
This should make it possible to try heat out against existing public
clouds.
Steven Hardy [Fri, 3 May 2013 10:43:54 +0000 (11:43 +0100)]
heat tests : convert most tests to inline templates
Convert to inline minimal templates, to remove dependency on
in-tree templates which we plan to remove. Note there are still
some more tests remaining which need similar changes (shardy todo)
Zane Bitter [Fri, 3 May 2013 13:57:57 +0000 (15:57 +0200)]
Fix error reporting in @stack_delete_after unit tests
If a unit test decorated with @stack_delete_after (to ensure that a stack
being tested is cleaned up) fails in such a way that the stack cannot be
cleaned up, the original error was suppressed, making debugging very
difficult. In this case, we should re-raise the original exception.
Zane Bitter [Fri, 3 May 2013 14:07:14 +0000 (16:07 +0200)]
Set Stack id to None when deleted
If a Stack object has been removed from the database, we should reset its
ID to None so that if the object is used further, it will not be assumed
that it is represented in the database.
Thomas Herve [Thu, 2 May 2013 13:13:52 +0000 (15:13 +0200)]
Support Snapshot policy in volumes
This handles the Snapshot DeletionPolicy in the AWS::EC2::Volume
resource, creating a backup of the volume before deleting it. It
requires a recent cinder client with backup support.
Steve Baker [Fri, 19 Apr 2013 15:55:43 +0000 (11:55 -0400)]
Sometimes use quantum for SecurityGroup
This implements the following properties in AWS::EC2::SecurityGroup
- VpcId
- SecurityGroupEgress
If VpcId is specified, completely separate code paths
are used which make quantum calls instead of nova calls.
This implements blueprint quantum-security-group
This is based off https://review.openstack.org/#/c/22280/
with a few enhancements:
- Quantum firewall rules translated to acceptable format for ICMP
- remote_ip_prefix used for security group rule creation
Change-Id: I8f1953cb559da0e97821ae0072dfb01dc8267c0c Signed-off-by: Jeff Peeler <jpeeler@redhat.com>
Steven Hardy [Mon, 8 Apr 2013 13:53:04 +0000 (14:53 +0100)]
heat api : Update ec2token middleware for v4 signatures
Update ec2token so it can verify v4 signature formats.
Note for v4 signatures to work you currently need to install
the latest python-keystoneclient, as no release yet contains
patch ref https://review.openstack.org/#/c/26013/
This change should be backwards compatible, as older keystoneclient
versions will simply ignore the additional request keys
Clint Byrum [Wed, 1 May 2013 07:59:03 +0000 (00:59 -0700)]
Fix "No handlers could be found" warnings
These warnings are caused because nothing is capturing log output in
their test cases. HeatTestCase automatically does this using the
FakeLogger fixture.
Re-work run_tests.sh to call testr instead of nose
Running testr directly or running the tests in tox are the preferred
method at this point, but developers may still have automation around
run_tests.sh.
Remove use of nose attrib plugin and most unittest
Some simple cases that do not use mox still use unittest directly.
Replacing unittest.TestCase with HeatTestCase has the added benefit of
capturing all logging for reporting during failure.
A new base class for tests is used to reduce repetitive steps used in
a majority of tests. This new base class also uses fixtures.FakeLogger
to suppress logging, though it will be shown on any failures to aid in
debugging the failure.
Prints that happen on normal operation of the test suite are all removed
as they are not needed and only clutter the output.
These tests are not unit tests, and take a long time. They are being
moved into tempest, which is where integration/functional tests live in
OpenStack.
With the migration to testrepository, many of the instructions are
obsolete. Also the examples are not needed as we have plenty of fine
examples available in the code itself.
This also disables the functional tests from running. The code is still
left here for posterity. These are intended to be moved into tempest
test cases and thus will be removed entirely at that time.
At the moment, we will just run each co-routine to completion, but in
future we can use this to return control to the caller so that resources
may be created in parallel.
Steven Hardy [Tue, 30 Apr 2013 09:38:04 +0000 (10:38 +0100)]
heat api: fix ec2token authentication
Since the change merged from https://review.openstack.org/#/c/27383/
ec2token auth no longer works, because there is a mismatch between
the config file section name and the section specified in ec2token
This is currently broken since heat-engine always listens to the
'engine' topic and there isn't actually a good use case for this to be
configurable, so let's kill it.