]> review.fuel-infra Code Review - openstack-build/heat-build.git/log
openstack-build/heat-build.git
12 years agoMerge "Tests EIP resource creation and association."
Jenkins [Tue, 18 Sep 2012 00:41:37 +0000 (00:41 +0000)]
Merge "Tests EIP resource creation and association."

12 years agoheat tests : New wordpress IHA functional test
Steven Hardy [Mon, 17 Sep 2012 22:23:49 +0000 (23:23 +0100)]
heat tests : New wordpress IHA functional test

Add new test_WordPress_Single_Instance_With_IHA test

Fixes #213

Change-Id: Ibacfe4d5eb57c470a3e2a000ec794adfb432c081
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoTests EIP resource creation and association.
Steve Baker [Mon, 17 Sep 2012 02:07:08 +0000 (14:07 +1200)]
Tests EIP resource creation and association.

Change-Id: I3af9556930a447eeba6e3152d004ddae7999d638

12 years agoAllow linux distribution to be passed to multiaz template for test case
Steven Dake [Mon, 17 Sep 2012 19:57:27 +0000 (12:57 -0700)]
Allow linux distribution to be passed to multiaz template for test case

Change-Id: I054c3ad72cea2727dd8f5956166d753fff7363e7
Signed-off-by: Steven Dake <sdake@redhat.com>
12 years agoFix backtrace when using loadbalancer
Steven Dake [Mon, 17 Sep 2012 19:51:21 +0000 (12:51 -0700)]
Fix backtrace when using loadbalancer

Loadbalancer incorrectly tried to reference a string as an integer.

This resulted in the following typeerror which is repaired by
thi patch:

    timeout_check = 'timeout check %ds' % (health_chk['Timeout'])
TypeError: %d format: a number is required, not unicode

Fixes issue #240

Change-Id: I7e2697200d3fa9b0cb009f3a7898d487b70fc23a
Signed-off-by: Steven Dake <sdake@redhat.com>
12 years agoFix spelling errors in loadbalancer which resulted in template not launching
Steven Dake [Mon, 17 Sep 2012 19:09:59 +0000 (12:09 -0700)]
Fix spelling errors in loadbalancer which resulted in template not launching

Fixes issue #239

Change-Id: I20f685598b90a40ed0452af8b7c018a1bf7e0492
Signed-off-by: Steven Dake <sdake@redhat.com>
Signed-off-by: Tomas Sedovic <tsedovic@redhat.com>
12 years agoFix up tags
Ian Main [Mon, 17 Sep 2012 19:12:24 +0000 (12:12 -0700)]
Fix up tags

Fix the remaining tags to include the template.

Change-Id: I307d2a7a2678617f38ad3329b51855d5ca6614c2
Signed-off-by: Ian Main <imain@redhat.com>
12 years agoFix test_WordPress_2_Instances_With_EBS.py
Steven Dake [Mon, 17 Sep 2012 17:41:41 +0000 (10:41 -0700)]
Fix test_WordPress_2_Instances_With_EBS.py

Change-Id: Iee70c20b4dc771da5cc84bcfe7bb1cd1ba5280d1
Signed-off-by: Steven Dake <sdake@redhat.com>
12 years agoMerge "Change templates to launch F17 (not F16) by default"
Jenkins [Mon, 17 Sep 2012 16:41:34 +0000 (16:41 +0000)]
Merge "Change templates to launch F17 (not F16) by default"

12 years agoChange templates to launch F17 (not F16) by default
Zane Bitter [Mon, 17 Sep 2012 15:46:45 +0000 (17:46 +0200)]
Change templates to launch F17 (not F16) by default

Change-Id: If8b97e85f2dca5251145a8eebb184e43e25a34ea
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoheat tests : add HAProxy functional test
Steven Hardy [Mon, 17 Sep 2012 15:57:46 +0000 (16:57 +0100)]
heat tests : add HAProxy functional test

Add new test_HAProxy_Single_Instance.py functional test

Fixes #202

Change-Id: I34818756dc5d8ac1f42302118eaa630348946d38
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat templates : add LinuxDistribution parameter to HAProxy
Steven Hardy [Mon, 17 Sep 2012 15:56:36 +0000 (16:56 +0100)]
heat templates : add LinuxDistribution parameter to HAProxy

Add LinuxDistribution section and mappings to HAProxy template,
to align with other templates and for compatibility with functional
test infrastructure

Change-Id: Ib86ac4f587aebf712df1c9ad09cebc44f853e114
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat tests : functional tests allow non-default stackname
Steven Hardy [Mon, 17 Sep 2012 15:54:23 +0000 (16:54 +0100)]
heat tests : functional tests allow non-default stackname

Allow the default "teststack" to be overridden, so multiple
stacks can be created in one test

