]> review.fuel-infra Code Review - openstack-build/heat-build.git/log
openstack-build/heat-build.git
12 years agoheat engine : Implement Count property for WaitCondition
Steven Hardy [Mon, 14 Jan 2013 16:59:03 +0000 (16:59 +0000)]
heat engine : Implement Count property for WaitCondition

The Count property of WaitCondition is currently ignored, so
regardless of the number specified the WaitCondition resource will
always go to CREATE_COMPLETE on the first WaitConditionHandle signal.
This patch fixes this so the Count property is handled correctly.

fixes bug 1097813

Change-Id: I71348c553702c0282a8826488c953ac3c2c76e38
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat engine : Add metadata validation to WaitConditionHandle
Steven Hardy [Fri, 11 Jan 2013 13:43:52 +0000 (13:43 +0000)]
heat engine : Add metadata validation to WaitConditionHandle

Validate metadata before updating the WaitConditionHandle resource
metadata, if we raise a ValueError in response to incorrectly
formatted metadata then the CFN API will map this to a
HeatInvalidParameterValueError, resulting in a descriptive error
response to the malformed request

Change-Id: I6fde27066e9e0eaee97b59a7fbbace09ca620b48
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat engine : implement metadata_update per-resource
Steven Hardy [Fri, 11 Jan 2013 11:08:34 +0000 (11:08 +0000)]
heat engine : implement metadata_update per-resource

Abstract updates to resource metadata so they are implemented per-resource,
with a generic implementation which is a no-op, since currently the only
resource which needs metadata update via the RPC API is WaitConditionHandle.
This allows resource-specific metadata validation and update logic to be more
easily added.

ref bug 1097813

Change-Id: I094e74b6cd8cb2436f05beed9629fc3c3a34e622
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoAdd auth middleware for custom cloud backend
Tomas Sedovic [Wed, 2 Jan 2013 16:34:23 +0000 (17:34 +0100)]
Add auth middleware for custom cloud backend

Custom backends will want to provide their own authentication mechanisms
instead of using the Keystone token or EC2-like systems we have in
place.

This adds a new middleware and paste pipeline for the custom backend
that will skip the normal authentication and queries the backend's
`authenticated(context)` method instead.

Since the backend is connected to the Engine whereas the auth middleware
is run in the API service (which may sit on a separate box and have no
access to the engine config or the custom backend itself), we add a new
RPC call that lets API verify the passed credentials.

Change-Id: I2fc4a19564b1e410adb79bd9266f6b6da07dd6c9
Signed-off-by: Tomas Sedovic <tomas@sedovic.cz>
12 years agoAdd configurable cloud backend
Tomas Sedovic [Thu, 13 Dec 2012 17:22:07 +0000 (18:22 +0100)]
Add configurable cloud backend

This allows us to use a different IaaS backend (other than OpenStack).
OpenStack is still used by default.

Change-Id: I1772d57ae583a281204edfb80fbfde220b004a9d
Signed-off-by: Tomas Sedovic <tomas@sedovic.cz>
12 years agoTrivial commit to make daily rpm builds work again.
Steve Baker [Sun, 13 Jan 2013 20:33:20 +0000 (09:33 +1300)]
Trivial commit to make daily rpm builds work again.

A trivial commit is needed so that the
grizzly-2 tag is not on git HEAD.

Change-Id: Id671f1e2f39d93e6e9caff644fd9764d9de4f38e

12 years agoMerge "heat engine : LoadBalancer resource delete nested stack"
Jenkins [Tue, 8 Jan 2013 20:02:27 +0000 (20:02 +0000)]
Merge "heat engine : LoadBalancer resource delete nested stack"

12 years agoheat engine : DBInstance don't pass credentials to cfn-init
Steven Hardy [Tue, 8 Jan 2013 19:21:56 +0000 (19:21 +0000)]
heat engine : DBInstance don't pass credentials to cfn-init

Don't create user/accesskey and pass them to cfn-init as resource
metadata for internal nested stacks is not available via the cfn API
so passing them causes an error in the engine logs (and creates some
unnecessary keystone credentials)

fixes bug 1097362

Change-Id: If2fe484d834e3e5730b21a18c363a5bf5a4c45f6
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat engine : LoadBalancer resource delete nested stack
Steven Hardy [Tue, 8 Jan 2013 18:47:05 +0000 (18:47 +0000)]
heat engine : LoadBalancer resource delete nested stack

Ensure LoadBalancer resource deletes the underlying nested
stack when the owning stack is deleted - needs to inherit
from stack.NestedStack as this implements handle_delete()

fixes bug 1097394

Change-Id: I2002bed361511a495cbdf38cad7b61e148a68ba2
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoMerge "heat engine : allow NestedStack template validation to work"
Jenkins [Tue, 8 Jan 2013 18:49:58 +0000 (18:49 +0000)]
Merge "heat engine : allow NestedStack template validation to work"

