]> review.fuel-infra Code Review - openstack-build/heat-build.git/log
openstack-build/heat-build.git
12 years agoRPC API: Return an identifier for events
Zane Bitter [Thu, 22 Nov 2012 10:06:57 +0000 (11:06 +0100)]
RPC API: Return an identifier for events

Change-Id: Iae2f08014e28997e499771ba9d89feb3954540da
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoUse the new class for database access to Events
Zane Bitter [Thu, 22 Nov 2012 10:06:57 +0000 (11:06 +0100)]
Use the new class for database access to Events

Change-Id: I6c02cf47869aaa1d293cb1b528ed967397c47208
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoAdd a class to represent Events
Zane Bitter [Thu, 22 Nov 2012 10:06:57 +0000 (11:06 +0100)]
Add a class to represent Events

Change-Id: Ie360343a264f2348af518c8f8eb8cfa0763ad18c
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoAdd a method for querying a resource's type
Zane Bitter [Thu, 22 Nov 2012 10:06:57 +0000 (11:06 +0100)]
Add a method for querying a resource's type

Change-Id: Ie07a01668c5958494631806ffc0748f659eb8a1b
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoAdd identifiers for Events
Zane Bitter [Thu, 22 Nov 2012 10:06:56 +0000 (11:06 +0100)]
Add identifiers for Events

Change-Id: I54b2d2bb56129314218f36889f0f525e88c9f146
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoImprove the identifier class for Resources
Zane Bitter [Thu, 22 Nov 2012 10:06:56 +0000 (11:06 +0100)]
Improve the identifier class for Resources

Enable the resource name to be retrieved from an object. Also allow a
ResourceIdentifier to be constructed from only the data passed through the
RPC API. This means we can use a single format for identifiers, but still
be able to extract important information such as the stack identifier and
resource name.

Change-Id: Ie9122cb1a835b30eb8e0713a9d5cdcb4a386eda7
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoMerge "Get db session from the context."
Jenkins [Wed, 21 Nov 2012 19:46:31 +0000 (19:46 +0000)]
Merge "Get db session from the context."

12 years agoMerge "Use a real context for tests."
Jenkins [Wed, 21 Nov 2012 19:31:19 +0000 (19:31 +0000)]
Merge "Use a real context for tests."

12 years agoGet db session from the context.
Steve Baker [Wed, 21 Nov 2012 19:15:05 +0000 (08:15 +1300)]
Get db session from the context.

The aim is to use a single sqlalchemy session for an RPC request.

The context object passed to EngineAPI methods is actually an RpcContext
which contains the same data as the RequestContext. The @request_context
decorator turns this back into a RequestContext which can now have other
behaviours added to it.

RequestContext now has a lazy loaded session attribute.

Save calls on created entities need to be passed the shared session.

Change-Id: Ied4e66deaca205362b84fb698f75cc872886607d

12 years agoUse a real context for tests.
Steve Baker [Wed, 21 Nov 2012 19:13:33 +0000 (08:13 +1300)]
Use a real context for tests.

No more DummyContext.

Change-Id: Ifbb7cea17b9fa0df90c15867712a74f4d8a5115d

12 years agoheat engine retrieve credentials every periodic task interval
Steven Hardy [Wed, 21 Nov 2012 11:34:51 +0000 (11:34 +0000)]
heat engine retrieve credentials every periodic task interval

Avoid saving a session context, instead retrieve the DB stored
credentials for every periodic task trigger, and create a new
session context for each periodic event

Change-Id: I24ca70b478f06be26ca6cc74385b37d1a0cf098d
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat engine Add admin flag to dbapi stack_get
Steven Hardy [Wed, 21 Nov 2012 11:31:14 +0000 (11:31 +0000)]
heat engine Add admin flag to dbapi stack_get

Add a flag to the stack_get dbapi call, defaulted to False,
which allows us to specify that the admin context is being used
hence we don't want tenant-scoping condition applied.
This is needed to allow the admin context to retrieve stored
credentials per-stack (e.g for the periodic per-stack tasks)