Change-Id: I09a4128b98df7af6c6b85552ac2175919a697c50
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoSwitch to Fedora 17 on guests in Getting Started
Zane Bitter [Mon, 17 Sep 2012 14:53:09 +0000 (16:53 +0200)]
Switch to Fedora 17 on guests in Getting Started

Change-Id: I24ff5305876d91828e15f89e363d03bbf6bed923
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoheat : Show user parameter values in heat describe
Steven Hardy [Mon, 17 Sep 2012 09:59:56 +0000 (10:59 +0100)]
heat : Show user parameter values in heat describe

Return an agregate set of stack parameters via heat describe
and underlying engine show_stack call, so we see the template
parameters, and any user-overridden values (ie don't just show
the template defaults, which is not really very useful)

Fixes #238

Change-Id: Ia2cc3271f0dcf8c986e968bc21775d31ecbe6228
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat tests : expose keyname from Stack object
Steven Hardy [Mon, 17 Sep 2012 09:45:53 +0000 (10:45 +0100)]
heat tests : expose keyname from Stack object

Expose keyname via Stack.keyname so it can be acccessed in tests

Change-Id: I7bca1acad150647d525c0a51f4ce75b0ba21050d
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoWork around nova-network launch issue harder
Zane Bitter [Mon, 17 Sep 2012 09:46:11 +0000 (11:46 +0200)]
Work around nova-network launch issue harder

Change-Id: Ia1bf8cb2f0e23755100713c1289baa371bbfb956
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoMerge "Use openstack.common.timeutils.isotime()"
Jenkins [Mon, 17 Sep 2012 07:46:00 +0000 (07:46 +0000)]
Merge "Use openstack.common.timeutils.isotime()"

12 years agoUnit test S3 Bucket resource with associated fixes.
Steve Baker [Mon, 17 Sep 2012 00:03:05 +0000 (12:03 +1200)]
Unit test S3 Bucket resource with associated fixes.

Change-Id: Ib23ed500385c299247bf80062a7a4342f5afe1d2

12 years agoUse openstack.common.timeutils.isotime()
Steven Dake [Mon, 17 Sep 2012 00:00:56 +0000 (17:00 -0700)]
Use openstack.common.timeutils.isotime()

Remove heat_utils.strftime() and replace callers with
openstack.common.timeutils.isotime().  They do similar activites, and
since its carried in common, makes more sense to use that version.

Change-Id: Icd919fb218a5f97be103eda7814a5fb56e1b0a02
Signed-off-by: Steven Dake <sdake@redhat.com>
12 years agoWork around nova-network launch issue
Zane Bitter [Sun, 16 Sep 2012 18:49:05 +0000 (20:49 +0200)]
Work around nova-network launch issue

Launch nova-network *after* nova-cert to work around the SELinux error in
https://bugzilla.redhat.com/show_bug.cgi?id=857747

Change-Id: I2ca4af4b950cca92cdd2785c493d8453648ccbb0
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoChange rpc cleanup to occur before killing engine thread
Jeff Peeler [Sat, 15 Sep 2012 01:52:15 +0000 (21:52 -0400)]
Change rpc cleanup to occur before killing engine thread

This bug only manifested itself after a heat request was made to the
engine. Once a request was made a Qpid connection handler continued
to wait in a select call, presumably for a subsequent request. Closing
the connection immediately after detecting a keyboard interrupt and then
terminating the thread yields a clean shutdown with no traceback.

Closes #176

Change-Id: Ifdb82d33a6c52a004bbd6b08c564264f4140e800
Signed-off-by: Jeff Peeler <jpeeler@redhat.com>
12 years agoAdd new OpenShift test
Jeff Peeler [Fri, 14 Sep 2012 05:44:37 +0000 (01:44 -0400)]
Add new OpenShift test

New utility functions added to add/remove host file entries.

Closes #204

Change-Id: I182b451a25e22a558d1b4073e981cdc826ab836d
Signed-off-by: Jeff Peeler <jpeeler@redhat.com>
12 years agoheat tests : new functional test for CFN API
Steven Hardy [Thu, 13 Sep 2012 17:11:10 +0000 (18:11 +0100)]
heat tests : new functional test for CFN API

Add new test which tests most actions of the CFN API
note UpdateStack, ValidateTemplate and EstimateTemplateCost
are still TODO

Change-Id: I814508871ddd81495f5d41d38e8e724ab4d03765
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat tests : Update test_WordPress_With_RDS
Steven Hardy [Thu, 13 Sep 2012 09:59:17 +0000 (10:59 +0100)]
heat tests : Update test_WordPress_With_RDS

Update test_WordPress_With_RDS.py to use new test infrastructure

Change-Id: Iea78e4d2507f0f59db3528b475e6981ea027a617
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat tests : remove duplicate cleanup Wordpress_Boto
Steven Hardy [Fri, 14 Sep 2012 12:36:45 +0000 (13:36 +0100)]
heat tests : remove duplicate cleanup Wordpress_Boto

