]> review.fuel-infra Code Review - openstack-build/heat-build.git/log
openstack-build/heat-build.git
12 years agoImplement NoEcho for parameters
Zane Bitter [Wed, 31 Oct 2012 19:18:43 +0000 (20:18 +0100)]
Implement NoEcho for parameters

Change-Id: I60ce651367479205e0d456e2ac0ec3f949766383
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoUse new Parameters class for validation
Zane Bitter [Wed, 31 Oct 2012 19:18:43 +0000 (20:18 +0100)]
Use new Parameters class for validation

The Stack.validate() method is no longer used for the validate_template
feature (since it requires the parameter values in order to parse the whole
template), so move the code for outputting parameter metadata to where it
is actually used.

Change-Id: Ibf2ad7cb485bff75953c952f34ea4a597ea5e2f8
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoSeparate Parameters implementation from Properties
Zane Bitter [Wed, 31 Oct 2012 19:18:43 +0000 (20:18 +0100)]
Separate Parameters implementation from Properties

There are only 3 types allowed for Parameters (String, Number and
CommaDelimitedList), but we are currently allowing more due to a shared
implementation with Properties (which is an internal implementation
detail). This creates a separate implementation for Parameters with only
the allowed types.

Change-Id: If51ec538893a582da2caa0356c25e515e9d8004e
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoClean up hacks for parameter passing in unit tests
Zane Bitter [Wed, 31 Oct 2012 19:18:42 +0000 (20:18 +0100)]
Clean up hacks for parameter passing in unit tests

Don't rely on the internal behaviour of the Parameters class.

Change-Id: I14f11e6ead1c49cf540bba453200fdec7f2ce7a3
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoPut the Template class in its own file
Zane Bitter [Wed, 31 Oct 2012 19:18:42 +0000 (20:18 +0100)]
Put the Template class in its own file

Change-Id: I5e3a9ef79c1c4f893720cfa529066d49a7c83ad1
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoheat-keystone-setup : fix error on folsom first-install
Steven Hardy [Wed, 31 Oct 2012 16:28:19 +0000 (16:28 +0000)]
heat-keystone-setup : fix error on folsom first-install

When running heat-keystone-setup for the first time after (re)installing
openstack folsom, it fails, because the user-role-list is running *as* the
heat user, not reading the roles assigned to the heat user, which fails
because on a new install the heat user does not have the admin role.
Using the credentials from the environment means we run the command as
admin, but --user_id selects the roles for the heat user.

Change-Id: Ib2733e63f664d75be1e2e3bd43038bbd1dbebde8
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat engine : add heat_waitcondition_server_url
Steven Hardy [Thu, 25 Oct 2012 13:50:28 +0000 (14:50 +0100)]
heat engine : add heat_waitcondition_server_url

Add config option for waitcondition server, since metadata
and waitcondition notifications are no longer handled by the
same API

Change-Id: Idc1b39c6c60b8473316fe4861f0f060568540b09
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat metadata : Remove all non-waitcondition related logic
Steven Hardy [Thu, 25 Oct 2012 13:40:47 +0000 (14:40 +0100)]
heat metadata : Remove all non-waitcondition related logic

Remove all logic except that required by cfn-signal, since both
cfn-hup and cfn-push-stats have been ported to use the CFN and
Cloudwatch APIs respectively

Change-Id: I087349ff3ab901c880a248bd124396a1383c0a5e
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat metadata : remove metadata_url logic
Steven Hardy [Thu, 25 Oct 2012 13:30:31 +0000 (14:30 +0100)]
heat metadata : remove metadata_url logic

Remove logic where the heat-metadata server registers a
URL on startup with the engine.  The instance metadata is
now served via the CFN api, so we just have a config-file
option specifying the URL of the CFN API.  We don't want to
preserve the "register on startup" logic, because we need the
engine to have access to this information even if it is
restarted independent of some other service (avoid reliance on
services coming up in a particular order)

Change-Id: I690170977227ec96451d2a2fd25f7e507370b604
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoMerge "Format stack_identity as id *and* links."
Jenkins [Fri, 26 Oct 2012 07:28:13 +0000 (07:28 +0000)]
Merge "Format stack_identity as id *and* links."

12 years agoFormat stack_identity as id *and* links.
Steve Baker [Thu, 25 Oct 2012 00:31:52 +0000 (13:31 +1300)]
Format stack_identity as id *and* links.

Here the id is defined as {stack_id}

Change-Id: Ieadda61d608e2d3e7125b42758cf80588178c042