Change-Id: I55e307b7940f7da13bd169271744e80d95ea0bd9
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoTool to download all Amazon example templates
Steve Baker [Tue, 20 Nov 2012 03:24:23 +0000 (16:24 +1300)]
Tool to download all Amazon example templates

Templates are saved in templates/cloudformation-examples which is ignored
by git.

Its probably time we're exposed to a bit more template diversity.

Change-Id: I667c4f08fced353201ab9234a51526bcbeb0761b

12 years agoMerge "heat engine allow WatchRule load() from DB object"
Jenkins [Mon, 19 Nov 2012 22:57:31 +0000 (22:57 +0000)]
Merge "heat engine allow WatchRule load() from DB object"

12 years agoMerge "heat engine move to per-stack periodic watch threads"
Jenkins [Mon, 19 Nov 2012 22:55:30 +0000 (22:55 +0000)]
Merge "heat engine move to per-stack periodic watch threads"

12 years agoMerge "add watch_rule_get_all_by_stack dbapi call"
Jenkins [Mon, 19 Nov 2012 22:54:53 +0000 (22:54 +0000)]
Merge "add watch_rule_get_all_by_stack dbapi call"

12 years agoMerge "Make CloudWatchAlarm names unique per-tenant"
Jenkins [Mon, 19 Nov 2012 22:52:49 +0000 (22:52 +0000)]
Merge "Make CloudWatchAlarm names unique per-tenant"

12 years agoMerge "WatchRule refer to stack by id not name"
Jenkins [Mon, 19 Nov 2012 22:51:58 +0000 (22:51 +0000)]
Merge "WatchRule refer to stack by id not name"

12 years agor1 not defined
Angus Salkeld [Mon, 19 Nov 2012 04:18:54 +0000 (15:18 +1100)]
r1 not defined

Change-Id: Icd1135f17512248d5c212ba88add386212510641

12 years agoRemove unused statements/local assignments
Angus Salkeld [Mon, 19 Nov 2012 04:08:53 +0000 (15:08 +1100)]
Remove unused statements/local assignments

Change-Id: Iabc1932ef4f851567c30719de127e1165f23dd90

12 years agoheat engine allow WatchRule load() from DB object
Steven Hardy [Mon, 19 Nov 2012 22:23:24 +0000 (22:23 +0000)]
heat engine allow WatchRule load() from DB object

Allow WatchRule.load to initialize an object based on an existing
sqlalchemy DB object, similar to parser.Stack, avoids doing two
DB lookups when running the periodic watch tasks

Change-Id: I280942b81e5fdee17acf5582e3d319045afa7914
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat engine move to per-stack periodic watch threads
Steven Hardy [Mon, 19 Nov 2012 16:55:23 +0000 (16:55 +0000)]
heat engine move to per-stack periodic watch threads

Use the stack thread groups, so a separate watch thread is started
for each stack - this avoids some of the context scoping problems
previously encountered since we can pass the correct context to the
periodic task when starting it

Fixes bug 1078779

Change-Id: I56e6a4b126199587e91548f450956d77ab2158f3
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoadd watch_rule_get_all_by_stack dbapi call
Steven Hardy [Mon, 19 Nov 2012 16:26:12 +0000 (16:26 +0000)]
add watch_rule_get_all_by_stack dbapi call

Add option to retrieve all watch rules for a given stack, which
will be required to move to periodic watch threads per-stack

Ref bug 1078779

Change-Id: I350e2ee72c7eec0b91bf85ac52bb04e3cd00b4db
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoMake CloudWatchAlarm names unique per-tenant
Steven Hardy [Mon, 19 Nov 2012 15:31:01 +0000 (15:31 +0000)]
Make CloudWatchAlarm names unique per-tenant

Use physical_resource_name to ensure CloudWatchAlarm resources
are unique per tenant

Ref bug 1078779

Change-Id: Id37393decd8d4f89e79af5c7e9eeb21f4e494699
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoWatchRule refer to stack by id not name
Steven Hardy [Wed, 14 Nov 2012 15:41:17 +0000 (15:41 +0000)]
WatchRule refer to stack by id not name