Remove the duplicate cleanup call, should only be in tearDown
fixture

Change-Id: I43cbe28694b248550689be08522d9774a38e6f64
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat tests : bugfix utils cleanup function
Steven Hardy [Fri, 14 Sep 2012 10:59:58 +0000 (11:59 +0100)]
heat tests : bugfix utils cleanup function

end state for stacks is DELETE_COMPLETE, but then they
are deleted, hence we need to test for either DELETE_COMPLETE
or a null result to avoid false failures

Change-Id: I7e35c5a734d1005fa38d587353cbca5b911ec77b
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat tests : bugfix utils cleanup
Steven Hardy [Fri, 14 Sep 2012 09:34:35 +0000 (10:34 +0100)]
heat tests : bugfix utils cleanup

Initialize tries variable or we get a referenced before
assignment error

Change-Id: Ic8eb68ced893fb89844e81e895c766e8f8b04bee
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agotests: Wait for delete completion
Zane Bitter [Thu, 13 Sep 2012 19:40:49 +0000 (21:40 +0200)]
tests: Wait for delete completion

Wait for the stack to actually be deleted before ending the test.

Fixes #233

Change-Id: I4f2060ff73615bcb16ac9cba3d7062117cca08dd
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agotests: Clean up after a failed functional test
Zane Bitter [Wed, 12 Sep 2012 14:12:45 +0000 (16:12 +0200)]
tests: Clean up after a failed functional test

Ensure that whenever a stack is created, we delete it after the test by
putting the cleanup() call into the tearDown() method. For this to work,
we must also move the actual creation into the test itself, since an
exception during setUp() will mean that tearDown is not called.

Change-Id: I481e691f07c1af9e931258d7ba4453b2037c62ad
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agotests: Make StackBoto inherit more from Stack
Zane Bitter [Thu, 13 Sep 2012 15:42:34 +0000 (17:42 +0200)]
tests: Make StackBoto inherit more from Stack

Change-Id: Ie2b6f2e6dd7d3f75622422d68449972ee7eceb00
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agotests: Fail promptly on stack creation failure
Zane Bitter [Thu, 13 Sep 2012 18:56:48 +0000 (20:56 +0200)]
tests: Fail promptly on stack creation failure

Fix the functional tests to report failure as soon as stack creation fails,
rather than waiting 80+ minutes to time out.

Change-Id: Ie48a84c7bb3ab274337297cc740b78d58d8ed4a6
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoAdd Wordpress_2_Instances testcase
Steven Dake [Thu, 13 Sep 2012 18:36:31 +0000 (11:36 -0700)]
Add Wordpress_2_Instances testcase

Fixes Issue #205

Change-Id: Ic7a08b2ac278a032033bec47bbfe53aeb11b253e
Signed-off-by: Steven Dake <sdake@redhat.com>
12 years agoMerge "Add test_WordPress_2_Instances_With_EBS_EIP.py"
Jenkins [Thu, 13 Sep 2012 17:56:15 +0000 (17:56 +0000)]
Merge "Add test_WordPress_2_Instances_With_EBS_EIP.py"

12 years agoAdd test_WordPress_2_Instances_With_EBS_EIP.py
Steven Dake [Thu, 13 Sep 2012 17:13:58 +0000 (10:13 -0700)]
Add test_WordPress_2_Instances_With_EBS_EIP.py

This work is based upon Tomas Sedovic's work.

A floating ip checker is added to instance() in util.py

Change-Id: I138a5f7bc0c5d04bc5308a80113f3057440578b9
Signed-off-by: Steven Dake <sdake@redhat.com>
Signed-off-by: Tomas Sedovic <tsedovic@redhat.com>
12 years agoheat tests : functional test utils add response_xml_item
Steven Hardy [Wed, 12 Sep 2012 11:07:51 +0000 (12:07 +0100)]
heat tests : functional test utils add response_xml_item

Add response_xml_item method to Stack, which allows stack
API XML responses to be more easily parsed base on xpath
prefix and keyname

Change-Id: I96437bd7ff4575e9262d46c4c21f4408041e147d
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoFix timing issue in starting openstack-network
Zane Bitter [Thu, 13 Sep 2012 15:50:29 +0000 (17:50 +0200)]
Fix timing issue in starting openstack-network

Change-Id: I31f3092f95b140015d661ebd86bd1567c607f3d4
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoThere is no spoon take 2
Steven Dake [Thu, 13 Sep 2012 14:17:24 +0000 (07:17 -0700)]
There is no spoon take 2

ugh

Change-Id: I746c721ed779b1c63592fa0e07053d27ef4231a0
Signed-off-by: Steven Dake <sdake@redhat.com>
12 years agoThere is no spoon
Steven Dake [Thu, 13 Sep 2012 13:59:03 +0000 (06:59 -0700)]
There is no spoon