12 years agoMove resources into a separate sub-package
Zane Bitter [Thu, 25 Oct 2012 18:44:20 +0000 (20:44 +0200)]
Move resources into a separate sub-package

Change-Id: I5a6d74949b6f39a9df6c5077c2ff768f50fb3ac1
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoMove Timestamp code to separate file
Zane Bitter [Thu, 25 Oct 2012 20:18:27 +0000 (22:18 +0200)]
Move Timestamp code to separate file

Change-Id: I57627f5b9048bbbcda0a07ac274fd1e579348496
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoheat-keystone-setup : change role to heat_stack_user
Steven Hardy [Thu, 25 Oct 2012 13:04:49 +0000 (14:04 +0100)]
heat-keystone-setup : change role to heat_stack_user

Change heat_instance role name to heat_stack_user after discussions

Change-Id: I14e95df0e02d82566f4758510ae38f6b26ccb532
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat engine : add template-defined users to keystone role
Steven Hardy [Thu, 25 Oct 2012 10:33:20 +0000 (11:33 +0100)]
heat engine : add template-defined users to keystone role

Add all keystone users created by the User resource type
to a special keystone role, which can be used later for
defining RBAC policy for these users, and also works around
a keystone bug (1060959) on Folsom

Fixes #279

Change-Id: I94931e427ed51f4332bcb506220925b7ce8097bc
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat engine : Allow instance users to view their own details
Steven Hardy [Tue, 23 Oct 2012 20:59:38 +0000 (21:59 +0100)]
heat engine : Allow instance users to view their own details

So that cfn-hup can read instance metadata via the DescribeStackResource
API call, we need non-admin "instance users" to be allowed to read their
own AccessKey resource details (since it can-be/is referenced in the
instance resource metadata).  The change in this patch should allow non-admin
users to read *only their own* secret AccessKey, and leave existing admin-user
visibility of the AccessKey resources unchanged.

Change-Id: Ic26d614d8e30104fbb354a67d3376b5d995ae8cc
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat-keystone-setup add instance role
Steven Hardy [Thu, 25 Oct 2012 09:16:29 +0000 (10:16 +0100)]
heat-keystone-setup add instance role

Add "heat_instance" role which we will assign all "instance users"
to in the engine when we create them

Ref #279

Change-Id: If7cc07c605f7696c1e9f617dbfca1b81d5b04196
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat-keystone-setup workaround keystone arg syntax
Steven Hardy [Wed, 24 Oct 2012 12:48:22 +0000 (13:48 +0100)]
heat-keystone-setup workaround keystone arg syntax

Keystone user-role-add syntax is not the same on essex
and folsom, so try both formats so we can work with either
Removes potentially unreliable approach to detecting keystone
version, and also avoids error on folsom when the user already
has the specified role

Fixes #272

Change-Id: Iece52223a29069a1fd517018cc49613be6fac318
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat-keystone-setup workaround keystone output reordering
Steven Hardy [Wed, 24 Oct 2012 12:41:34 +0000 (13:41 +0100)]
heat-keystone-setup workaround keystone output reordering

Folsom version of keystoneclient orders the columns for
keystone user-list differently, so we need to detect the
new format to extract the correct field

Fixes #273

Change-Id: I46f653dd3a8f7b5a68648fbd72671f95b386a547
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat tests : StackBoto fix _check_*_result functions
Steven Hardy [Tue, 23 Oct 2012 13:20:37 +0000 (14:20 +0100)]
heat tests : StackBoto fix _check_*_result functions

The _check_*_result functions don't actually check anything
so make them check the response format, which should be a stackid

Change-Id: I6b22cdc64409846caadbd2ebca5e8a81eccc81a6
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat tests : refactor stackid check into utils.Stack
Steven Hardy [Tue, 23 Oct 2012 13:16:39 +0000 (14:16 +0100)]
heat tests : refactor stackid check into utils.Stack

Rework utils.Stack._check_stackid so it can be used in the
tests to verify stackid format, avoiding maintaining multiple
copies of a stackid regex

Change-Id: If7fbd7b35626c377b42a43ffa03ee8067540963b
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat tests : fix CFN_API_Actions test fix state reason
Steven Hardy [Tue, 23 Oct 2012 12:42:15 +0000 (13:42 +0100)]
heat tests : fix CFN_API_Actions test fix state reason

state reason is "state changed" not None now we commit
the IN_PROGRESS state transition to the DB