Rework WatchRule to refer to stacks by uuid not name, this will
help us move to allowing non-unique stack names containing WatchRule
resources

Ref bug 1078779

Change-Id: Idbbbd65a05d7036860cc2feb044d568210071d21
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoProvide more information with template URL error
Jeff Peeler [Mon, 19 Nov 2012 17:10:12 +0000 (12:10 -0500)]
Provide more information with template URL error

Previously a generic read error was given. Inform the user with proper
exceptions for: the case when a resource is present but non-responsive
and when a resource is present but the requested data could not be
found.

Fixes bug 1072951

Change-Id: I35b92cea38358691015f8752e80efc6720e34e48
Signed-off-by: Jeff Peeler <jpeeler@redhat.com>
12 years agoAdd missing logging imports
Angus Salkeld [Mon, 19 Nov 2012 04:05:42 +0000 (15:05 +1100)]
Add missing logging imports

Change-Id: Ide1d0a27337bfaf767cf85d59deef1752724fbcf

12 years agoUse jsonutils in ec2token
Angus Salkeld [Mon, 19 Nov 2012 04:04:44 +0000 (15:04 +1100)]
Use jsonutils in ec2token

To get access to to_primitive()

Change-Id: I9a09609b5469870a217386be9fbad9261ef0c815

12 years agoRemove unused imports
Angus Salkeld [Mon, 19 Nov 2012 05:11:50 +0000 (16:11 +1100)]
Remove unused imports

Change-Id: I4977a34b758f3dd2b5a4772dc074af2f0c715175

12 years agoFix ppetit.template parameter type Integer -> Number
Angus Salkeld [Mon, 19 Nov 2012 01:12:35 +0000 (12:12 +1100)]
Fix ppetit.template parameter type Integer -> Number

part of bug 1072896
Change-Id: I47011d14330f8d8015876a88529a399a1cee98b6

12 years agoRPC API: Get rid of event_create call
Zane Bitter [Fri, 16 Nov 2012 14:50:03 +0000 (15:50 +0100)]
RPC API: Get rid of event_create call

Nothing is using this.

Change-Id: Id97ce0af1e176463b92288022765f80e1b5152ed
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoReST API: Add a convenience redirect for resources
Zane Bitter [Wed, 14 Nov 2012 16:51:26 +0000 (17:51 +0100)]
ReST API: Add a convenience redirect for resources

Since the path stacks/{stack_name}/{stack_id}/resources exists for each
valid stack we can safely redirect to it from stacks/{stack_name}/resources
without having to perform any further checks in the engine, so we may as
well allow it.

Change-Id: I0169493479f8c6840de3edad271cf98e8fd5d1da
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoReST API: Add API for Resources
Zane Bitter [Mon, 12 Nov 2012 16:42:37 +0000 (17:42 +0100)]
ReST API: Add API for Resources

Change-Id: I860349d03a2d7d034c600a129aead59964930b02
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoRPC API: Include less detail in resource list
Zane Bitter [Fri, 16 Nov 2012 11:10:21 +0000 (12:10 +0100)]
RPC API: Include less detail in resource list

Since the stack_list_resources command could be returning data for a large
number of resources, avoid returning the metadata and description (which
are not needed) to save space.

Change-Id: I4e3a46315952f8dd451410622de0d68423abbbf2
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoRefactor unit tests for ReST API
Zane Bitter [Fri, 16 Nov 2012 10:36:39 +0000 (11:36 +0100)]
Refactor unit tests for ReST API

This makes it easier to add tests for different controllers.

Change-Id: I549295ebdd9a41ca4c184c0ff242c805399656c5
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoReST API: Move remote error handler to utils module
Zane Bitter [Fri, 16 Nov 2012 09:58:34 +0000 (10:58 +0100)]
ReST API: Move remote error handler to utils module

Change-Id: Id3b99c62c01f1c22aa39518bb0f650d41f5975f0
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoRPC API: Return a resource identifier
Zane Bitter [Mon, 12 Nov 2012 16:42:37 +0000 (17:42 +0100)]
RPC API: Return a resource identifier