There is no name, only resource_name.

Change-Id: I1455d497c68fb650d3aef0f1232872f441005c0d
Signed-off-by: Steven Dake <sdake@redhat.com>
12 years agoMerge "heat : Revert "Make sure the properties are defined in all cases.""
Jenkins [Thu, 13 Sep 2012 13:19:07 +0000 (13:19 +0000)]
Merge "heat : Revert "Make sure the properties are defined in all cases.""

12 years agoMerge "heat : bugfix convert User resource to physical_resource_name()"
Jenkins [Thu, 13 Sep 2012 13:18:58 +0000 (13:18 +0000)]
Merge "heat : bugfix convert User resource to physical_resource_name()"

12 years agoMerge "Update openstack-common"
Jenkins [Thu, 13 Sep 2012 11:56:15 +0000 (11:56 +0000)]
Merge "Update openstack-common"

12 years agoheat : Revert "Make sure the properties are defined in all cases."
Steven Hardy [Thu, 13 Sep 2012 11:01:03 +0000 (12:01 +0100)]
heat : Revert "Make sure the properties are defined in all cases."

bugfix : backout #194 fix as it breaks RDS (or maybe all resoures
implemented as nested-stacks)

This reverts commit ae0b853499296763dae77aa5c1e4c22225674489.

reopens #194

Change-Id: I349a1625a040e33e080549a137824d1d2cfca9f8
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat : bugfix convert User resource to physical_resource_name()
Steven Hardy [Thu, 13 Sep 2012 10:27:15 +0000 (11:27 +0100)]
heat : bugfix convert User resource to physical_resource_name()

engine user.py needs the self.name references changed to
self.physical_resource_name() to align with the recent resource
naming changes.

Change-Id: I4620a4afc5e9c11d7b6d9348aaac35bcfa31bbac
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agocreating instances failed as a result of regression in last commit
Steven Dake [Thu, 13 Sep 2012 05:43:30 +0000 (22:43 -0700)]
creating instances failed as a result of regression in last commit

The previous commit to the tree organizes resource names by
stack.resource.  Most of the openstack APIs take resource ids
but the instance create operation requires text identifiers.

Rewrite the text identifiers for the nova security groups before
starting an instance.

Change-Id: I8a842868781ecb353f66b5a4e3d022766a4c8a0e
Signed-off-by: Steven Dake <sdake@redhat.com>
12 years agoUpdate openstack-common
Angus Salkeld [Thu, 13 Sep 2012 03:50:24 +0000 (13:50 +1000)]
Update openstack-common

Change-Id: I002574a60b4f59543bc6aa73256c2f0b3b79d378
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
12 years agoMake physical resource names unique based upon stack name
Steven Dake [Wed, 12 Sep 2012 22:12:50 +0000 (15:12 -0700)]
Make physical resource names unique based upon stack name

Some templates use the same resource name when registering with
nova.  Nova will not allow mulitple resource names to register
with the same name in all cases, and in those it does, it often
becomes confused (in the case of EIP).  This patch creates a
dot notation

For the LB test, an example of the resources would be:
teststack.LoadBalancer.LB_instance
teststack.DatabaseServer.MySqlDatabaseServer
teststack.WikiServerOne

Fixes Issue #160
Fixes Issue #136

Thanks to asalkeld@redhat.com for helping sort out the unit
test cases.

Change-Id: I14f4551feb41c7f98caa30dd98f997da6d00c467
Signed-off-by: Steven Dake <sdake@redhat.com>
12 years agoMerge "Add 2 instance with EBS test."
Jenkins [Wed, 12 Sep 2012 22:41:25 +0000 (22:41 +0000)]
Merge "Add 2 instance with EBS test."

12 years agoChange Stack to support user defined parameter
Jeff Peeler [Wed, 12 Sep 2012 20:25:25 +0000 (16:25 -0400)]
Change Stack to support user defined parameter

This change allows tests to specify DBUsername/DBPassword if necessary.
The keyname is still looked up in nova and the distribution is retrieved
from the already existing Stack parameter.

Change-Id: I3732ffb685d68c8a72a83247f74ed11a50a74cd1
Signed-off-by: Jeff Peeler <jpeeler@redhat.com>
12 years agoMerge "Make S3 import except on ImportError rather then all exceptions"
Jenkins [Wed, 12 Sep 2012 20:47:20 +0000 (20:47 +0000)]
Merge "Make S3 import except on ImportError rather then all exceptions"

12 years agoAdd 2 instance with EBS test.
Ian Main [Wed, 12 Sep 2012 19:12:31 +0000 (12:12 -0700)]
Add 2 instance with EBS test.

Seems to work even.

Change-Id: Ie09d97dc86a68525783f1f9c080fed13e651ef78
Signed-off-by: Ian Main <imain@redhat.com>
12 years agoChange VerifyClass to have a generic verify_url method
Jeff Peeler [Wed, 12 Sep 2012 15:36:43 +0000 (11:36 -0400)]
Change VerifyClass to have a generic verify_url method