12 years agoMerge "heat engine : ensure create thread exits on stack delete"
Jenkins [Tue, 8 Jan 2013 18:48:02 +0000 (18:48 +0000)]
Merge "heat engine : ensure create thread exits on stack delete"

12 years agoheat engine : DBInstance fix so nested stack is deleted
Steven Hardy [Tue, 8 Jan 2013 18:10:22 +0000 (18:10 +0000)]
heat engine : DBInstance fix so nested stack is deleted

Currently the RDS DBInstance resource inherits from stack.Stack but it
should be stack.NestedStack, which implements handle_delete whereas
stack.Stack does not, meaning the DBInstance nested stack is never
deleted when the owning stack gets deleted.

fixes bug 1097299

Change-Id: I865611d4de9ea4c3caa43c7a11a28924602a5b0d
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat engine : allow NestedStack template validation to work
Steven Hardy [Tue, 8 Jan 2013 15:47:55 +0000 (15:47 +0000)]
heat engine : allow NestedStack template validation to work

Nested stack templates (e.g WordPress_Composed_Instances.template)
will currently fail validation because FnGetAtt attempts to get
outputs for a stack which doesn't yet exist.  So add a fallback which
returns a string "None" for Outputs.* which will allow template
validation to succeed, and will still return the actual output when
the nested stack has actually been created.

fixes bug 1097290

Change-Id: Ic3f48cfc2f047c104946d6dde533143d0d91a32c
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat engine : ensure create thread exits on stack delete
Steven Hardy [Tue, 8 Jan 2013 14:37:23 +0000 (14:37 +0000)]
heat engine : ensure create thread exits on stack delete

Detect GreenletExit exception when creating resources - this may
happen if the stack gets deleted while the stack is still in
CREATE_IN_PROGRESS state.  If we don't detect this then the stack
continues trying to create resources during/after the stack has been
deleted, with predictably nasty results..

fixes bug 1096150

Change-Id: Ieb6ed38d0000cd6fe3bc1af2eb5d2e5eecc74fb4
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoHandle different cloud-init versions gracefully
Jeff Peeler [Mon, 7 Jan 2013 17:36:20 +0000 (12:36 -0500)]
Handle different cloud-init versions gracefully

Change loguserdata script to python to allow easy detection of which
version of cloud-init installed. Some logging was added to
part-handler.

Took out injecting the command to touch provision-finished in the user
data. This is now handled in loguserdata.py.

Note that up until cloud-init version 0.6.0, the user data is not
passed to part-handler. This behavior is why it's not possible to log
the provisioning process with older versions. (Technically could rely
on the redirection support added post 0.6.0, but having a separate
file just for provisioning seems beneficial.)

fixes bug 1072921

Change-Id: I9005a21bfb74f27208f9195a6e10e1d2b474e91f
Signed-off-by: Jeff Peeler <jpeeler@redhat.com>
12 years agoMerge "heat engine : map DBInstance DBSecurityGroups parameter correctly"
Jenkins [Mon, 7 Jan 2013 16:17:32 +0000 (16:17 +0000)]
Merge "heat engine : map DBInstance DBSecurityGroups parameter correctly"

12 years agoMerge "heat tests : remove unused get_sftp_client()"
Jenkins [Mon, 7 Jan 2013 16:17:26 +0000 (16:17 +0000)]
Merge "heat tests : remove unused get_sftp_client()"

12 years agoMerge "heat tests : remove pointless get_ssh_client"
Jenkins [Mon, 7 Jan 2013 16:16:09 +0000 (16:16 +0000)]
Merge "heat tests : remove pointless get_ssh_client"

12 years agoMerge "heat tests : functional tests align eip output with Folsom"
Jenkins [Mon, 7 Jan 2013 16:16:07 +0000 (16:16 +0000)]
Merge "heat tests : functional tests align eip output with Folsom"

12 years agoAdd missing files to generated tarballs
Thierry Carrez [Mon, 7 Jan 2013 13:42:34 +0000 (14:42 +0100)]
Add missing files to generated tarballs

Fix MANIFEST.in so that all files in the repository are included
in the generated tarballs. Fixes bug 1096068.

Change-Id: I7ec7e2fcf6951357b58469539a5d552b8df66408

12 years agoheat tests : remove unused get_sftp_client()
Steven Hardy [Fri, 4 Jan 2013 15:23:30 +0000 (15:23 +0000)]
heat tests : remove unused get_sftp_client()

get_sftp_client is not needed so remove it

Change-Id: I9fb0670730e808c1f2786866ad3451f8e9f38789
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat tests : remove pointless get_ssh_client
Steven Hardy [Fri, 4 Jan 2013 15:20:43 +0000 (15:20 +0000)]
heat tests : remove pointless get_ssh_client

get_ssh_client() doesn't actually do anything, so just reference the
attribute directly

Change-Id: I6a88b09953a7ca5a0e2675ac1c2c5a99b8cf724a
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat engine : map DBInstance DBSecurityGroups parameter correctly
Steven Hardy [Fri, 4 Jan 2013 17:21:53 +0000 (17:21 +0000)]
heat engine : map DBInstance DBSecurityGroups parameter correctly