Change-Id: Ica33a82a8a201f625f293292e1ae7e5ca26559ef
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoAdd identifiers for resources
Zane Bitter [Mon, 12 Nov 2012 16:42:36 +0000 (17:42 +0100)]
Add identifiers for resources

Change-Id: I5d0477ba8ee681f14b0f54cf8fa4d8569d541f88
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoReST API: Refactor routes
Zane Bitter [Mon, 12 Nov 2012 16:42:36 +0000 (17:42 +0100)]
ReST API: Refactor routes

Change-Id: I2ab3c266ea814e791bc7fd955f8502ca862a92d5
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoheat engine : remove now-unused metadata rpc calls
Steven Hardy [Thu, 15 Nov 2012 11:28:30 +0000 (11:28 +0000)]
heat engine : remove now-unused metadata rpc calls

Remove metadata_(list|get)* calls, as these are no longer used by
heat-metadata hence are no-longer required

Change-Id: Ia67b9f329f628e3172bba24ff1b1192e8ec18079
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat workaround for HA/Autoscaling regression
Steven Hardy [Thu, 15 Nov 2012 10:03:46 +0000 (10:03 +0000)]
heat workaround for HA/Autoscaling regression

Interim workaround for HA/Autoscaling regression, caused by change of
scope for stack_get_by_name to be per-tenant, meaning we need to do a
brute-force lookup to find the stack entry when using the stored admin
context.

A better, more comprehensive (but more intrusive) fix is in-progress
but this at least returns us to the same functionality we had before

Note this means that all stacks using WatchRule still need to have names
unique accross all tenants.

bug 1078779

Change-Id: Iad1830d38262d1afb63cee16a3e366d9fd09acb4
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat dbapi rename stack_get_by_tenant
Steven Hardy [Thu, 15 Nov 2012 09:12:31 +0000 (09:12 +0000)]
heat dbapi rename stack_get_by_tenant

Rename stack_get_by_tenant to stack_get_all_by_tenant
This aligns better with other dbapi calls and better describes
the actual purpose of the call

Change-Id: If410220f8423f31718e6bcbfeca62a45c94c4d18
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoMerge "Allow stack.owner_id to store a uuid."
Jenkins [Wed, 14 Nov 2012 21:58:20 +0000 (21:58 +0000)]
Merge "Allow stack.owner_id to store a uuid."

12 years agoAllow stack.owner_id to store a uuid.
Steve Baker [Wed, 14 Nov 2012 20:11:47 +0000 (09:11 +1300)]
Allow stack.owner_id to store a uuid.

Fixes bug 1078854

Change-Id: I3dae1502968853d563ba52bc1d6656c48d5d18ba

12 years agoReST API: Split utilities into a separate module
Zane Bitter [Mon, 12 Nov 2012 16:42:36 +0000 (17:42 +0100)]
ReST API: Split utilities into a separate module

Change-Id: I140193db16b999255912f7013827b87b9ceb26e5
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoActually validate properties of resources
Zane Bitter [Mon, 12 Nov 2012 16:42:36 +0000 (17:42 +0100)]
Actually validate properties of resources

Properties.validate() returns an error on failure; it does not raise an
exception (and never has). So we should look at the return value when we
call it.

Change-Id: Iaa0deb9f54055b4b1f73c0b37d26f5ac2c00d683
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoGetting Started: Fix formatting errors
Zane Bitter [Wed, 14 Nov 2012 14:16:54 +0000 (15:16 +0100)]
Getting Started: Fix formatting errors

Change-Id: If174fe7f54caa227996d0d779b28be8eb2050888
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoheat templates : align autoscaling alarm descriptions with values
Steven Hardy [Tue, 13 Nov 2012 09:54:40 +0000 (09:54 +0000)]
heat templates : align autoscaling alarm descriptions with values

The description doesn't match the actual values for the alarms