Change-Id: I0e1298e7852e336d6271c4014b11935ac3ce6689
Signed-off-by: Jeff Peeler <jpeeler@redhat.com>
12 years agoUpdate WordPress_Compsed_Instances to new test infrastructure
Steven Dake [Wed, 12 Sep 2012 16:34:21 +0000 (09:34 -0700)]
Update WordPress_Compsed_Instances to new test infrastructure

Change-Id: I08a175d28b99b861ce29b2278e415896e79cf72a
Signed-off-by: Steven Dake <sdake@redhat.com>
12 years agoMake S3 import except on ImportError rather then all exceptions
Steven Dake [Wed, 12 Sep 2012 15:11:30 +0000 (08:11 -0700)]
Make S3 import except on ImportError rather then all exceptions

Change-Id: Icb98aed65ccba825f8402fdde95ac38b2a12c1a6
Signed-off-by: Steven Dake <sdake@redhat.com>
12 years agoMake S3 optional since swiftclient is not available in all distributions
Steven Dake [Tue, 11 Sep 2012 20:49:09 +0000 (13:49 -0700)]
Make S3 optional since swiftclient is not available in all distributions

Change-Id: Ic5f61ac41090fd599f01b3eaae4ffb03aac2ebdd
Signed-off-by: Steven Dake <sdake@redhat.com>
12 years agoheat : test utils, extract ec2 credentials from keystone
Steven Hardy [Tue, 11 Sep 2012 18:23:27 +0000 (19:23 +0100)]
heat : test utils, extract ec2 credentials from keystone

For StackBoto extract the ec2 credentials from keystone and
pass them into the client, so the functional tests don't rely
on ec2 credentials from config-files and only need the currently
provided keystone credentials

Change-Id: Ifc959011cc5b9ee77ebf04e380dc6a4059903c6d
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat : allow boto_client to accept credentials
Steven Hardy [Tue, 11 Sep 2012 18:07:00 +0000 (19:07 +0100)]
heat : allow boto_client to accept credentials

Allow ec2 credentials to optionally be passed in to boto
rather than purely relying on config-files

Change-Id: Ib821f2bca9bc3f61af521955a9ed52f0059e70e4
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat : move boto.cfg to correct location
Steven Hardy [Tue, 11 Sep 2012 18:05:36 +0000 (19:05 +0100)]
heat : move boto.cfg to correct location

boto.cfg needs to be under /etc not /etc/heat
or boto won't find it

Change-Id: I0981bb3bd46dd1630633576fc77d085410bf6362
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat : comment credentials in template boto.cfg
Steven Hardy [Tue, 11 Sep 2012 18:03:41 +0000 (19:03 +0100)]
heat : comment credentials in template boto.cfg

Comment out the credentials section in /etc/boto.cfg
this allows us to pass the correct host/endpoint without
having world-readable credentials.  This can then be used
as a template for per-user ~/.boto files if desired

Change-Id: I4cea0cb3b790186ddc041edad0ab4ee4b7e8f956
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat tests : add new Boto wordpress functional test
Steven Hardy [Tue, 11 Sep 2012 12:08:22 +0000 (13:08 +0100)]
heat tests : add new Boto wordpress functional test

Add new test_WordPress_Single_Instance_Boto.py, which
does a wordpress single instance test using StackBoto

Note, this will require a valid /etc/boto.cfg to work,
and probably a recent (git) version of boto

Fixes #220

Change-Id: Ia95de35dc9d1d52ba6b9f4fae333e4fad02762ca
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat tests : functional test utils add StackBoto class
Steven Hardy [Tue, 11 Sep 2012 12:06:09 +0000 (13:06 +0100)]
heat tests : functional test utils add StackBoto class

Add StackBoto, subclass of Stack, which implements stack
setup using the boto client wrapper, allows us to test
AWS auth and boto client libraries

Ref #220

Change-Id: Id5cb5ab72c7ba2e7accd76a73a94ff8fe45c62fa
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoImplement the AWS::S3::Bucket resource type.
Steve Baker [Tue, 11 Sep 2012 02:58:34 +0000 (14:58 +1200)]
Implement the AWS::S3::Bucket resource type.

An attempt was made to make created bucket names readable and unique.
Names are of the format heat-<resource name>-<random hex>. eg:
heat-S3Bucket-b420d12d02e5d6e46f13

Only the swift v2 auth is currently supported, which means swift will need to
use keystone for auth. This may be a valid assumption for any environment that
is running Heat.

When DeletionPolicy is Delete then an attempt is made to delete the container,
but the stack will still be deleted if container delete fails.

Run the template S3_Single_Instance.template to give it a try.

Functional tests will be coming in a later change.