Change-Id: I4c6641cd489de13ee9575fcdf879cae95ad7df4d
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat tests : fix CFN_API_Actions test stackid regex
Steven Hardy [Tue, 23 Oct 2012 12:07:57 +0000 (13:07 +0100)]
heat tests : fix CFN_API_Actions test stackid regex

stackid format has changed since move from tenant name to
tenant id

Change-Id: I5e8304f33d49133bc1b7e5530ae1a8323e2986c5
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat engine : kill running greenthreads on stack_delete
Steven Hardy [Thu, 18 Oct 2012 16:13:02 +0000 (17:13 +0100)]
heat engine : kill running greenthreads on stack_delete

Add logic to track running eventlet greenthreads and kill
them when we start a stack_delete.  This should avoid errors
where long-running greenthreads end up referencing stacks which
have subsequently been deleted.

Fixes #261
Ref #223

Change-Id: I0d10b6f2dad0efa1caec18a67a3cc66cc693ea24
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat engine : Store all resource states to DB
Steven Hardy [Wed, 17 Oct 2012 13:38:08 +0000 (14:38 +0100)]
heat engine : Store all resource states to DB

Resources should be committed to the DB on transisiton
to CREATE_IN_PROGRESS state, otherwise resources
which take a long time to go from CREATE_IN_PROGRESS to
CREATE_COMPLETE (e.g WaitConditions) are invisible while
in the CREATE_IN_PROGRESS state to all except the thread
creating them.

Change-Id: If1563505e854c216c0f6a5ce84b613e1ccb74386
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoBump version to v8
Zane Bitter [Tue, 23 Oct 2012 09:49:47 +0000 (11:49 +0200)]
Bump version to v8

v7 has branched

Change-Id: Ib8d3471576e0d408b18f4ab4d04ffdeafba234b5
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoheat engine : Make Resource::swift handle auth_token
Steven Hardy [Mon, 22 Oct 2012 17:38:06 +0000 (18:38 +0100)]
heat engine : Make Resource::swift handle auth_token

Make Resource::swift() handle auth_token so the S3
resource will work with AWS auth

Fixes #271

Change-Id: Ie5aca026dea25045e42aab677a2c793c79de1658
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoReST API: Add a keystone endpoint
Zane Bitter [Thu, 18 Oct 2012 13:50:27 +0000 (15:50 +0200)]
ReST API: Add a keystone endpoint

Change-Id: I2770279ec50822c106d3ae23ce2f736a49139443
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoHandle %(tenant_id)s in endpoints when updating
Zane Bitter [Thu, 18 Oct 2012 14:50:53 +0000 (16:50 +0200)]
Handle %(tenant_id)s in endpoints when updating

Change-Id: I61112f02b60b6bb63f33d5459edec1f44a49bdd5
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoChange the service user to match devstack
Zane Bitter [Mon, 22 Oct 2012 09:24:59 +0000 (11:24 +0200)]
Change the service user to match devstack

The user which authenticates keystone tokens should be the "heat" user in
the "service" tenant. This changes the default configuration to do this, as
devstack already does.

Ref #269

Change-Id: I89978ec0b490f6d404c568197dd4208097a4b695
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoPass the correct tenant for the service user
Zane Bitter [Mon, 22 Oct 2012 09:20:07 +0000 (11:20 +0200)]
Pass the correct tenant for the service user

Previously, the service user (which authenticates tokens passes to the
engine by the APIs) was paired with the tenant of the end user to do
authentication, which worked only when they were in the same tenant. This
should not be the case, since the service user should only have an admin
role in the "service" tenant.

Fixes #269

Change-Id: I99b764fc489429dd6d081485bd89d5dde737c124
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoMerge "ReST API: Format output as JSON"
Jenkins [Fri, 19 Oct 2012 20:45:14 +0000 (20:45 +0000)]
Merge "ReST API: Format output as JSON"

12 years agoMerge "Start and enable libvirtd."
Jenkins [Fri, 19 Oct 2012 18:37:58 +0000 (18:37 +0000)]
Merge "Start and enable libvirtd."

12 years agoStart and enable libvirtd.
Ian Main [Fri, 19 Oct 2012 18:30:27 +0000 (11:30 -0700)]
Start and enable libvirtd.

Just did a fresh install on fedora 17 and found libvirt was not running
by default which caused nova to not start.  Explicitly enable it.