Change-Id: I46201b75be075f4e4ac32d40031bc17b0786bb1f
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat engine : create boto config via instance userdata
Steven Hardy [Tue, 13 Nov 2012 09:48:49 +0000 (09:48 +0000)]
heat engine : create boto config via instance userdata

Create boto config via instance userdata, which the instance
cfntools can read instead of /etc/boto.cfg, avoids messy post
install sed-mangling in the templates

Change-Id: Ic94bfc2e362a3a3f93b9bdeaad6a5f988371346e
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat engine : append watch server url to instance userdata
Steven Hardy [Mon, 12 Nov 2012 18:31:16 +0000 (18:31 +0000)]
heat engine : append watch server url to instance userdata

Append url for watch server to instance userdata, which avoids
post-install sed mangling in the template, and will make it easier
to transparently switch to a different metric service

Change-Id: I59b9b7efcd75d44e88ebe0a116a9ce1e3ef20c14
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoDon't use OpenStack plugin in tox
Zane Bitter [Tue, 13 Nov 2012 17:19:12 +0000 (18:19 +0100)]
Don't use OpenStack plugin in tox

This plugin provides syntax colouring of the tox output, at the cost of no
longer reporting errors in test setup (instead it just reports no tests run
-> success).

Change-Id: Idf4f71a54af6303090d464b0846e563ac3776e4a
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoAlways filter by tenant_id in stack_get_by_name.
Steve Baker [Wed, 14 Nov 2012 03:23:12 +0000 (16:23 +1300)]
Always filter by tenant_id in stack_get_by_name.

This means that all calls to stack_get_by_name need to provide a context.

Without this change, 2 tenants cannot create stacks with the same name.

Change-Id: I98c35a5d51c5c7d66e0b8a0fddc04f221d1d6ab7

12 years agoAlign pip-requires versions with nova
Steve Baker [Tue, 13 Nov 2012 22:17:52 +0000 (11:17 +1300)]
Align pip-requires versions with nova

This should also make the unit tests run again by preventing
SqlAlchemy 8 from being used

Change-Id: I6fa92540dc3369b85d135232b10701937071cbd6

12 years agoheat align openstack/common with latest oslo-incubator
Steven Hardy [Tue, 13 Nov 2012 08:47:44 +0000 (08:47 +0000)]
heat align openstack/common with latest oslo-incubator

Pull in the latest oslo changes, we need the threadgroup fix
Fixes 1078064

Change-Id: I58cc94979558663d101a1a7b42446d1a9face6cf
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoModify identify_stack to check for uuid.
Steve Baker [Tue, 13 Nov 2012 01:30:15 +0000 (14:30 +1300)]
Modify identify_stack to check for uuid.

If the passed name matches a uuid then lookup by uuid instead of name.

Change-Id: I2058616ce0191aab4d364b652f1b20d072f6b258

12 years agoheat engine : Don't wait() for killed greenthreads
Steven Hardy [Mon, 12 Nov 2012 19:59:58 +0000 (19:59 +0000)]
heat engine : Don't wait() for killed greenthreads

We don't care about the return value of any killed threads on
delete_stack, and the greenthreads will all raise a GreenletExit
exception after being kill()'d anyway.
Also see related openstack-common fix : https://review.openstack.org/15906

Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoPass a Stack entity to Stack.load().
Steve Baker [Sun, 11 Nov 2012 19:38:38 +0000 (08:38 +1300)]
Pass a Stack entity to Stack.load().

Every call to Stack.load (except one) is loading models.Stack then passing just
the ID to Stack.load, which then loads models.Stack again.

As far as I can tell, SQLAlchemy doesn't have a 2nd level cache, so this results
in the db being queried twice.

This change makes it possibe to pass a stack *or* an ID to Stack.load, and
converts all calls to pass in a stack if it is available.

Change-Id: I501ebd403a241cc3b4a5c1e3070137cfc360bbda

12 years agoMerge "Switch to UUID for the Stack primary key."
Jenkins [Fri, 9 Nov 2012 11:16:05 +0000 (11:16 +0000)]
Merge "Switch to UUID for the Stack primary key."