The DBInstance nested stack template defines a DBSecurityGroups list parameter,
which should be "CommaDelimitedList" type, curently it's a "List" type which
breaks when the template is parsed.  To make this work we also have to mangle
the property (passed in the top level template) format to match the parameter
format, because in AWS Lists are not represented in the same way for Properties and
Parameters (sigh..)

fixes bug 1096099

Change-Id: Ie078d61847d89ea9dcd55f798b808e595c2d2e12
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat tests : functional tests align eip output with Folsom
Steven Hardy [Fri, 4 Jan 2013 15:18:47 +0000 (15:18 +0000)]
heat tests : functional tests align eip output with Folsom

Folsom novaclient floating_ips.list() returns the instance ID as
instance_id not resource_id

Change-Id: Ie958ada0984f9927cd490f01bd4db3102c53090a
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoTurn off tag_date on branch master
Steve Baker [Thu, 3 Jan 2013 21:48:35 +0000 (10:48 +1300)]
Turn off tag_date on branch master

rpmbuild actually requires no date tag in the version.

Change-Id: I8bffff1924b4bc43324346f799d866fcc0f51a55

12 years agoheat tests : CFN_API functional tests NoEcho Parameters fix
Steven Hardy [Thu, 3 Jan 2013 16:50:13 +0000 (16:50 +0000)]
heat tests : CFN_API functional tests NoEcho Parameters fix

NoEcho is now implemented in the engine for parameters, so we
need to change the expected ParameterValues to '******' to match
the API response for the NoEcho==True parameters

Change-Id: I4f50633dc5358e8779bfbaf03dda2f7fe1b7d452
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat tests : functional tests remove erroneous finally clause
Steven Hardy [Thu, 3 Jan 2013 14:36:53 +0000 (14:36 +0000)]
heat tests : functional tests remove erroneous finally clause

Some tests have had a finally clause added which means they delete the
stack before doing any tests, even when it is created successfully.  Doh!

Change-Id: I7cefd313b9f810067304fe19f58a038226555b86
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoMerge "On master branch, tag tarballs as dev snapshots"
Jenkins [Thu, 3 Jan 2013 07:34:53 +0000 (07:34 +0000)]
Merge "On master branch, tag tarballs as dev snapshots"

12 years agoMerge "Use correct stack_id arg name for metadata_update()"
Jenkins [Thu, 3 Jan 2013 07:34:17 +0000 (07:34 +0000)]
Merge "Use correct stack_id arg name for metadata_update()"

12 years agoheat tests : convert stack ID to uuid format
Steven Hardy [Wed, 2 Jan 2013 18:17:48 +0000 (18:17 +0000)]
heat tests : convert stack ID to uuid format

The functional tests still have the old non-uuid format so the regex needs
changing to match the new uuid4 format

Change-Id: Ic1c1026bc2a11ef108f0d33b14bbead7872836f4
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat tests : functional tests poll_glance cleanup
Steven Hardy [Wed, 2 Jan 2013 17:37:38 +0000 (17:37 +0000)]
heat tests : functional tests poll_glance cleanup

There's no point passing self.glanceclient into poll_glance()
when we can just reference it directly

Change-Id: I8ee873f544f847ca9f203ad9da06244597cdff7a
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat tests : convert functional tests to folsom glanceclient
Steven Hardy [Wed, 2 Jan 2013 17:19:17 +0000 (17:19 +0000)]
heat tests : convert functional tests to folsom glanceclient

Convert functional tests to work with folsom glanceclient, also
remove the conditional essex/folsom module import since this will
no longer work on essex (this was bogus anyway since this code can
never have worked on folsom)

Note : this breaks compatibility with essex for the functional tests, so
any platform running them must be running >= Folsom from now on.

(The essex/folsom glance client interfaces are too different to make it worth
supporting both for the functional tests, ref heat-jeos..)

Change-Id: I4463bfab7f8acf93b2eafa4bb702bf86d8c78652
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoUse correct stack_id arg name for metadata_update()
Steve Baker [Fri, 28 Dec 2012 00:23:51 +0000 (13:23 +1300)]
Use correct stack_id arg name for metadata_update()

Change-Id: I5e4554aa7670d505f45b1512b7135276079b3918

12 years agoOn master branch, tag tarballs as dev snapshots
Steve Baker [Sun, 23 Dec 2012 21:37:48 +0000 (10:37 +1300)]
On master branch, tag tarballs as dev snapshots

Change-Id: Ia0bdad7fdff2a8d0d27b1e703ff20a2a89a102cc

12 years agoRPC API: Simplify describe_stack_resources call
Zane Bitter [Thu, 20 Dec 2012 12:31:14 +0000 (13:31 +0100)]
RPC API: Simplify describe_stack_resources call

Remove the part with the physical_resource_id, which can now be done
through the find_physical_resource call.