Change-Id: Id244af934007020d1a9f263dd71f04e5950dd2c5
Signed-off-by: Ian Main <imain@redhat.com>
12 years agoheat engine : Resource.keystone handle auth_token
Steven Hardy [Fri, 19 Oct 2012 18:11:51 +0000 (19:11 +0100)]
heat engine : Resource.keystone handle auth_token

Handle auth_token as well as username/password

Fixes #268

Change-Id: I7015556d74e026977fdd04f4ce9a378c0fac7695
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat engine : Rework auth.authenticate
Steven Hardy [Fri, 19 Oct 2012 18:02:33 +0000 (19:02 +0100)]
heat engine : Rework auth.authenticate

engine.auth.authenticate is really creating a novaclient
connection, so move this into Resource.nova

Ref #268

Change-Id: I15d9c0537b3af9e65cd1ea5bd667bde0c89dc4c2
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat engine : remove unused EC2 style auth from engine
Steven Hardy [Fri, 19 Oct 2012 15:12:15 +0000 (16:12 +0100)]
heat engine : remove unused EC2 style auth from engine

We handle EC2 style auth at the heat-api-cfn level, so EC2
style authenticated requests simply pass us an auth_token in
the context, so remove this duplicate/dead code.

Ref #268

Change-Id: I17708cb6ef4b0eb4989d47c116b6211f0d419dcb
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoReST API: Format output as JSON
Zane Bitter [Fri, 19 Oct 2012 15:14:12 +0000 (17:14 +0200)]
ReST API: Format output as JSON

Eventually, both XML and JSON will be supported, but for now make the
output JSON, the same as the input.

Change-Id: If0f00b182c27616a9a6f08b468d732c718b7635a
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoDo not assume host has selinux utils installed
Jeff Peeler [Fri, 19 Oct 2012 15:20:04 +0000 (11:20 -0400)]
Do not assume host has selinux utils installed

related to #265

Change-Id: I4a6cff1f05b6f4f88d672cc0d4ce5e8f62a58e47
Signed-off-by: Jeff Peeler <jpeeler@redhat.com>
12 years agoIdentify stacks using tenant UUIDs
Zane Bitter [Fri, 19 Oct 2012 14:15:13 +0000 (16:15 +0200)]
Identify stacks using tenant UUIDs

Tenant names may come and go, but UUIDs are universally unique. Therefore,
ownership of the stack should be keyed on the tenant_id, not the tenant
name.

Change-Id: I7ec410aeaeceb6319299935b5f34d7c4e9c63d67
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoMake default distribution U10 for deb template
Jeff Peeler [Thu, 18 Oct 2012 18:53:26 +0000 (14:53 -0400)]
Make default distribution U10 for deb template

Change-Id: Ifcfc7d1fbb6fac2a785a0dc5a4e6ba09cf898ed4
Signed-off-by: Jeff Peeler <jpeeler@redhat.com>
12 years agoheat engine : Make wait-condition poll interval better
Steven Hardy [Wed, 17 Oct 2012 12:37:57 +0000 (13:37 +0100)]
heat engine : Make wait-condition poll interval better

Remove rising-rate sleep-time logic and replace with a bounded
poll interval derived from the timeout - this should avoid ramping
up to a really long interval and delaying stack complete status

Fixes #264

Change-Id: Id53b87a988299708c29fc853f2801f527fd825dd
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoHandle upgrades in heat-keystone-setup
Zane Bitter [Tue, 16 Oct 2012 14:31:59 +0000 (16:31 +0200)]
Handle upgrades in heat-keystone-setup

Handle upgrades of Heat by removing any outdated endpoints that exist in
keystone and adding any existing "heat" service user to an admin role in
the service tenant.

Change-Id: If6393417b5404a56b4723f42fb1a1b394d01cc6a
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoRename CloudFormation service to heat-cfn
Zane Bitter [Wed, 17 Oct 2012 08:33:45 +0000 (10:33 +0200)]
Rename CloudFormation service to heat-cfn

This is consistent with what is implemented in devstack.

Change-Id: If47c28ddbef1d6c61e2d741f359d850e4ecffaa9
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoMerge "heat tests : Remove utils.Stack getter methods"
Jenkins [Wed, 17 Oct 2012 08:33:13 +0000 (08:33 +0000)]
Merge "heat tests : Remove utils.Stack getter methods"

12 years agoheat tests : Remove utils.Stack getter methods
Steven Hardy [Tue, 16 Oct 2012 16:24:53 +0000 (17:24 +0100)]
heat tests : Remove utils.Stack getter methods

Remove the get_*_client getter methods, as they aren't
actually doing anything, so just access the attributes