12 years agoSwitch to UUID for the Stack primary key.
Steve Baker [Fri, 9 Nov 2012 02:45:06 +0000 (15:45 +1300)]
Switch to UUID for the Stack primary key.

For the migrate upgrade, existing integer keys remain and any subsequent stack
will be assigned a uuid.

For a migrate downgrade, it should work fine if there have been no stacks added
since ugrade. Added stacks will have their IDs 'truncated' back to an integer
which will require some manual fixup after downgrade.

Change-Id: Ib882bece911fcbc96fffab16a9f0e5ce3cb55fed

12 years agoAdd a list_stacks RPC call.
Steve Baker [Thu, 8 Nov 2012 19:43:23 +0000 (08:43 +1300)]
Add a list_stacks RPC call.

This differs from the old show_stack(None) by not resolving stack data.

heat list does not display any of the resolved stack data. Resolving outputs
can be especially slow since FnGetAtt may block while it calls out
to another service (such as with the quantum resources).

Without this change, running heat list on a single Quantum.template takes 1.8s
vs 0.7s.

In the future, list_stacks can be made to support paging of results.

Change-Id: Iae30338b66912d660f1cf48119893b1ab593b67a

12 years agoRename instance_id to resource_id.
Steve Baker [Thu, 8 Nov 2012 03:39:18 +0000 (16:39 +1300)]
Rename instance_id to resource_id.

The current naming gets increasingly inaccurate with every new resource ;)

Change-Id: I98629c7f8fd9c391f58c16ae1f6f2a7a232a2802

12 years agoMove client connection out of resources.py.
Steve Baker [Thu, 8 Nov 2012 02:49:19 +0000 (15:49 +1300)]
Move client connection out of resources.py.

Client connection references are currently cached at the resource instance
level, which doesn't seem very useful.

This change moves the client connection and caching to clients.py, then puts a
Clients instance in a Stack. This means that (for example) all requests to nova
in one stack will come from the same client instance.

Change-Id: I22519f8ae4278ad128d3785d090294285f3a1b89

12 years agoFix FnGetAtt id test
Steve Baker [Thu, 8 Nov 2012 02:41:25 +0000 (15:41 +1300)]
Fix FnGetAtt id test

12 years agoMerge "Fix cloud-init runcmd to be exec friendly"
Jenkins [Wed, 7 Nov 2012 21:18:54 +0000 (21:18 +0000)]
Merge "Fix cloud-init runcmd to be exec friendly"

12 years agoFix cloud-init runcmd to be exec friendly
Jeff Peeler [Wed, 7 Nov 2012 20:53:45 +0000 (15:53 -0500)]
Fix cloud-init runcmd to be exec friendly