Change-Id: Idff625014121aaa6ff3697b36fe38facaf54a499
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoUse the new find_physical_resource RPC call
Zane Bitter [Fri, 21 Dec 2012 12:47:28 +0000 (13:47 +0100)]
Use the new find_physical_resource RPC call

Change-Id: I79890f897912dd75acb6561598bb34862f09a534
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoRPC API: Add a separate find_physical_resource call
Zane Bitter [Fri, 21 Dec 2012 16:25:26 +0000 (17:25 +0100)]
RPC API: Add a separate find_physical_resource call

The logic for this is currently mixed up with describe_stack_resources.

Change-Id: I14dadfc3ae6cde337dfb1bdee011cb7b32e5e4d9
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoCFN API: Fix DescribeStackResources with physical ID
Zane Bitter [Fri, 21 Dec 2012 16:47:10 +0000 (17:47 +0100)]
CFN API: Fix DescribeStackResources with physical ID

DescribeStackResources failed when called with a physical resource ID
instead of a stack name. Also add a unit test to alert us to any future
breakage.

Change-Id: I931cd0f74fa225253b06195609ec233ef86353c3
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoHandle duplicate physical resources IDs
Zane Bitter [Fri, 21 Dec 2012 16:25:25 +0000 (17:25 +0100)]
Handle duplicate physical resources IDs

Because the unit tests create multiple stacks in different tenants with the
same physical resource ID, the database lookup code must change to
accomodate this.

This enables us to add a unit test for the describe_stack_resources RPC
API call for the case where we pass a physical resource ID to lookup.

Change-Id: Id37b15bee595ba10f207235a3ff59526e4423be6
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoRPC API: Clean up list_events results
Zane Bitter [Fri, 21 Dec 2012 16:25:25 +0000 (17:25 +0100)]
RPC API: Clean up list_events results

Just return a list, rather than wrapping it in an object. The client API
processes can (and do) do whatever wrapping they need.

Change-Id: Ia77facbc7577ec96d1fa0e6e2784f4e5cff68614
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoRPC API: Clean up list_stacks results
Zane Bitter [Fri, 21 Dec 2012 16:25:25 +0000 (17:25 +0100)]
RPC API: Clean up list_stacks results

Just return a list, rather than wrapping it in an object. The client API
processes can (and do) do whatever wrapping they need.

Change-Id: I4a8e64e8e4a0f127e8fa5c12738353a1f3a0c22f
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoRPC API: Clean up show_stack results
Zane Bitter [Fri, 21 Dec 2012 16:25:25 +0000 (17:25 +0100)]
RPC API: Clean up show_stack results

Just return a list, rather than wrapping it in an object. The client API
processes can (and do) do whatever wrapping they need.

Change-Id: Ibb9955a9c3fc25b88cf3914f2a3ea7cedaf2aa9b
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoInclude new doc directory
Jeff Peeler [Thu, 20 Dec 2012 22:36:14 +0000 (17:36 -0500)]
Include new doc directory

Change-Id: If5041669717aaa9287bff315b9b6e4f9db7b374f
Signed-off-by: Jeff Peeler <jpeeler@redhat.com>
12 years agorun_tests.sh fixup venv/novenv logic
Steven Hardy [Thu, 20 Dec 2012 15:37:29 +0000 (15:37 +0000)]
run_tests.sh fixup venv/novenv logic

The section which prompts y/n for creating a new venv can never be
reached with any combination of CLI options (since always_venv=0 and
never_venv=0 can never happen simultaneously)

This actually makes the --no-virtual-env option pointless, so we may
as well remove it and explicitly set it as the default (it was anyway
previously but by virtue of the never_venv option being undefined)

Change-Id: I3c803533fda55a6814b7536b5c1328312acd3d57
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agorun_tests.sh cosmetic, make if/then style consistent
Steven Hardy [Thu, 20 Dec 2012 11:28:53 +0000 (11:28 +0000)]
run_tests.sh cosmetic, make if/then style consistent

I introduced an inconsistent style with the pep8 check patch, so fixing this up here

Change-Id: I9a1a612172e493e0d2476c7f6613bbb9b9de2878
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agorun_tests.sh cosmetic cleanup indents
Steven Hardy [Thu, 20 Dec 2012 11:24:12 +0000 (11:24 +0000)]
run_tests.sh cosmetic cleanup indents

fix indents so it's consistent ts=4

Change-Id: I6fb2e7b3670bba00ad45d76d2dbb6b56c25281ff
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoMerge "Avoid logging.getChild for python2.6 compatibility"
Jenkins [Thu, 20 Dec 2012 10:59:49 +0000 (10:59 +0000)]
Merge "Avoid logging.getChild for python2.6 compatibility"

12 years agoupdate tox.ini to pep8 latest (1.3.4)
Steven Hardy [Wed, 19 Dec 2012 17:27:49 +0000 (17:27 +0000)]
update tox.ini to pep8 latest (1.3.4)