Change-Id: Ifa2c3c4fcbdb00a44f8c6b347a61f8e1735e8328

12 years agoUpdate documentation on configuring metadata server
Zane Bitter [Mon, 10 Sep 2012 20:13:07 +0000 (22:13 +0200)]
Update documentation on configuring metadata server

The docs need to reflect the fact that the metadata server cannot be
configured and launched until after Nova has created the virtual bridge
interface.

See issue #196

Change-Id: Ia1a004106fa2b535b54c7b88e8ed177e47e72844
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoHandle verification errors in create/update in cfn API
Zane Bitter [Mon, 10 Sep 2012 16:04:34 +0000 (18:04 +0200)]
Handle verification errors in create/update in cfn API

If a StackCreate or StackUpdate call fails verification in the engine, we
get an error message returned rather than a stack identifier.

Fixes #224

Change-Id: I5f47f5d0e25e8bc05633d29605adcc8827edd379
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoheat tools : nova_create_flavors.sh additional retry logic
Steven Hardy [Mon, 10 Sep 2012 09:52:13 +0000 (10:52 +0100)]
heat tools : nova_create_flavors.sh additional retry logic

Add retry logic in order to make creating flavors more
robust.  Nova rate-limiting frequently causes actions to fail
so wrap all requests in retry/sleep logic and check we can
connect to nova before attempting to change anything

Ref #225

Change-Id: I1b1014df04602935f561c08ba29287061224b5f3
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat tools : add ephemeral disk for all flavors
Steven Hardy [Mon, 10 Sep 2012 10:03:37 +0000 (11:03 +0100)]
heat tools : add ephemeral disk for all flavors

Add ephemeral disk for all flavors in nova_create_flavors.sh
as it's currently not possible for EBS to work without a fixed
mapping to a specific block device name, meaning the EBS templates
will break for micro/tiny if there if no ephemeral disk defined

Change-Id: I801f00aba5b431d30362cd4b34da2f66457220c5
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat tools : check services running after openstack install
Steven Hardy [Mon, 10 Sep 2012 09:49:45 +0000 (10:49 +0100)]
heat tools : check services running after openstack install

Check all expected services are running after starting them when
doing tools/openstack install, should avoid possible racy behavior
when we assume everything is up and immediately call nova_create_flavors.sh

Ref #225

Change-Id: I87ec0ca31579173cb9218fa79e027fd5b15031f0
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoRework functional test case infrasatructure
Steven Dake [Fri, 7 Sep 2012 20:22:42 +0000 (13:22 -0700)]
Rework functional test case infrasatructure

To support multi-instance, two new classes were made:
Stack - represents a stack
Instance - represents an instance

For multi-instance stacks, create multiple Instance objects
for each instance in the stack.

For each instance in a stack, an instance object can be created which
helps validate the individual instance sets up properly.

test_WordPress_Single_Instance_With_EBS.py fails - see issue #226

Change-Id: Iddec87cd1332a9b5796c5c7e7d382ef723c3544e
Signed-off-by: Steven Dake <sdake@redhat.com>
Signed-off-by: Tomas Sedovic <tsedovic@redhat.com>
Signed-off-by: Ian Main <imain@redhat.com>
12 years agoAdd a string representation for identifiers
Zane Bitter [Fri, 7 Sep 2012 12:55:54 +0000 (14:55 +0200)]
Add a string representation for identifiers

This makes debugging in unit tests a lot easier.

Change-Id: I320cdf754e405377abfeb61496b017809d25d719
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoAdd unit tests for EngineManager create/update/delete_stack
Zane Bitter [Fri, 7 Sep 2012 12:57:13 +0000 (14:57 +0200)]
Add unit tests for EngineManager create/update/delete_stack

Change-Id: I25aeb43ea3f5a9426b8f742a605b9699dc2b9851
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoFix update_stack call in EngineManager
Zane Bitter [Fri, 7 Sep 2012 12:54:55 +0000 (14:54 +0200)]
Fix update_stack call in EngineManager

This was broken by 38f886947c91ebf610ab2972649a06bec630746b

Change-Id: I134bee2df35d6b025f0ac88334ab30a9a22c7922
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoReorganise etc directory for easier installation
Zane Bitter [Fri, 7 Sep 2012 13:09:54 +0000 (15:09 +0200)]
Reorganise etc directory for easier installation

This also means that the install script will install bash-completion for
heat.

Change-Id: Ib60346c72ce6277951cb51952e359f97be20a1be
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoMerge "Switch to keystone service_type=orchestration."
Jenkins [Fri, 7 Sep 2012 03:58:50 +0000 (03:58 +0000)]
Merge "Switch to keystone service_type=orchestration."

12 years agoDelete unused heat-engine-paste.ini
Angus Salkeld [Fri, 7 Sep 2012 03:12:27 +0000 (13:12 +1000)]
Delete unused heat-engine-paste.ini