Change-Id: Ic6740bdfe7d44c40b9fdf9fc4d03f8eddaf9a740
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoUse password in preference to token if both supplied
Zane Bitter [Tue, 16 Oct 2012 14:33:55 +0000 (16:33 +0200)]
Use password in preference to token if both supplied

Fixes #263 - devstack is providing a token in the environment, which was
causing the wrong path to get hit.

Change-Id: I9aae346e57fdfe156e52d4696e8f2f859884ff2f
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoMerge "heat : heat cli pep cleanups"
Jenkins [Tue, 16 Oct 2012 14:16:50 +0000 (14:16 +0000)]
Merge "heat : heat cli pep cleanups"

12 years agoheat tests : add ValidateTemplate test to CFN_API_Actions_Boto test
Steven Hardy [Tue, 16 Oct 2012 13:16:17 +0000 (14:16 +0100)]
heat tests : add ValidateTemplate test to CFN_API_Actions_Boto test

Add test for ValidateTemplate test to test_CFN_API_Actions_Boto.py

Change-Id: I1fff55cd9aaa0c62c2a1e05050695bcd3f96664a
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat tests : Add ValidateTemplate test to CFN_API_Actions test
Steven Hardy [Tue, 16 Oct 2012 12:45:24 +0000 (13:45 +0100)]
heat tests : Add ValidateTemplate test to CFN_API_Actions test

Add test for ValidateTemplate action to test_CFN_API_Actions.py

Change-Id: Ia7a377f952d096e7b728a7151906ab2781695008
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat API : ValidateTemplate fix response format
Steven Hardy [Tue, 16 Oct 2012 12:19:27 +0000 (13:19 +0100)]
heat API : ValidateTemplate fix response format

Fix CFN API ValidateTemplate response format, missing the
ValidateTemplateResponse wrapper, required by boto to parse the response

Change-Id: I89464df402346ff87041496652d2b4d39cc35fc6
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat : heat cli pep cleanups
Steven Hardy [Tue, 16 Oct 2012 13:34:38 +0000 (14:34 +0100)]
heat : heat cli pep cleanups

Fix some pep whitespace issues, which were not picked
up by the jenkins gate for some reason..

Change-Id: I9a3488d61a3cde4bb8038f3f1927eb0c1ad0f60c
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat : boto_client_cloudwatch allow credentials override
Steven Hardy [Mon, 8 Oct 2012 12:48:27 +0000 (13:48 +0100)]
heat : boto_client_cloudwatch allow credentials override

Allow the AWS key/secret to be passed in when making the client
connection like boto_client.py

Ref #222

Change-Id: Iee24120eb52c8ffb97b1b421b0a27313e5f5cbdd
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoCatch SSH Disconnection errors in functional tests
Zane Bitter [Tue, 16 Oct 2012 11:35:23 +0000 (13:35 +0200)]
Catch SSH Disconnection errors in functional tests

Change-Id: I24f959cbaa36138bafeda70a3966000673c80c56
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoheat : add template-swift-url option to client
Steven Hardy [Tue, 16 Oct 2012 09:38:17 +0000 (10:38 +0100)]
heat : add template-swift-url option to client

Add option to bin/heat to retrieve template body from swift

Fixes #216

Change-Id: I425d7cd0f01875d85d97906f4f91c3a3b2fcf851
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat cli: encapsulate template arg-parsing
Steven Hardy [Mon, 15 Oct 2012 15:42:52 +0000 (16:42 +0100)]
heat cli: encapsulate template arg-parsing

Encapsulate template argument parsing in a helper function
cleans up some duplication and provides a single place to add
swift-template-url logic

Ref #216

Change-Id: I36515f318ed79899a2710899ffca83e4452c61f4
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat engine : remove unused validate_template params
Steven Hardy [Mon, 15 Oct 2012 16:01:39 +0000 (17:01 +0100)]
heat engine : remove unused validate_template params

Remove unused params argument to validate_template, since
it is no longer passed by the CFN API meaning the validate
action fails

Fixes #262

Change-Id: Ic2a5ede02649f2d6dff86595efb0127e07fbf253
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoObey the passed in distro value in HAProxy template
Zane Bitter [Mon, 15 Oct 2012 14:33:19 +0000 (16:33 +0200)]
Obey the passed in distro value in HAProxy template

Change-Id: I7e1dad654746329763bb575a09611aa0b827ec24
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoUse --script option to parted in templates
Zane Bitter [Mon, 15 Oct 2012 14:13:12 +0000 (16:13 +0200)]
Use --script option to parted in templates