Most of the core projects are currently 1.3.3, but since 1.3.4 is
the current latest it seemed best to align with the latest.A
Also add a check to run_tests.sh to ensure peoples local tests align
with the new gate version

fixes bug 1092057

Change-Id: I16dc7e51536781f7a14b7954c24b1aa078b37fa8
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat cleanups to align unit tests with pep8 1.3.4
Steven Hardy [Wed, 19 Dec 2012 17:23:05 +0000 (17:23 +0000)]
heat cleanups to align unit tests with pep8 1.3.4

Lots of (mostly whitespace) cleanups to align all the unit test code
with pep8 v1.3.4

ref bug 1092057

Change-Id: I5c847f20b3516af3dd3d7211b0fc697c59bf914c
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat cleanups to align functional tests with pep8 1.3.4
Steven Hardy [Wed, 19 Dec 2012 13:45:21 +0000 (13:45 +0000)]
heat cleanups to align functional tests with pep8 1.3.4

Lots of (mostly whitespace) cleanups to align all the functional test code
with pep8 v1.3.4

ref bug 1092057

Change-Id: Ifd6ef02bf3abd0b2f351f63423ab8aa7ff0cbd7c
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat cleanups to align with pep8 1.3.4
Steven Hardy [Wed, 19 Dec 2012 13:13:30 +0000 (13:13 +0000)]
heat cleanups to align with pep8 1.3.4

Lots of (mostly whitespace) cleanups to align all the non-test code with
pep8 v1.3.4

ref bug 1092057

Change-Id: I444b288444dba4ec1da5854bd276d091c06d8489
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoFix DescribeStacks command for all stacks
Zane Bitter [Wed, 19 Dec 2012 17:48:26 +0000 (18:48 +0100)]
Fix DescribeStacks command for all stacks

Fixes: bug 1092196
Change-Id: I05065c08b4072a9c179ebfb36fb15f062de3f06e
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoReST API: Improve format of resource_types response
Zane Bitter [Wed, 19 Dec 2012 17:48:25 +0000 (18:48 +0100)]
ReST API: Improve format of resource_types response

Wrap the list in a JSON object for consistency with other APIs, both in
Heat and the rest of OpenStack.

Change-Id: I626f1c2446416c8e869fdc7d4f3772ec6c6d191c
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoReturn an ARN as the Ref for nested stacks
Zane Bitter [Wed, 19 Dec 2012 17:48:25 +0000 (18:48 +0100)]
Return an ARN as the Ref for nested stacks

Change-Id: I32b6b952dcd29ba895fc7b22dd362352068c85bf
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoSplit nested stack implementation into abstract and concrete
Zane Bitter [Wed, 19 Dec 2012 18:31:32 +0000 (19:31 +0100)]
Split nested stack implementation into abstract and concrete

Split the Stack resource class into an abstract part from which other
resource types inherit and a concrete implementation of the
AWS::CloudFormation::Stack resource type.

Change-Id: Ie7600b94e17ec31b55bae5c4d9501d3f0cbca97c
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoAvoid logging.getChild for python2.6 compatibility
Steven Hardy [Wed, 19 Dec 2012 18:01:15 +0000 (18:01 +0000)]
Avoid logging.getChild for python2.6 compatibility

Tweaking common.config setup_logging to avoid using the getChild()
convenience function means we can run on python 2.6, as getChild was
new in python 2.7

Change-Id: I03698ad09eb16d4f1004512d27b049f22b41c22c
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoRPC API: Pass a stack identifier to metadata_update
Zane Bitter [Wed, 19 Dec 2012 17:48:25 +0000 (18:48 +0100)]
RPC API: Pass a stack identifier to metadata_update

This brings it into line with all of the other RPC functions.

bug 1088937

Change-Id: Ia45a12d652e96fb6bb03ce90d0b5a5e2ddeeb510
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoPass correct types in RPC Client unit tests
Zane Bitter [Wed, 19 Dec 2012 17:48:25 +0000 (18:48 +0100)]
Pass correct types in RPC Client unit tests

Pass an actual identity structure for the identity.

Change-Id: I0930520c8329100ba27aa6db0d977dfcd8a097c1
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoUpdate links in composed templates
Zane Bitter [Wed, 19 Dec 2012 17:48:25 +0000 (18:48 +0100)]
Update links in composed templates

These have changed due to the move of the project repository from the
heat-api to openstack organisations on GitHub.

Change-Id: Ib11116d7ca48e108e06d1dea9d9decd17bbf25cd
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoA new documention structure, ready for contributions
Steve Baker [Fri, 14 Dec 2012 01:13:05 +0000 (14:13 +1300)]
A new documention structure, ready for contributions

Here are some skeletons for the documentation which will need to be written.

doc/source
A Sphinx based document which will be aimed at heat developers.
     This also contains .rst files which generate the man files