Change-Id: I4c8d5b2d98634aa4d711d3fe8816891476645548
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
12 years agoMake sure the properties are defined in all cases.
Angus Salkeld [Fri, 7 Sep 2012 00:12:29 +0000 (10:12 +1000)]
Make sure the properties are defined in all cases.

fixes #194

Change-Id: I994283734d551f81143e7f5de50da0180a277119
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
12 years agoAdd test case for WordPress_With_LB.template
Steven Dake [Thu, 6 Sep 2012 22:04:03 +0000 (15:04 -0700)]
Add test case for WordPress_With_LB.template

Change-Id: I324da126b5a775a00b97d868cbd347dd65cb16aa
Signed-off-by: Steven Dake <sdake@redhat.com>
12 years agoMerge "Rename heat-api to heat-api-cfn"
Jenkins [Thu, 6 Sep 2012 21:50:36 +0000 (21:50 +0000)]
Merge "Rename heat-api to heat-api-cfn"

12 years agoAdd a Wordpress+MySQL composed instance functional test case
Steven Dake [Thu, 6 Sep 2012 20:27:50 +0000 (13:27 -0700)]
Add a Wordpress+MySQL composed instance functional test case

Change-Id: I6a905b186be59c929e530519414e46d222b4ea08
Signed-off-by: Steven Dake <sdake@redhat.com>
12 years agoMerge "Add EBS test."
Jenkins [Thu, 6 Sep 2012 18:24:39 +0000 (18:24 +0000)]
Merge "Add EBS test."

12 years agoAdd EBS test.
Ian Main [Thu, 6 Sep 2012 18:10:48 +0000 (11:10 -0700)]
Add EBS test.

Single wordpress EBS functional test.

Change-Id: I3a3e53b418a38a2bb8573d7abb16c9c7fe8837ca
Signed-off-by: Ian Main <imain@redhat.com>
12 years agoheat tests : new wordpress EBS_EIP functional test
Steven Hardy [Thu, 6 Sep 2012 16:51:10 +0000 (17:51 +0100)]
heat tests : new wordpress EBS_EIP functional test

Add new functional test for the
WordPress_Single_Instance_With_EBS_EIP template

Fixes #209

Change-Id: I800cbe21ef42611f93644e6a0c60b732af663025
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoForgot commas, doh!
Ian Main [Thu, 6 Sep 2012 16:40:42 +0000 (09:40 -0700)]
Forgot commas, doh!

I had this in and tested but forgot to put commas in after update.

Change-Id: I7fbcacea0a4ab40f1e6b6e016fd5940ba8432c26
Signed-off-by: Ian Main <imain@redhat.com>
12 years agoMore EBS fixes.
Ian Main [Thu, 6 Sep 2012 15:27:45 +0000 (08:27 -0700)]
More EBS fixes.

Single instance with EBS apparently needs an httpd restart in order to
keep talking to mysql after we change the partition.  Also change other
EBS templates to use vdc.

Change-Id: I180cca2166a0210d5d8dd3e0aea111ea625b865a
Signed-off-by: Ian Main <imain@redhat.com>
12 years agoRename heat-api to heat-api-cfn
Zane Bitter [Thu, 30 Aug 2012 11:32:47 +0000 (13:32 +0200)]
Rename heat-api to heat-api-cfn

The previous heat-api is, in fact, a CloudFormation-compatible API. Rename
it to heat-api-cfn, analogous to how the EC2 API in Nova is named
nova-api-ec2.

Change-Id: I9759f10cee6a60cdc9cb917966eb9fb95a618f85
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoheat templates : EBS templates, attach volume to vdc
Steven Hardy [Thu, 6 Sep 2012 13:32:14 +0000 (14:32 +0100)]
heat templates : EBS templates, attach volume to vdc

Fix Single_Instance_With_EBS templates, need the EBS
disk to attach to vdc not vdb which is used for the
ephemeral disk (fix from imain)

Fixes #185

Change-Id: I47d1b640d25c0f53dd4535e4bd73846d01f4fc86
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat tests : bugfix FuncUtils check StackId not StackName
Steven Hardy [Thu, 6 Sep 2012 10:41:15 +0000 (11:41 +0100)]
heat tests : bugfix FuncUtils check StackId not StackName

CreateStack response no longer contains StackName, so
we need to parse the StackId and extract the name from
the new ARN format

Change-Id: If55ff286c98e8396a14fa4ee2b08622faa680a03
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat templates : Add default LinuxDistribution parameter
Steven Hardy [Thu, 6 Sep 2012 10:01:10 +0000 (11:01 +0100)]
heat templates : Add default LinuxDistribution parameter

Add default value to LinuxDistribution template parameter
for MySQL_Single_Instance.template

Change-Id: I6431b717dee700f9db588ddbaf58511d0a3b107c
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoFix identify_stack call
Zane Bitter [Thu, 6 Sep 2012 10:37:24 +0000 (12:37 +0200)]
Fix identify_stack call