Provisioning scripts should never expect user input.

Change-Id: I0099cee6a920313c2b5c8e86ddb18de11bab8329
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoReduce timeout periods in functional tests
Zane Bitter [Mon, 15 Oct 2012 13:46:49 +0000 (15:46 +0200)]
Reduce timeout periods in functional tests

Many of the timeouts were absurdly long and delayed reporting of test
results by many hours at a time.

Change-Id: I9a70442548097d607eab87471a8037b566127ac9
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoReST API: Add unit tests
Zane Bitter [Fri, 12 Oct 2012 20:32:54 +0000 (22:32 +0200)]
ReST API: Add unit tests

Change-Id: Id815c7d5d08e912f64268529b4bdbdcd06c1c47e
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoheat : Getting started updates for Cloudwatch
Steven Hardy [Mon, 15 Oct 2012 10:34:52 +0000 (11:34 +0100)]
heat : Getting started updates for Cloudwatch

Update GettingStarted.rst:
- Add heat-api-cloudwatch section
- Add firewall rules required for heat-metadata and heat-api-cloudwatch

Change-Id: I3b232f378a23b6c334c7e8e5af3ab067ffd50381
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoGetting Started: Fix IP address determination on F17
Zane Bitter [Mon, 15 Oct 2012 09:57:11 +0000 (11:57 +0200)]
Getting Started: Fix IP address determination on F17

The format of the output of ifconfig has changed between Fedora 16 and
Fedora 17, so starting the metadata server failed on the latter due to a
missing IP address.

The change makes the script work with either format, and also now fails
with an error if it breaks again.

Change-Id: I7012af7bd7c15f6a962d19e66c8a0d8401243895
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoMerge "heat : Remove cloudwatch functionalty from metadata server"
Jenkins [Mon, 15 Oct 2012 08:57:10 +0000 (08:57 +0000)]
Merge "heat : Remove cloudwatch functionalty from metadata server"

12 years agoMerge "heat templates : Add boto config to HA templates"
Jenkins [Mon, 15 Oct 2012 08:55:04 +0000 (08:55 +0000)]
Merge "heat templates : Add boto config to HA templates"

12 years agoMerge "heat engine : Move watch logic into WatchRule class"
Jenkins [Mon, 15 Oct 2012 08:43:19 +0000 (08:43 +0000)]
Merge "heat engine : Move watch logic into WatchRule class"

12 years agoheat engine : Move watch logic into WatchRule class
Steven Hardy [Fri, 28 Sep 2012 07:02:20 +0000 (08:02 +0100)]
heat engine : Move watch logic into WatchRule class

Move engine/manager.py logic into WatchRule class so watch-
related DB manipulation and related logic is encapsulated in
the WatchRule class

Fixes #217

Change-Id: I5405ab631de17efda7eefb45dadad55ee12c533c
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoReST API: Report template validation errors
Zane Bitter [Fri, 12 Oct 2012 20:32:54 +0000 (22:32 +0200)]
ReST API: Report template validation errors

Use a different HTTP Status code (Bad Request) for validation errors.

Change-Id: Ie1097dfbbe920a2efb641b343114d7b4decac473
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoReST API: Return appropriate error codes
Zane Bitter [Fri, 12 Oct 2012 20:32:54 +0000 (22:32 +0200)]
ReST API: Return appropriate error codes

Change-Id: I769366dd164199c3b7d16ca8bf4c4d99d21dbb7b
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoReST API: Separate out code to fetch template from a URL
Zane Bitter [Fri, 12 Oct 2012 20:32:54 +0000 (22:32 +0200)]
ReST API: Separate out code to fetch template from a URL

This will make testing a bit easier.

Change-Id: I8f9d63e3ff68174bb9f1284c21f52696ec5ac006
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoheat : db API add watch_rule_get_by_name
Steven Hardy [Fri, 12 Oct 2012 16:18:11 +0000 (17:18 +0100)]
heat : db API add watch_rule_get_by_name

Add watch_rule_get_by_name, and move the previous
watch_rule_get to look up rule by ID, which is consistent
with the other api calls.  Lookup by id is required for
WatchRule rework

Ref #217

Change-Id: I4b5d08ffcd31b6b522c65edd0a202e8cf5a367b8
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat : db API add watch_rule_update DB API action
Steven Hardy [Fri, 12 Oct 2012 09:49:13 +0000 (10:49 +0100)]
heat : db API add watch_rule_update DB API action