doc/docbkx/api-ref
Docbook and WADL for the REST API, with the intent of moving this
to api-site to publish to api.openstack.org
doc/docbkx/heat-admin
Docbook manual targeted at Heat admins, with the intent of moving this
        to openstack-manuals to publish to docs.openstack.org
doc/docbkx/heat-cli
Docbook manual targeted at users of the Heat CLI, with the intent of
moving this to openstack-manuals to publish to docs.openstack.org

Dude, wheres my man pages?
docs/man
is deleted, now generated into doc/build/man

Packaging will need to be updated to generate the man pages

Change-Id: Idf2f37086b6f97df18ed57172de2f9e3d4c7706a

12 years agopip-requires PyCrypto should be >= 2.1.0
Steven Hardy [Tue, 18 Dec 2012 18:00:09 +0000 (18:00 +0000)]
pip-requires PyCrypto should be >= 2.1.0

We need PyCrypto>=2.1.0 for Random which is used in
heat.common.crypt

Change-Id: Ib951deaca17f972aa70a2a65f6e3ade5fb509981
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoAdd support for missing Instance attributes PrivateIp and PublicDnsName.
Clint Byrum [Tue, 18 Dec 2012 01:57:30 +0000 (17:57 -0800)]
Add support for missing Instance attributes PrivateIp and PublicDnsName.

Change-Id: I9d85f00a8ca687ad791be4a9fa6708df3ad67a55
Fixes: bug #1091497
12 years agoGettingStarted: Install python-pip package
Zane Bitter [Mon, 17 Dec 2012 18:56:23 +0000 (19:56 +0100)]
GettingStarted: Install python-pip package