It needs to return a dictionary in order for the result to be converted to
JSON.

Change-Id: Ieef360fd6872624325470fab626d371ed28535e6
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoMerge "Add a newline to user data injection."
Jenkins [Thu, 6 Sep 2012 04:13:49 +0000 (04:13 +0000)]
Merge "Add a newline to user data injection."

12 years agoModify to use systemctl and move func_utils outside of setUp
Jeff Peeler [Thu, 6 Sep 2012 02:47:18 +0000 (22:47 -0400)]
Modify to use systemctl and move func_utils outside of setUp

Change-Id: I420991fa4e881f6f9fadd0add02a9d1493240dfc
Signed-off-by: Jeff Peeler <jpeeler@redhat.com>
12 years agoAdd a newline to user data injection.
Ian Main [Thu, 6 Sep 2012 02:00:54 +0000 (19:00 -0700)]
Add a newline to user data injection.

If no newline is present at the end of the user-data section of the
template, the addition of the touch command will cause the last
line to break.

Change-Id: I15ba402f83f6fba03f7d0455a63a5dc03480973d
Signed-off-by: Ian Main <imain@redhat.com>
12 years agoFix pep8 warning
Angus Salkeld [Thu, 30 Aug 2012 01:41:25 +0000 (11:41 +1000)]
Fix pep8 warning

Change-Id: Ia0b4336e7e861fefc7afebc99a3c6ddf48841d71
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
12 years agoSupport lookup of stacks by name or ARN
Zane Bitter [Wed, 5 Sep 2012 19:51:25 +0000 (21:51 +0200)]
Support lookup of stacks by name or ARN

Previously stacks could only be referenced by name. Now, use the canonical
stack identifier to act on them. The identifier can be obtained from the
RPC API by looking it up with identify_stack. In the AWS API, the user
can pass an ARN that is converted into an identifier.

Change-Id: I29309d12e522ed301c3f6269df5d1d14382b024b
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoAdd an identify_stack RPC call
Zane Bitter [Wed, 5 Sep 2012 19:51:25 +0000 (21:51 +0200)]
Add an identify_stack RPC call

This call converts a stack name into a fully-qualified stack identifier.

This allows us to, e.g., add support for keeping deleted stacks around in
the database while still allowing stack names to be reused, since the
deleted stacks can be referenced using this ID.

Change-Id: Ide19841a92a25d2f6172f19c2627d24ab6d2fd63
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoReport StackId in ARN format
Zane Bitter [Wed, 5 Sep 2012 19:51:25 +0000 (21:51 +0200)]
Report StackId in ARN format

In the RPC API, return a full stack identifier instead of just the database
ID of a stack. In the AWS API, convert this to an ARN for the user.

Change-Id: I5c3ede4885c4ac5801cfef49e05695f3d13622da
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoCreate a unique identifier for stacks
Zane Bitter [Wed, 5 Sep 2012 19:51:25 +0000 (21:51 +0200)]
Create a unique identifier for stacks

Change-Id: I1517502a2a5d9a96803565297315e7b276f2e974
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoUse assertEqual() instead of assert_()
Zane Bitter [Wed, 5 Sep 2012 19:51:25 +0000 (21:51 +0200)]
Use assertEqual() instead of assert_()

assertEqual(x, y) reports helpful error messages, unlike assert_(x == y)
which reports only that False is not True.

Change-Id: Idbea59dc4dbbe4ac00bad6f358896fbc9401acab
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoheat tests : add functional test for Wordpress RDS
Steven Hardy [Wed, 5 Sep 2012 15:26:27 +0000 (16:26 +0100)]
heat tests : add functional test for Wordpress RDS

Add functional test for WordPress_With_RDS template

Fixes: #215
Change-Id: I0613c40e218acaab987a2b0e0df7737cb6f6b6b3
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat tests : convert functional test to class
Steven Hardy [Wed, 5 Sep 2012 14:13:59 +0000 (15:13 +0100)]
heat tests : convert functional test to class

Covert test_WordPress_Single_Instance_With_EIP to be nose
unittest.TestCase subclass, so run_tests.sh outputs a more
informative test identifier

Change-Id: I21968b4ae9e0e8f7bc1ef9d3f6db0433f106826a
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat tests : update WordPress_Single_Instance_With_EIP
Steven Hardy [Wed, 5 Sep 2012 13:39:44 +0000 (14:39 +0100)]
heat tests : update WordPress_Single_Instance_With_EIP

Update functional test WordPress_Single_Instance_With_EIP
to use the new verify_wordpress which checks that the wordpress
homepage specified in the stack output looks OK

Change-Id: I6b839e95f2c9fc8d89a22c062c393d6f14fb5df9
Signed-off-by: Steven Hardy <shardy@redhat.com>