Can't use colon builtin apparently, or you'll get this:
/var/lib/cloud/instance/scripts/runcmd: line 2:
 {setenforce 0 > /dev/null 2>&1 ||:: No such file or directory

Added cloud-init debug output to get the above, copied from:
http://bazaar.launchpad.net/~cloud-init-dev/cloud-init/trunk/view/head:/doc/examples/cloud-config-chef.txt

Change-Id: I341cf73bc9a0f843d7ab8c99a9d15e1d514654e7
Signed-off-by: Jeff Peeler <jpeeler@redhat.com>
12 years agoReplace KeyStoneCreds params with X-Auth headers.
Steve Baker [Tue, 6 Nov 2012 23:59:56 +0000 (12:59 +1300)]
Replace KeyStoneCreds params with X-Auth headers.

Username/password are now in X-Auth-User, X-Auth-Key

12 years agoMerge "A template which associates an instance with a Quantum port."
Jenkins [Tue, 6 Nov 2012 22:57:06 +0000 (22:57 +0000)]
Merge "A template which associates an instance with a Quantum port."

12 years agoMerge "Type is now mandatory. Boolean now exists."
Jenkins [Tue, 6 Nov 2012 22:55:42 +0000 (22:55 +0000)]
Merge "Type is now mandatory. Boolean now exists."

12 years agoMerge "Make Boolean property a bool type. Since json has a native bool type, allow...
Jenkins [Tue, 6 Nov 2012 22:54:01 +0000 (22:54 +0000)]
Merge "Make Boolean property a bool type. Since json has a native bool type, allow bool or string as the property value. Validating a Boolean type value will now convert a string to a bool."

12 years agoMerge "Quantum template to demonstrate floatingip."
Jenkins [Tue, 6 Nov 2012 22:52:52 +0000 (22:52 +0000)]
Merge "Quantum template to demonstrate floatingip."

12 years agoMerge "Cleanup runcmd to exit 0 and not use 'type'"
Jenkins [Tue, 6 Nov 2012 15:44:34 +0000 (15:44 +0000)]
Merge "Cleanup runcmd to exit 0 and not use 'type'"

12 years agoQuantum template to demonstrate floatingip.
Steve Baker [Tue, 6 Nov 2012 02:40:38 +0000 (15:40 +1300)]
Quantum template to demonstrate floatingip.

12 years agoMake Boolean property a bool type.
Steve Baker [Tue, 6 Nov 2012 02:38:53 +0000 (15:38 +1300)]
Make Boolean property a bool type.
Since json has a native bool type, allow bool or string as the property value.
Validating a Boolean type value will now convert a string to a bool.

Change-Id: Ia1843e0f56e5afb2914708e42b62f2063279317f

12 years agoA template which associates an instance with a Quantum port.
Steve Baker [Mon, 5 Nov 2012 23:51:01 +0000 (12:51 +1300)]
A template which associates an instance with a Quantum port.

12 years agoType is now mandatory. Boolean now exists.
Steve Baker [Mon, 5 Nov 2012 23:49:48 +0000 (12:49 +1300)]
Type is now mandatory. Boolean now exists.

This is required for Quantum resource types to work with new Properties.

12 years agoHandle list properties that do not contain objects
Zane Bitter [Tue, 30 Oct 2012 20:50:00 +0000 (21:50 +0100)]
Handle list properties that do not contain objects

The previous implementation of schema verfication on properties required
that the schema for the contents of a property list always be a map. Now
this is specified explicitly, so that in theory a property could also be a
list of Strings or Integers.

Change-Id: Icdd9a6c9f9b1e884f959c74f0803b7f3bd2aecc4
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoRemove the CheckedDict class
Zane Bitter [Mon, 5 Nov 2012 13:42:42 +0000 (14:42 +0100)]
Remove the CheckedDict class

Its functionality has been completely superceded by the new Properties
and Parameters implementations.

Change-Id: I33a1990ee543a189dd3ec8f22eec27e2b0514d09
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoUse new Parameters class in unit test
Zane Bitter [Mon, 5 Nov 2012 16:55:05 +0000 (17:55 +0100)]
Use new Parameters class in unit test

This test was still using the old CheckedDict implementation for
parameters.

Change-Id: I2ade5a81867d6b9f7517061e520da99575e8fbbd
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoGet rid of Resource.calculate_properties()
Zane Bitter [Mon, 5 Nov 2012 16:30:57 +0000 (17:30 +0100)]
Get rid of Resource.calculate_properties()

Use the new Properties class to lazily load property values so that we
always get the latest data, and get rid of the stateful hacks.

Change-Id: I02a1b927606da217d4adab1ca04b659abadda2ce
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoAdd a Properties implementation with lazy loading
Zane Bitter [Mon, 5 Nov 2012 13:28:14 +0000 (14:28 +0100)]
Add a Properties implementation with lazy loading

This will allow property values to be calculated on demand, rather than
stored as state.

Change-Id: I93fefa911b96c931cbf48b82b5a7ccc13ad99168
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoAvoid modifying the Properties of a Load Balancer
Zane Bitter [Mon, 5 Nov 2012 13:37:36 +0000 (14:37 +0100)]
Avoid modifying the Properties of a Load Balancer

Properties are defined by the template, and should not be modified. In this
case it was just as a convenience, since the value does not actually need
to be persisted beyond even the current call.

Change-Id: I6ca07989d246ec618b2ca5f051f8e614e24c81ae
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoFix schemata errors for properties
Zane Bitter [Mon, 5 Nov 2012 11:06:11 +0000 (12:06 +0100)]
Fix schemata errors for properties

In particular, Integer refers to a literal integer in the JSON markup:

  {"IntegerProperty": 42}

So use Number to refer to a string-encoded number:

  {"NumberProperty": "42"}

Change-Id: Id285ae6145ba888f59529207343d016fba3825eb
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoAdd a set of native quantum resource types.
Steve Baker [Mon, 29 Oct 2012 19:41:13 +0000 (08:41 +1300)]
Add a set of native quantum resource types.

The properties schemas map directly to the Quantum REST API, which makes
the implementation (and documentation) simpler.

The base class QuantumResource contains some default methods and
common utility functions.

templates/Quantum.template can be run without any parameters and only creates
network resources, no instances.

More example templates and tests will come later.

Change-Id: Ia270294440eeec5163e35009f6be0b5db9ad78c1

12 years agoRecursively replace all : with . in Output keys.
Steve Baker [Fri, 2 Nov 2012 04:07:47 +0000 (17:07 +1300)]
Recursively replace all : with . in Output keys.

This is needed so that some Quantum properties with colons in the keys are not
interpreted as xml namespaces.

Change-Id: Iba5290a408595b2f028744c10315daac29da055e

12 years agoMerge "Rename heat client to heat-cfn."
Jenkins [Sun, 4 Nov 2012 23:51:39 +0000 (23:51 +0000)]
Merge "Rename heat client to heat-cfn."

12 years agoRename heat client to heat-cfn.
Steve Baker [Sun, 4 Nov 2012 20:29:35 +0000 (09:29 +1300)]
Rename heat client to heat-cfn.

This is to allow python-heatclient to eventually become the default heat
client.

Documentation in heat.wiki will be updated to refer to heat-cfn when this
change is pushed.

Change-Id: I2209c36adf41fa5d0df0caf9200f7fedbdd51805

12 years agoUpdate openstack-common, add network_utils.
Steve Baker [Sun, 4 Nov 2012 22:05:04 +0000 (11:05 +1300)]
Update openstack-common, add network_utils.

This is required by impl_kombu.py. The engine failed to start without it.

12 years agoUse openstack-common service.py
Angus Salkeld [Fri, 2 Nov 2012 11:02:00 +0000 (22:02 +1100)]
Use openstack-common service.py

Change-Id: Idbc145209c039e9362cf97c9926e050f809ef0fa

12 years agoMerge "Add service.py from openstack-common"
Jenkins [Fri, 2 Nov 2012 09:47:52 +0000 (09:47 +0000)]
Merge "Add service.py from openstack-common"

12 years agoMerge "Update openstack-common"
Jenkins [Fri, 2 Nov 2012 09:47:33 +0000 (09:47 +0000)]
Merge "Update openstack-common"

12 years agoheat templates : Align AutoScaling template with cfntools
Steven Hardy [Fri, 2 Nov 2012 08:57:52 +0000 (08:57 +0000)]
heat templates : Align AutoScaling template with cfntools

Updated cfntools require authentication for cfn-push-stats,
so the AutoScaling template needs the user/key and boto.cfg
additions, same as in the HA templates, otherwise cfn-push-stats,
and hence autoscaling doesn't work

Change-Id: Ib3ef4a932bb656f29e25ef745409f5fe3e82c356
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoAdd service.py from openstack-common
Angus Salkeld [Thu, 1 Nov 2012 03:17:15 +0000 (14:17 +1100)]
Add service.py from openstack-common

Change-Id: Ia4996d89d0fdba6dbeb44ae4cf3ca202c78886ee

12 years agoUpdate openstack-common
Angus Salkeld [Thu, 1 Nov 2012 03:00:41 +0000 (14:00 +1100)]
Update openstack-common

Change-Id: I3abd011729f413dbd20806f54c9ae6963641d59a

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>