pip-python is not installed by default, so we need to install it in order
to be able to use it. (An alternative would be to use easy_install, which
is packaged as part of setuputils and therefore already present, but it
lacks any of pip-python's package management capabilities.)

Change-Id: I6a620d0864b6671348bbcf962c3c2cde06f9ed83
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoFix issues with deleting a WaitCondition
Zane Bitter [Mon, 17 Dec 2012 18:56:22 +0000 (19:56 +0100)]
Fix issues with deleting a WaitCondition

Previously we were ignoring the reference to the WaitConditionHandle stored
in the database by always setting it to None on load. This meant that we
had to try to recreate it on delete, which would fail if e.g. the
WaitConditionHandle had already been deleted.

bug 1089354

Change-Id: Ibc4145348a91b455e97ba27748ff72451b0c7bce
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoFix importing of novaclient exceptions
Zane Bitter [Mon, 17 Dec 2012 16:11:03 +0000 (17:11 +0100)]
Fix importing of novaclient exceptions

Broken by 3c702e38e9a51a15a8d1626b60f610c75cb1f8b7

Also, use novaclient's own mechanism for selecting the correct API version;
don't go fishing in the internals.

Change-Id: I296312f185735026587ba9849343aa79177856a3
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agotools/openstack_ubuntu fix nova-manage network create command
Steven Hardy [Mon, 17 Dec 2012 10:51:37 +0000 (10:51 +0000)]
tools/openstack_ubuntu fix nova-manage network create command

Command for creating nova network is wrong, as tested on 12.04

ref bug 1083507
Signed-off-by: Steven Hardy <shardy@redhat.com>
Change-Id: I41ae9370c42a0e9b7df4d1810e0f90f32bd87bba

12 years agoHandle empty UserData for instance
Zane Bitter [Fri, 14 Dec 2012 21:45:07 +0000 (22:45 +0100)]
Handle empty UserData for instance

UserData is not required, so handle the case where it is not supplied (i.e.
is None).

bug 1090544

Change-Id: If8bfe9ba2aafe3bb2e9de14b01c57d1ddcf9b21d
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoMake resource registration conditional
Zane Bitter [Fri, 14 Dec 2012 10:05:59 +0000 (11:05 +0100)]
Make resource registration conditional

If client libraries are not present for Swift or Quantum, don't register
the corresponding resource types.

Change-Id: I95a42973775b7f4c1d82caa47dc0660dfe54bb21
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoAdd a resource type list to the ReST API
Zane Bitter [Fri, 14 Dec 2012 21:23:44 +0000 (22:23 +0100)]
Add a resource type list to the ReST API

Change-Id: I09f5e9fc97ef095c7ab8def8adf4dcc79c6fcd48
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoAdd an RPC API to list resource types
Zane Bitter [Fri, 14 Dec 2012 21:23:44 +0000 (22:23 +0100)]
Add an RPC API to list resource types

Change-Id: I0218dcebf9213887e9b7883e6bba9b6b54a6e6ad
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoStandardise client imports
Zane Bitter [Fri, 14 Dec 2012 21:23:44 +0000 (22:23 +0100)]
Standardise client imports

Do all client imports once, in the clients module, using the normal
OpenStack idiom for optional imports where appropriate.

Change-Id: I1186eba21159fe20e80c1947779fd164dada5880
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoFix ReST API documentation for template validation
Zane Bitter [Fri, 14 Dec 2012 21:23:44 +0000 (22:23 +0100)]
Fix ReST API documentation for template validation

The user parameters are not used in template validation.

Change-Id: Iba438b2977f8029c0f0f7e6e65e853d23e4d2b0d
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoMerge "Add ubuntu version of tools/openstack"
Jenkins [Fri, 14 Dec 2012 19:12:00 +0000 (19:12 +0000)]
Merge "Add ubuntu version of tools/openstack"

12 years agoinstall.sh non-root error should go to stderr
Steven Hardy [Fri, 14 Dec 2012 09:49:31 +0000 (09:49 +0000)]
install.sh non-root error should go to stderr

The non-root error should go to stderr like the other echo output

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

12 years agoinstall.sh add logic detecting rabbitmq
Steven Hardy [Fri, 14 Dec 2012 09:47:33 +0000 (09:47 +0000)]
install.sh add logic detecting rabbitmq

Detect rabbitmq (On Ubuntu and Fedora), and sed the config files
with appropriate values if it looks like we're installing on a
system with rabbitmq and not the default qpidd

fixes bug 1090420

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

12 years agoMerge "tools/openstack fixup header formatting"
Jenkins [Fri, 14 Dec 2012 17:15:00 +0000 (17:15 +0000)]
Merge "tools/openstack fixup header formatting"

12 years agotools/openstack fixup header formatting
Steven Hardy [Fri, 14 Dec 2012 16:11:02 +0000 (16:11 +0000)]
tools/openstack fixup header formatting

Current header is abbreviated, so paste in the full boilerplate
text like in other files

Change-Id: I8675f80f37ab6ea2ba2323f3f87985224883466a
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoAdd ubuntu version of tools/openstack
Steven Hardy [Fri, 14 Dec 2012 15:33:40 +0000 (15:33 +0000)]
Add ubuntu version of tools/openstack

Initial version of the tools/openstack install script to simplify install/
testing on Ubuntu - tested on 12.04LTS (with the included Essex packages)
12.10 testing TODO

ref bug 1083507

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

12 years agoinstall.sh simplify heat-engine.conf conditional
Steven Hardy [Fri, 14 Dec 2012 09:44:03 +0000 (09:44 +0000)]
install.sh simplify heat-engine.conf conditional

Minor tweak to the conditional detecting heat-engine.conf to sed in the
encryption key - this will allow rabbitmq detection to only be done in
one place

ref bug 1090420

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

12 years agoRemove heat-metadata man page
Jeff Peeler [Thu, 13 Dec 2012 22:25:46 +0000 (17:25 -0500)]
Remove heat-metadata man page

The binary no longer exists.

Change-Id: Ib914f94d091b1388d254c53dc3a7821750266b18
Signed-off-by: Jeff Peeler <jpeeler@redhat.com>
12 years agoMerge "heat_keystoneclient ec2 user fix"
Jenkins [Thu, 13 Dec 2012 18:07:41 +0000 (18:07 +0000)]
Merge "heat_keystoneclient ec2 user fix"

12 years agoGet rid of naked "except:" clauses in tests
Zane Bitter [Thu, 13 Dec 2012 15:11:54 +0000 (16:11 +0100)]
Get rid of naked "except:" clauses in tests

Change-Id: Idec15ef86ff0f9cb57b4a8c522e4f5ed63bad010
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoDon't skip watchrule test on exception
Zane Bitter [Thu, 13 Dec 2012 14:37:25 +0000 (15:37 +0100)]
Don't skip watchrule test on exception

There are no circumstances in which failing to import the
heat.engine.watchrule module would not be an issue.

Change-Id: I6d03ed8f761a24aa69409010390289e387523813
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoGet rid of unused imports
Zane Bitter [Thu, 13 Dec 2012 14:02:29 +0000 (15:02 +0100)]
Get rid of unused imports

This cruft just tends to build up over time...

Change-Id: I61fd067b431aaa57164c7ff781c9cc8bab04bd4b
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoGet rid of nose.main() in unit test files
Zane Bitter [Thu, 13 Dec 2012 14:57:59 +0000 (15:57 +0100)]
Get rid of nose.main() in unit test files

This doesn't actually work and is not universally present, so get rid of
it. Tests are run through "nosetests", which does actually work.

Change-Id: Ib2d1e857e0aef4eab5fd75ffb1a498d8e9186c01
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoheat_keystoneclient ec2 user fix
Steven Hardy [Wed, 12 Dec 2012 17:06:55 +0000 (17:06 +0000)]
heat_keystoneclient ec2 user fix

Fix bug where we incorrectly use the request context user_id,
instead of the user_id associated with the resource calling
get_ec2_keypair()

fixes bug 1089035

Change-Id: Ibb5e6d11461fb3ff1dd743066a9f7de3ee65b445
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoMerge "heat cfn api, format waitcondition error responses correctly"
Jenkins [Thu, 13 Dec 2012 12:59:34 +0000 (12:59 +0000)]
Merge "heat cfn api, format waitcondition error responses correctly"

12 years agoMove the cfn client code to a subpackage
Zane Bitter [Thu, 13 Dec 2012 10:20:33 +0000 (11:20 +0100)]
Move the cfn client code to a subpackage

This will make packaging easier.

Change-Id: I8e0f0a3d85bdf073a3b3272f920ad60f27e929e3
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoheat cfn api, format waitcondition error responses correctly
Steven Hardy [Wed, 12 Dec 2012 15:01:54 +0000 (15:01 +0000)]
heat cfn api, format waitcondition error responses correctly

Return errors from the waitcondition part of the CFN API in a similar
format to other CFN API responses, by catching engine errors and mapping
the error to an appropriate HeatAPIException.

fixes bug 1089032

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

12 years agoOverride events for AutoScalingGroup instances
Steven Hardy [Wed, 12 Dec 2012 14:59:02 +0000 (14:59 +0000)]
Override events for AutoScalingGroup instances

Override state-transition events by subclassing the Instance
resource to AutoScalingGroupInstance, this avoids problems where
events can't lookup the resource via parser.Stack (since these
resources aren't "real" resources defined in the template)

fixes bug 1089338

Change-Id: Ia064cd067eefdaa5ca81b0cb822ce2fa443bac85
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoresource state_set, abstract update/store logic
Steven Hardy [Wed, 12 Dec 2012 14:57:11 +0000 (14:57 +0000)]
resource state_set, abstract update/store logic

Abstract the DB update/store logic so the state_set function
can be more cleanly overridden for AutoScalingGroupInstance

ref bug 1089338

Change-Id: I02dc52068feaeed8ec8210269d9abb7b124f0a19
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoDon't allow identifiers with slashes
Zane Bitter [Wed, 12 Dec 2012 11:06:56 +0000 (12:06 +0100)]
Don't allow identifiers with slashes

Ensure that creating an Identifier with a slash in either the stack name or
the resource name results in an immediate exception.

Change-Id: I79121a26009b5b7b3eee994f98ba802b239f5f12
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoDon't allow slashes in Stack or Resource names
Zane Bitter [Wed, 12 Dec 2012 12:47:33 +0000 (13:47 +0100)]
Don't allow slashes in Stack or Resource names

There is no way for the ReST API to handle Stack or Resource names that
contain slashes since WSGI decodes the path before passing it to the
application, such that even correctly url-encoded slashes are
indistinguishable from path separators. Therefore, prohibit slashes in
Stack and Resource names.

bug 1088928

Change-Id: Ie6fa5a1bc7b5ae7054300419644008c5cc42187e
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoMerge "Fix race condition in list_stacks"
Jenkins [Wed, 12 Dec 2012 08:27:53 +0000 (08:27 +0000)]
Merge "Fix race condition in list_stacks"

12 years agoMove resolved template comparison to stack update
Steve Baker [Wed, 12 Dec 2012 01:48:17 +0000 (14:48 +1300)]
Move resolved template comparison to stack update

This partially reverts the following commit
https://review.openstack.org/#/c/17563/3

Resource comparison is now done as per Zane's last comment in that review.

Change-Id: I1663d262b79603ab86bc5bdb4f2ee75e87c0075e

12 years agoFix race condition in list_stacks
Steve Baker [Mon, 10 Dec 2012 03:18:26 +0000 (16:18 +1300)]
Fix race condition in list_stacks

A stack may be deleted between querying the stacks to list and formatting
each stack.

This issue was found by concurrently creating and deleting 100 stacks
while running heat list.

Change-Id: I4a47bbdbde111454672c2579caf28b4675c3cf10

12 years agoGet rid of glanceclient dependency
Zane Bitter [Tue, 11 Dec 2012 19:23:36 +0000 (20:23 +0100)]
Get rid of glanceclient dependency

We're not actually using it anywhere, and its keystoneclient version
requirements are causing us not to be able to install. Move it instead to
the test-requires, since the functional tests are still actually using it.

Change-Id: I74e68ddb4b65235b6c192c619e9e8e85e30beab9
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoheat engine : convert WaitConditionHandle URL to ARN format
Steven Hardy [Tue, 4 Dec 2012 16:33:51 +0000 (16:33 +0000)]
heat engine : convert WaitConditionHandle URL to ARN format

Convert the WaitConditionHandle URL format to use the ARN format,
the resulting URL will be similar to the AWS format

fixes bug 1087799

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

12 years agoMerge "heat : Add HeatIdentifier from_url function"
Jenkins [Tue, 11 Dec 2012 14:37:28 +0000 (14:37 +0000)]
Merge "heat : Add HeatIdentifier from_url function"

12 years agoheat : Add HeatIdentifier from_url function
Steven Hardy [Tue, 4 Dec 2012 16:33:13 +0000 (16:33 +0000)]
heat : Add HeatIdentifier from_url function

Add method to create a HeatIdentifier from a URL containing an ARN

ref bug 1087799

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