Add watch_rule_update DB API call, needed for WatchRule
refactor/rework

Ref #217

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

12 years agoheat : Remove cloudwatch functionalty from metadata server
Steven Hardy [Fri, 12 Oct 2012 12:45:11 +0000 (13:45 +0100)]
heat : Remove cloudwatch functionalty from metadata server

Remove the cloudwatch metric functionality from the heat-metadata
service, since all stats should now be sent via the CloudWatch
api via the PutMetricData action (ref cfn-push-stats update)

Note that after this change you will need to rebuild your jeos
images to get the new version of cfn-push-stats from heat-jeos

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

12 years agoheat templates : Add boto config to HA templates
Steven Hardy [Wed, 10 Oct 2012 09:03:11 +0000 (10:03 +0100)]
heat templates : Add boto config to HA templates

Add boto config to HA/IHA templates as it's now required for
authenticated cfn-push-stats which uses the CloudWatch API

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

12 years agoMerge "ReST API: Add some simple API documentation"
Jenkins [Wed, 10 Oct 2012 22:17:18 +0000 (22:17 +0000)]
Merge "ReST API: Add some simple API documentation"

12 years agoMerge "ReST API: Use JSON documents for data input"
Jenkins [Wed, 10 Oct 2012 22:16:56 +0000 (22:16 +0000)]
Merge "ReST API: Use JSON documents for data input"

12 years agoMerge "ReST API: Refactor handling of input data"
Jenkins [Wed, 10 Oct 2012 22:14:02 +0000 (22:14 +0000)]
Merge "ReST API: Refactor handling of input data"

12 years agoUnit test for load balancer resource type.
Steve Baker [Wed, 10 Oct 2012 19:18:04 +0000 (08:18 +1300)]
Unit test for load balancer resource type.

Change-Id: I2386419563f02bcb509a8547fd587b9af6285c5c

12 years agoMerge "heat : Add missing calculate_properties to user resource"
Jenkins [Wed, 10 Oct 2012 18:17:25 +0000 (18:17 +0000)]
Merge "heat : Add missing calculate_properties to user resource"

12 years agoMerge "heat engine : Avoid printing credentials to logfile"
Jenkins [Wed, 10 Oct 2012 18:15:07 +0000 (18:15 +0000)]
Merge "heat engine : Avoid printing credentials to logfile"

12 years agoheat : Add missing calculate_properties to user resource
Steven Hardy [Wed, 10 Oct 2012 17:20:25 +0000 (18:20 +0100)]
heat : Add missing calculate_properties to user resource

Adding calculate_properties to user AccessKey resource, or
we get a key error when trying to list resources in stacks
using this resource type

Fixes #194

Change-Id: I905c162dd6bc3557825610f046e6ee8228d5225b
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat engine : Avoid printing credentials to logfile
Steven Hardy [Mon, 8 Oct 2012 16:16:42 +0000 (17:16 +0100)]
heat engine : Avoid printing credentials to logfile

Avoid printing the AWS secret key to the (world-readable)
engine logfile

Fixes #258

Change-Id: I26d809064c603421c4bbe4a060de5d4776fec4b8
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat engine : only attempt stack update from valid states
Steven Hardy [Wed, 10 Oct 2012 17:51:20 +0000 (18:51 +0100)]
heat engine : only attempt stack update from valid states

Only attempt to update a stack if it is in CREATE_COMPLETE
or UPDATE_COMPLETE state

Fixes #260

Change-Id: If47a628f1602d5d8783b3f0e90fd7e76ccef46ba
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoReST API: Add some simple API documentation
Zane Bitter [Wed, 10 Oct 2012 16:22:01 +0000 (18:22 +0200)]
ReST API: Add some simple API documentation

Change-Id: I6b3ff5a46e0ba836634cc21cf7ee8945a18a6a3a
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoReST API: Use JSON documents for data input
Zane Bitter [Tue, 9 Oct 2012 15:55:37 +0000 (17:55 +0200)]
ReST API: Use JSON documents for data input

This is more in keeping with how OpenStack resources are manipulated than
the previous implementation, which used WWW Forms encoding.

Change-Id: Iba7a6b83a65637cf999c67ef3f4dea7b3e64100d
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoReST API: Refactor handling of input data
Zane Bitter [Wed, 10 Oct 2012 13:38:04 +0000 (15:38 +0200)]
ReST API: Refactor handling of input data

Create a separate class for dealing with the data associated with a
PUT/POST request.

Change-Id: I054bc74cf65055d23eb716738c29e751a32f3022
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoReST API: Fix template validation
Zane Bitter [Wed, 10 Oct 2012 13:38:04 +0000 (15:38 +0200)]
ReST API: Fix template validation

Also move the URL to be local to a tenant. This is because keystone will
automatically fill in the tenant id in the endpoint, so all requests will
use this as a base URL.

Change-Id: I3fbd5a7d256426079824f8a26fdcd41eac083146
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoheat : workaround engine error with version code
Steven Hardy [Wed, 10 Oct 2012 10:57:33 +0000 (11:57 +0100)]
heat : workaround engine error with version code

Work around lack of git sha in vcsversion so we don't get an
engine error if the version dict doesn't contain the sha key

Fixes #259

Change-Id: I25d2cfb008a5a9e0e1a60e7360e58608d2d8e9c0
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoChange endpoint service type from orchestration to cloudformation.
Steve Baker [Wed, 10 Oct 2012 00:21:47 +0000 (13:21 +1300)]
Change endpoint service type from orchestration to cloudformation.

This is required so that the REST API can take over the orchestration service type.

This will break exiting setups until heat-keystone-setup is re-run.

There will be a corresponding update to devstack, which may be out of sync to this one.

12 years agoMerge "Remove unnecessary keystone scripts"
Jenkins [Tue, 9 Oct 2012 16:19:50 +0000 (16:19 +0000)]
Merge "Remove unnecessary keystone scripts"

12 years agoFix versioning code
Jeff Peeler [Sat, 29 Sep 2012 00:00:34 +0000 (20:00 -0400)]
Fix versioning code

Removed cruft from OpenStack common versioning code that was removed.
Added optional git SHA information if module is available. The
intent is to have the additional git revision reported only when FINAL
is set to False.

Change-Id: Iae94b84027e7428cd394726e07845d2bad631586
Signed-off-by: Jeff Peeler <jpeeler@redhat.com>
12 years agoRemove unnecessary keystone scripts
Jeff Peeler [Sat, 29 Sep 2012 00:08:35 +0000 (20:08 -0400)]
Remove unnecessary keystone scripts

Make remaining keystone script check installed version of Nova and use
proper arguments to keystone.

closes #252

Change-Id: Ie4709891c7ca89d73390a3474e3d10beab449395
Signed-off-by: Jeff Peeler <jpeeler@redhat.com>
12 years agoFix bugs in ReST API stack creation
Zane Bitter [Tue, 9 Oct 2012 08:37:01 +0000 (10:37 +0200)]
Fix bugs in ReST API stack creation

Change-Id: I39277224305465cc951e397f340012563c0f7174
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoAllow authentication to Nova with a Keystone token
Zane Bitter [Tue, 9 Oct 2012 10:06:44 +0000 (12:06 +0200)]
Allow authentication to Nova with a Keystone token

Change-Id: I3ca90169559cc167ff51db5fe47ceec8c917f04b
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoMerge "Make sure to remove python-glanceclient too"
Jenkins [Mon, 8 Oct 2012 19:42:08 +0000 (19:42 +0000)]
Merge "Make sure to remove python-glanceclient too"

12 years agoMerge "Fix hash-bang directive in nova_create_flavors.sh"
Jenkins [Mon, 8 Oct 2012 19:09:37 +0000 (19:09 +0000)]
Merge "Fix hash-bang directive in nova_create_flavors.sh"

12 years agoMerge "heat tests : add functional test for UpdateStack"
Jenkins [Mon, 8 Oct 2012 16:02:04 +0000 (16:02 +0000)]
Merge "heat tests : add functional test for UpdateStack"

12 years agoMerge "heat tests : functional utils support for UpdateStack"
Jenkins [Mon, 8 Oct 2012 15:57:25 +0000 (15:57 +0000)]
Merge "heat tests : functional utils support for UpdateStack"

12 years agoMerge "heat tests : Add new boto API test"
Jenkins [Mon, 8 Oct 2012 15:56:55 +0000 (15:56 +0000)]
Merge "heat tests : Add new boto API test"

12 years agoheat engine : workaround lack of no_cache on essex
Steven Hardy [Mon, 8 Oct 2012 15:21:25 +0000 (16:21 +0100)]
heat engine : workaround lack of no_cache on essex

no_cache novaclient fix doesn't work on essex, so try
both the essex and the folsom compatible novaclient
prototypes

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