]>
review.fuel-infra Code Review - openstack-build/heat-build.git/log
Angus Salkeld [Thu, 19 Jul 2012 08:35:59 +0000 (18:35 +1000)]
Allow nested stacks to be retrieved by name
When getting the stack by name in the metadata server
we don't know the owner_id so allow retrieval just by name.
I suspect this will be a short term solution until we get proper
stack names.
Change-Id: I8845b2b33a5bae30aae66c06af01c1a27c990305
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Jenkins [Wed, 18 Jul 2012 11:58:09 +0000 (11:58 +0000)]
Merge "Don't require user params on template validation"
Tomas Sedovic [Wed, 18 Jul 2012 11:34:03 +0000 (13:34 +0200)]
Use eventlet's wsgi again
Ref #55
This adds a monkey patch for the eventlet's maximum url length issue (ref #18).
With it, we can use eventlet as our wsgi server again.
Once Eventlet releases a new version (the fix is already in master) we'll drop
the monkey patch and set the limit proper.
Change-Id: Ia122af8d53b49587ade0ead6897fdd10107f4a87
Signed-off-by: Tomas Sedovic <tomas@sedovic.cz>
Tomas Sedovic [Thu, 12 Jul 2012 16:04:54 +0000 (18:04 +0200)]
Don't require user params on template validation
Fixes #161
Change-Id: Ia7e1a83043f8d175e320bfd52aa64cb6f62ead90
Signed-off-by: Tomas Sedovic <tomas@sedovic.cz>
Angus Salkeld [Wed, 18 Jul 2012 02:09:22 +0000 (12:09 +1000)]
tools: erase openstack-utils only after using it.
else we just get: "sudo: openstack-db: command not found"
Change-Id: Iaad3353a7f3c64fe8fbb2f0686c24e97467efb66
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Steven Dake [Wed, 18 Jul 2012 00:38:50 +0000 (17:38 -0700)]
Update openstack-common
Change-Id: I2d7e169adb9205faa109634a9ae15a9f34e4bd75
Signed-off-by: Steven Dake <sdake@redhat.com>
Zane Bitter [Tue, 17 Jul 2012 18:55:10 +0000 (14:55 -0400)]
Erase openstack-utils when uninstalling OpenStack
Change-Id: I219a57fdd1b600f185cafdb31d611f16c92698c9
Signed-off-by: Zane Bitter <zbitter@redhat.com>
Steven Hardy [Tue, 17 Jul 2012 16:33:49 +0000 (17:33 +0100)]
heat : update config files with new rpc backend
heat-engine.conf, heat-api.conf, heat-metadata.conf
should have:
rpc_backend=heat.openstack.common.rpc.impl_qpid
to work with the reworked rpc code.
Change-Id: I2e5b136240db2fe8f6dfad27da7e31b2a5053a1c
Signed-off-by: Steven Hardy <shardy@redhat.com>
Steven Dake [Tue, 17 Jul 2012 15:27:19 +0000 (08:27 -0700)]
Import openstack.common.rpc
Use openstack.common routines. One of the parameters changed to
create_consumer().
Thanks to Russell Bryant for assistance with sorting out that problem.
Change-Id: I4badc7ca22298cd0aafc57a2335b3d6801289be8
Signed-off-by: Steven Dake <sdake@redhat.com>
Steven Dake [Tue, 17 Jul 2012 14:17:20 +0000 (07:17 -0700)]
Use global cfg.CONF instead of config classes
Importing rpc.common requires the use of the global cfg.CONF.
In fact, most of common requires the use of this global. This
patch removes all the object specific access to config options
and directly accesses the global in prep for rpc openstack-common
import.
Change-Id: I5989a436964c199df0dc38dbb191dc3d867e5ce7
Signed-off-by: Steven Dake <sdake@redhat.com>
Zane Bitter [Mon, 16 Jul 2012 20:59:41 +0000 (16:59 -0400)]
Get rid of eval() in authentication code
This was not secure. Pass the auth data in JSON format rather than as a
serialised Python object.
Fixes #124
Change-Id: I8e1e9aef790b0af026da2a2d6194da19345be8b0
Signed-off-by: Zane Bitter <zbitter@redhat.com>
Steven Hardy [Tue, 10 Jul 2012 17:13:23 +0000 (18:13 +0100)]
heat engine/API : Internal API rework
Refactor engine-api code so that AWS specific
details like key names are handled in the API
Fixes #172
Change-Id: I4c5b153557216c03e5a98193e54cf75e3c7b97dd
Signed-off-by: Steven Hardy <shardy@redhat.com>
Jenkins [Mon, 16 Jul 2012 03:08:41 +0000 (03:08 +0000)]
Merge "Import openstack.common.log and use inside heat infrastructure"
Zane Bitter [Sun, 15 Jul 2012 21:04:45 +0000 (17:04 -0400)]
Account for XML output in Getting Started script
The output format of heat commands has changed from JSON to XML
Change-Id: I68b4011e31fdb14306e88506dc6ff819b041b054
Signed-off-by: Zane Bitter <zbitter@redhat.com>
Zane Bitter [Sun, 15 Jul 2012 20:18:23 +0000 (16:18 -0400)]
Fix directory changes in Getting Started script
Change-Id: I3b23b2c0de18d72f91d4a0254e9dbf689ac91be3
Signed-off-by: Zane Bitter <zbitter@redhat.com>
Zane Bitter [Sun, 15 Jul 2012 20:18:22 +0000 (16:18 -0400)]
Allow non-interactive installation of OpenStack
Pass the arguments to the tools/openstack script through to openstack-db so
that scripts can use e.g. --yes and --rootpw.
Also use openstack-db --drop rather than heat-db-drop to drop the databases
for OpenStack services.
Change-Id: I87811ee02d3bfd7cc2dca8b9ab20ea3cfc220e3e
Signed-off-by: Zane Bitter <zbitter@redhat.com>
Zane Bitter [Fri, 1 Jun 2012 12:42:12 +0000 (14:42 +0200)]
Document Metadata server in Getting Started guide
Change-Id: Id0995df10f329ee3076a2c60ed5eb1548eaa315a
Signed-off-by: Zane Bitter <zbitter@redhat.com>
Steven Dake [Sat, 14 Jul 2012 19:18:32 +0000 (12:18 -0700)]
Import openstack.common.log and use inside heat infrastructure
Allows heat to match openstack-common log calling conventions such
as using a context object or instance UUID for better traceability.
Change-Id: Idaa6c04270d9d7143c85988d685c0f9e241b635b
Signed-off-by: Steven Dake <sdake@redhat.com>
Steven Dake [Fri, 13 Jul 2012 22:30:03 +0000 (15:30 -0700)]
Update openstack-common in prep for pulling in common.rpc
Change-Id: Ib3444d97967c807cb96175ce23d4b670a028e9a7
Signed-off-by: Steven Dake <sdake@redhat.com>
Zane Bitter [Fri, 13 Jul 2012 20:46:20 +0000 (16:46 -0400)]
Set the stack updated time through the Timestamp
Don't allow the resource class to modify the parent stack's database
representation directly.
Change-Id: Iff93d1430f4cb0695e729d0cf8f784ccb2ed7598
Signed-off-by: Zane Bitter <zbitter@redhat.com>
Zane Bitter [Fri, 13 Jul 2012 20:46:20 +0000 (16:46 -0400)]
Eliminate DB access from the engine API
Access all data through the Stack and Resource objects.
Fixes #168
Change-Id: I0331a0ad67bcd11bb678e026ddc7b7c954517bc4
Signed-off-by: Zane Bitter <zbitter@redhat.com>
Zane Bitter [Fri, 13 Jul 2012 20:46:19 +0000 (16:46 -0400)]
Make timestamps available in Stack/Resource objects
Provide the creation time and last-updated time as attributes of Stack and
Resource objects so that external code does not need to access the database
in order to retrieve them. Use a Descriptor class so that the latest values
are always fetched from the database.
Change-Id: Ic3fa173b1dc8f2e5dc676a9152e8928ed2290913
Signed-off-by: Zane Bitter <zbitter@redhat.com>
Steven Hardy [Fri, 13 Jul 2012 15:08:53 +0000 (16:08 +0100)]
heat cli : Manpage updates
The heat cli tool manpage had very little information,
this adds detail to the existing page and copies a version
of this page to cover the heat-boto version of the tool.
Change-Id: I5b64466878b719b49a9084f301b2c177ddef9a91
Signed-off-by: Steven Hardy <shardy@redhat.com>
Steven Hardy [Fri, 13 Jul 2012 09:31:42 +0000 (10:31 +0100)]
heat engine : fix create_stack response format
create_stack response is broken now the StackId formatting
is done in the API, modify response format to fix.
Change-Id: I013bdb5ed992ce735905225cc4415fc0cfc5ce92
Signed-off-by: Steven Hardy <shardy@redhat.com>
Steven Hardy [Thu, 12 Jul 2012 16:46:46 +0000 (17:46 +0100)]
heat API : Add missing StackId prefixes
Align event-list and resource-list-details with
other calls which add a AWS-style prefix to the
StackId response element
Change-Id: I0b1951068448d141e04ddca44f1d4188d3dff360
Signed-off-by: Steven Hardy <shardy@redhat.com>
Steven Hardy [Thu, 12 Jul 2012 16:37:37 +0000 (17:37 +0100)]
heat engine : move StackId formatting into API
Move AWS specific StackId formatting into the API
Ref #172
Change-Id: I02f964b63c0489800300d8db92e1c800286c4bd3
Signed-off-by: Steven Hardy <shardy@redhat.com>
Steven Dake [Thu, 12 Jul 2012 15:38:51 +0000 (08:38 -0700)]
Block on instance delete until delete operation completes
Fixes issue #160
During deletion of a stack, following would occur:
delete stack
delete instance
delete eip or security group
When the last operation occurred, the instance is still present in OpenStack
making a deletion of EIP or security groups not work properly. Serialize
the operations in resources.
Change-Id: I6e1613f5a6f5db485dd8a5f381d7a96afb58188b
Signed-off-by: Steven Dake <sdake@redhat.com>
Steven Hardy [Thu, 12 Jul 2012 11:56:44 +0000 (12:56 +0100)]
heat engine : Store stack timeout in database
Store the TimeoutInMinutes common query parameter
value in the DB so it can be returned correctly
with show_stack/DescribeStacks
ref #125
Change-Id: I4ccc79b586087f61e415d5d2c24b7bd52844399a
Signed-off-by: Steven Hardy <shardy@redhat.com>
Jenkins [Thu, 12 Jul 2012 10:25:14 +0000 (10:25 +0000)]
Merge "Update JEOS example in Getting Started"
Tomas Sedovic [Thu, 12 Jul 2012 09:52:02 +0000 (11:52 +0200)]
Display better message on Keystone failure
Fixes #148
When there's something wrong with Keystone, Heat reported a rather cryptic
message. Now it indicates that the problem is with Keystone and passes
its response to the user.
Change-Id: I791b5bdfa68faa1b17daa67b911253d8bf8a2bb8
Signed-off-by: Tomas Sedovic <tomas@sedovic.cz>
Zane Bitter [Wed, 11 Jul 2012 19:12:23 +0000 (15:12 -0400)]
Speed up metadata server registration
If heat-engine and heat-metadata were started at approximately the same
time, such that heat-engine was not ready to receive the registration call
from heat-metadata on the first attempt, it would take a minute before the
next retry. Instead, start with a very short timeout (2s) and increase it
if the engine does not show up.
Fixes #159
Change-Id: Ie2efcce667f1dde9ae227a4bb19a1d6a2b7cf135
Signed-off-by: Zane Bitter <zbitter@redhat.com>
Zane Bitter [Tue, 10 Jul 2012 22:21:56 +0000 (18:21 -0400)]
Fix the WordPress puppet template syntax
The template was not valid JSON due to an apparent copy-and-paste error.
Change-Id: I5fb4afe6597b2f469fb5219494feb745d083bf52
Signed-off-by: Zane Bitter <zbitter@redhat.com>
Zane Bitter [Thu, 5 Jul 2012 12:12:46 +0000 (14:12 +0200)]
Optimise DB lookups by ID
SQLAlchemy caches objects in the database per-session, but cannot cache
queries. A query just generates a list of object primary keys, which is
then used to fetch the corresponding objects from the cache (if possible)
or database. Therefore a query which filters by primary key is a waste of
time, since it just returns (surprise!) the key we started off with. If we
have the primary key (in this case the id field), just look up the object.
Change-Id: I7123c12372b26c0e1b91b2496921c54d9d992cd8
Signed-off-by: Zane Bitter <zbitter@redhat.com>
Zane Bitter [Tue, 10 Jul 2012 21:53:58 +0000 (17:53 -0400)]
Raise the correct error when a stack is not found
Change-Id: Ia96d7b96f61e48d20ab080395365e770cf5bb1a8
Signed-off-by: Zane Bitter <zbitter@redhat.com>
Zane Bitter [Wed, 11 Jul 2012 15:02:13 +0000 (11:02 -0400)]
Access Resource metadata through the new attribute
Get rid of all the other code that was accessing this directly from the
database and use only the Metadata descriptor.
Change-Id: I36a7a00878d0b65f58ba282ebad78f77b37c4d07
Signed-off-by: Zane Bitter <zbitter@redhat.com>
Zane Bitter [Tue, 3 Jul 2012 16:17:05 +0000 (18:17 +0200)]
Add a helper class for metadata
With this patch we can now access resource metadata through the 'metadata'
attribute and have it always fetch the latest data from the database. This
reduces the chance of accidentally accessing stale data (due to the
metadata being updated in a different database session via the metadata
server) by providing a single implementation to access it through.
Change-Id: Id411ae891d3eace746d16008a7d58bb19b4f652d
Signed-off-by: Zane Bitter <zbitter@redhat.com>
Zane Bitter [Wed, 11 Jul 2012 14:54:41 +0000 (10:54 -0400)]
Add unit tests for metadata read/write in heat-engine API
Change-Id: I2b745a00a2110c794f6228976d3ed1cb9cf59d5f
Signed-off-by: Zane Bitter <zbitter@redhat.com>
Zane Bitter [Wed, 11 Jul 2012 14:41:40 +0000 (10:41 -0400)]
Avoid unneccesary template parsing
Only parse the parts of the resource template that we need.
Change-Id: I4628e699452dc390848fc15197a5e04a3095399a
Signed-off-by: Zane Bitter <zbitter@redhat.com>
Zane Bitter [Wed, 11 Jul 2012 14:37:47 +0000 (10:37 -0400)]
Allow partial template parsing
Make it possible to only parse the section we need when generating the
parsed template for a resource.
Change-Id: Ib4216d8d7bfdbca81f43690b6e8c53c15c71a232
Signed-off-by: Zane Bitter <zbitter@redhat.com>
Zane Bitter [Mon, 9 Jul 2012 18:23:31 +0000 (14:23 -0400)]
Rename resource_id to resource_name in metadata API
This more accurately reflects what the parameter is, which is just the name
of the resource within the specified stack.
Change-Id: I6bc26c0046e0493c3b98c5753c04cc5a314678d7
Signed-off-by: Zane Bitter <zbitter@redhat.com>
Zane Bitter [Fri, 6 Jul 2012 18:40:00 +0000 (20:40 +0200)]
Report errors from nested stacks
If creation of a nested stack fails, we need to raise an exception so that
creation of the nested stack resource (and hence the enclosing stack) also
fails.
Change-Id: Ic5eda7f8d044ed2c87fc0e785b1cd8fcf78071a4
Signed-off-by: Zane Bitter <zbitter@redhat.com>
Zane Bitter [Wed, 11 Jul 2012 13:53:40 +0000 (09:53 -0400)]
Speed up engine manager unit tests
Refactor the engine manager unit tests so that they all use a single stack
that is only set up once. This makes the tests run a lot faster, and also
makes them easier to write. Both should encourage increased testing.
Change-Id: I50d2ffff393d4049459c5c30e408961681c189c7
Signed-off-by: Zane Bitter <zbitter@redhat.com>
Jenkins [Wed, 11 Jul 2012 12:31:53 +0000 (12:31 +0000)]
Merge "Add DB refresh/expire on specific parameters"
Jenkins [Wed, 11 Jul 2012 12:27:04 +0000 (12:27 +0000)]
Merge "Allow Status(Reason) access through Stack/Resource objects"
Tomas Sedovic [Wed, 11 Jul 2012 10:42:58 +0000 (12:42 +0200)]
Update JEOS example in Getting Started
The heat-jeos usability branch has merged into master and the command
syntax for building new images is now a bit different.
Signed-off-by: Tomas Sedovic <tomas@sedovic.cz>
Change-Id: Ibd4e308fe6ef4d690b0408d59d8a9539a5c81f96
Steven Hardy [Tue, 10 Jul 2012 12:56:41 +0000 (13:56 +0100)]
heat cli : Align resource-list-details usage with other commands
Align resource-list-details usage with the other heat commands,
and provide better usage info on failure
Fixes #156
Change-Id: Id80b377151eca64e5f7dbfb436f5a5da5213c8b3
Signed-off-by: Steven Hardy <shardy@redhat.com>
Steven Hardy [Mon, 9 Jul 2012 16:54:59 +0000 (17:54 +0100)]
heat API: bugfix to XMLResponseSerializer
JSON wrapped in XML responses needs to be serialized
with json.dumps not str() or quotes get mangled and
json.loads fails to parse the result
Change-Id: I65c6ddf0be383e71bf8d05e7293b514269a27213
Signed-off-by: Steven Hardy <shardy@redhat.com>
Steven Hardy [Mon, 9 Jul 2012 13:58:08 +0000 (14:58 +0100)]
heat engine: raise appropriate error on bad stack name
Raise an AttributeError when called with a bad stack name,
this then maps to the appropriate HeatInvalidParameterValueError
Change-Id: Ic11142e95166ade380c2ad8741ed7063684214fb
Signed-off-by: Steven Hardy <shardy@redhat.com>
Zane Bitter [Fri, 6 Jul 2012 15:13:09 +0000 (17:13 +0200)]
Add DB refresh/expire on specific parameters
Previously we could only refresh or expire the entire object.
Change-Id: I2207349d6ffff435538a577943316cd13e7f1355
Signed-off-by: Zane Bitter <zbitter@redhat.com>
Zane Bitter [Fri, 6 Jul 2012 15:03:17 +0000 (17:03 +0200)]
Allow Status(Reason) access through Stack/Resource objects
It would be better not to have to go looking in the database for this
information, so cache it in the Stack/Resource objects themselves.
Change-Id: Id96fbd229898fecc8917a61f19480f70fc2135d9
Signed-off-by: Zane Bitter <zbitter@redhat.com>
Zane Bitter [Fri, 6 Jul 2012 15:03:17 +0000 (17:03 +0200)]
Rename test_resources to test_instance
Since that's what it's actually testing.
Change-Id: I03556778587e4b1b3a38bf755137eef08455e8f3
Signed-off-by: Zane Bitter <zbitter@redhat.com>
Steven Hardy [Thu, 5 Jul 2012 20:53:36 +0000 (21:53 +0100)]
heat API : Return auth errors in AWS format
Update EC2 authentication code to return HeatAPIException
subclasses, so the API error response on auth failure is
aligned with AWS responses.
ref #125
Change-Id: Iafa33e7aed4d77f2255b4d879192b9d15a2395aa
Signed-off-by: Steven Hardy <shardy@redhat.com>
Steven Hardy [Thu, 5 Jul 2012 20:51:55 +0000 (21:51 +0100)]
heat : heat-boto remove boto.cfg reading
Remove code directly reading boto.cfg, looks like the problem
with boto not reading the config file internally is fixed upstream
Signed-off-by: Steven Hardy <shardy@redhat.com>
Change-Id: I57e1d89d0fa83793d51d5cf6266c200d7abc7d57
Zane Bitter [Fri, 6 Jul 2012 12:33:19 +0000 (14:33 +0200)]
Separate out formatting for Engine API from manager
Change-Id: Ib5fc28bc6a3a2f1f3c0d291954e928d4fb036bbb
Signed-off-by: Zane Bitter <zbitter@redhat.com>
Zane Bitter [Fri, 6 Jul 2012 13:07:46 +0000 (15:07 +0200)]
Add new assertions about event unit tests
Change-Id: I5a7d4690fe752c053a08ecfdb4f0467026fdd245
Signed-off-by: Zane Bitter <zbitter@redhat.com>
Angus Salkeld [Fri, 6 Jul 2012 06:57:48 +0000 (16:57 +1000)]
Add basic autoscaling.
This is mainly for ppetit so he can create multiple
resources with one stack.
Use like this:
heat create lots -f ./templates/ppetit.template --parameters="KeyName=${USER}_key;NumInstances=2"
Change-Id: Ie609a1843c855953d65183a8f2d8ed49254a265f
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Angus Salkeld [Fri, 6 Jul 2012 08:10:57 +0000 (18:10 +1000)]
Add NovaSchedulerHints and correct the implementation of Tags
Change-Id: Iaa7ea182414a8fc48a78f5aa6c2c3e1baddb4034
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Steven Hardy [Thu, 5 Jul 2012 15:58:19 +0000 (16:58 +0100)]
heat tools : openstack script don't create duplicate pv's
Don't create duplicate loopback mounts if nova-volumes VG
already exists
Change-Id: I1c580f2915cd92709fbbf4033f77ec3c64e4952e
Signed-off-by: Steven Hardy <shardy@redhat.com>
Steven Hardy [Thu, 5 Jul 2012 15:57:20 +0000 (16:57 +0100)]
heat tools : openstack script add restart option
Add option to restart openstack
Change-Id: I7578ff4cecae5351d5749272424d71b56071239d
Signed-off-by: Steven Hardy <shardy@redhat.com>
Steven Hardy [Thu, 5 Jul 2012 15:39:57 +0000 (16:39 +0100)]
heat tools : whitespace cleanup in tools/openstack
Convert mixed tabs/spaces to all spaces
Change-Id: I3c75ead59afad8a7edf24d8fc6c1c0484dbcd3eb
Signed-off-by: Steven Hardy <shardy@redhat.com>
Steven Hardy [Thu, 5 Jul 2012 13:42:53 +0000 (14:42 +0100)]
heat tests : Add missing headers to tests
Most of the tests lacked the apache licence boilerplate
Change-Id: I34ed0066a6f6751fc872f5286acfc7550319bc8f
Signed-off-by: Steven Hardy <shardy@redhat.com>
Steven Hardy [Thu, 5 Jul 2012 13:15:37 +0000 (14:15 +0100)]
heat API : cleanup docstrings
Fix some API docstring formatting & content
Change-Id: Iad1646bb91ae501110ee20a5820ffc5c168bcc45
Signed-off-by: Steven Hardy <shardy@redhat.com>
Jenkins [Thu, 5 Jul 2012 16:53:06 +0000 (16:53 +0000)]
Merge "Add more unit tests for the engine API"
Jenkins [Thu, 5 Jul 2012 14:18:35 +0000 (14:18 +0000)]
Merge "Pass Tags into scheduler_hints"
Angus Salkeld [Thu, 5 Jul 2012 13:44:05 +0000 (23:44 +1000)]
Add monitoring to the loadbalancer
This makes use of haproxy's unix socket api
to get statistics. This is retrieved by cfn-push-stats
and posted to the watch.
Change-Id: I662293bf5dbc55e3f9106f7ef0ceb0641ddae564
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Jenkins [Thu, 5 Jul 2012 13:17:35 +0000 (13:17 +0000)]
Merge "heat tools : heat-db-drop prompt for missing password"
Angus Salkeld [Thu, 5 Jul 2012 05:42:08 +0000 (15:42 +1000)]
Add an OpenShift template.
This is based off of http://www.krishnaraman.net/openshift-origin-on-openstack/
This is the broker, the node is TODO (but simpler).
Change-Id: I5d500a460e43de1172aa7636d9b94f590a979d97
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Angus Salkeld [Thu, 5 Jul 2012 11:18:26 +0000 (21:18 +1000)]
Pass Tags into scheduler_hints
Change-Id: Idad6090c7baf0db943c999585dfe3bf33fc9492e
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Steven Hardy [Thu, 5 Jul 2012 09:46:53 +0000 (10:46 +0100)]
heat tools : heat-db-drop prompt for missing password
heat-db-drop fails to drop databases when called via
tools/openstack erase, so prompt for password when
not passed as a CLI argument.
Change-Id: I4930b8457e0f3e1488187b35be9737578595c387
Signed-off-by: Steven Hardy <shardy@redhat.com>
Steven Hardy [Wed, 4 Jul 2012 14:41:20 +0000 (15:41 +0100)]
heat API : Convert API to use HeatAPIException subclasses
Covert API to use HeatAPIException subclasses, instead of
plain webob exceptions, which cannot be correctly serialized
by the wsgi controller, and map engine errors to API exceptions
so the raw engine exception is not propogated to the user.
ref #125
fixes #150
Change-Id: I164c71e12ed29f40ad67188b645ca7ad2fa1fee8
Signed-off-by: Steven Hardy <shardy@redhat.com>
Steven Hardy [Wed, 4 Jul 2012 10:45:38 +0000 (11:45 +0100)]
heat API : Implement API specific exceptions
Implement HeatAPIException and subclasses, which will return error
responses serialized in the correct AWS API format when thrown
ref #125
Change-Id: I9039f181ee64ed59445667f50545dc6481973cb2
Signed-off-by: Steven Hardy <shardy@redhat.com>
Steven Hardy [Fri, 29 Jun 2012 13:11:14 +0000 (14:11 +0100)]
heat : add heat-boto test client
Add initial version of the heat cli tool which uses boto
- revised following review comments to remove jeos/cfn paths
ref #92
Change-Id: I61b5815b250f3b01d33844ff46dd1612000d51fd
Signed-off-by: Steven Hardy <shardy@redhat.com>
Zane Bitter [Wed, 4 Jul 2012 14:16:16 +0000 (16:16 +0200)]
Add more unit tests for the engine API
Verify the following endpoints:
- list_stack_resources
- describe_stack_resources
- describe_stack_resource
Additionally, check for presence of the correct output keys from the
following endpoints:
- list_stacks
- show_stack
Note that some tests are commented out because they are currently failing.
This will be fixed in a future patch.
Change-Id: I1c8c46283c1217789e3d4dea7aeac11c991bcef4
Signed-off-by: Zane Bitter <zbitter@redhat.com>
Zane Bitter [Tue, 3 Jul 2012 15:11:12 +0000 (17:11 +0200)]
Store the context in the resources
It's a pain to have to look it up in the stack every time
Change-Id: I655260aafd17bc17b5895f5b53d79b20aa8eecbb
Signed-off-by: Zane Bitter <zbitter@redhat.com>
Zane Bitter [Tue, 3 Jul 2012 13:04:39 +0000 (15:04 +0200)]
Add Metadata to detailed Resource output
Change-Id: I492b9a0a190a905ca5c8597c7236ad1d130a5b77
Signed-off-by: Zane Bitter <zbitter@redhat.com>
Zane Bitter [Tue, 3 Jul 2012 12:55:30 +0000 (14:55 +0200)]
Use a consistent stack ID
Generate the StackId field of various API responses in the same place, so
it is consistent and can be easily modified later.
Change-Id: I09a3e170b5825533d8cf9c7dbf08a0ef6700a682
Signed-off-by: Zane Bitter <zbitter@redhat.com>
Zane Bitter [Tue, 3 Jul 2012 11:02:03 +0000 (13:02 +0200)]
Make Stacks the owners of their own DB representation
Change the way that Stack objects are initialised, so that they know how to
load and store themselves in the database (they were already updating their
own data, but the actual creation was being done externally). This
consolidates a lot of existing Stack database creation code (in the
manager, nested stacks and unit tests) into one place.
Also, split the template and parameter handling out into separate classes,
and pass these through the constructor for easier testing.
Change-Id: I65bec175191713d0a4a6aa1d3d5442a1b64042f8
Signed-off-by: Zane Bitter <zbitter@redhat.com>
Zane Bitter [Tue, 3 Jul 2012 10:41:40 +0000 (12:41 +0200)]
Don't store the metadata server address in the Stack
It is basically a global piece of data, so there is nothing to be gained by
dragging some extra state around with us everywhere.
Change-Id: I50ba7391f258dc7d9b1e186f1618fb140e15b26e
Signed-off-by: Zane Bitter <zbitter@redhat.com>
Zane Bitter [Tue, 3 Jul 2012 10:32:02 +0000 (12:32 +0200)]
Delete user creds from DB when no longer required
The user credentials are only for a particular stack and should be deleted
when that stack is deleted.
Fixes #162.
Change-Id: Id5d1f101df17ede1843e4f2fca51903c956667ca
Signed-off-by: Zane Bitter <zbitter@redhat.com>
Zane Bitter [Tue, 3 Jul 2012 12:03:47 +0000 (14:03 +0200)]
Remove parsed template from database
It is no longer used since we now store the parameters and can recreate the
parsed template from the raw template.
Change-Id: Id725bcde7b30ce33d122ccf9c6d5c571f7d754da
Signed-off-by: Zane Bitter <zbitter@redhat.com>
Zane Bitter [Tue, 3 Jul 2012 16:56:22 +0000 (18:56 +0200)]
Make LoadBalancer a subclass of a nested stack
This avoids duplicating the code for dealing with the nested stack
instance.
Change-Id: Iaeb96f6184cc39677be81bb5619c1fc3e3c9a2a2
Signed-off-by: Zane Bitter <zbitter@redhat.com>
Zane Bitter [Tue, 3 Jul 2012 09:25:33 +0000 (11:25 +0200)]
Use unittest assert*() methods instead of assert keyword
This gives much more useful messages when something fails
Change-Id: Ibdf22996e674beef6edabfd3f7ef7d2213b6f26c
Signed-off-by: Zane Bitter <zbitter@redhat.com>
Andrew Hutchings [Wed, 4 Jul 2012 12:27:45 +0000 (13:27 +0100)]
Switch .gitreview to use OpenStack
Change-Id: I47f98c5b68bffb0f547a1ca95e745dd2c4665dad
Angus Salkeld [Tue, 3 Jul 2012 04:55:56 +0000 (14:55 +1000)]
Add the loadbalancer resource.
Some initial simplifications:
- only one Listener
- static (only use Instances)
- only http (no tcp or ssl)
Ref #164
Change-Id: Iaac06eff83a5c43049adc95a98ebe632e17b490c
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Angus Salkeld [Mon, 2 Jul 2012 03:10:59 +0000 (13:10 +1000)]
Add the Fn::GetAZs() intrinsic function.
This just returns 'nova' right now.
Change-Id: I5449123b912da0f2aaca8a16aee78d391db033dd
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Angus Salkeld [Mon, 2 Jul 2012 01:23:32 +0000 (11:23 +1000)]
Teach CheckedSchema to do nested schemas
Change-Id: Ie321fcded8c826ca98c15078d9a545f283d25510
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Jenkins [Mon, 2 Jul 2012 18:16:21 +0000 (18:16 +0000)]
Merge "Bump to v5"
Steven Hardy [Mon, 2 Jul 2012 13:04:33 +0000 (14:04 +0100)]
heat API : Add missing Response wrappers
It's not clear from the AWS API docs, but all responses
should be wrapped in ActionNameResponse tags.
ref #125
Change-Id: I25f3860f30b7313ce63019e96d1da4e370552ed6
Signed-off-by: Steven Hardy <shardy@redhat.com>
Steven Hardy [Fri, 29 Jun 2012 12:08:47 +0000 (13:08 +0100)]
heat API : Make CreateStack work with boto
Further API rework to make stack creation work via boto
- Use webob.request.params not GET, as boto passes POST parameters in body
- Wrap CreateStack response in CreateStackResponse as expected by boto
- Add API debug for JSON format responses
- (second version in stackforge due to long-line fix)
ref #125
Change-Id: I347368ee0395a9019fae69a06e45260379ed7722
Signed-off-by: Steven Hardy <shardy@redhat.com>
Zane Bitter [Fri, 29 Jun 2012 08:52:41 +0000 (10:52 +0200)]
Add unit tests for timeout extraction
Change-Id: I87837b78dc04683aa686f0573bb7b643667c4553
Signed-off-by: Zane Bitter <zbitter@redhat.com>
Steven Hardy [Mon, 25 Jun 2012 15:38:51 +0000 (16:38 +0100)]
heat API : DescribeStacks return all when no stack name specified
The AWS DescribeStacks API documentation says if no stack name specified,
we should return results for all stacks created.
fixes #142
Change-Id: I3d17fef7f1b660bf399e8ff82ff39ca2b2d6f046
Signed-off-by: Steven Hardy <shardy@redhat.com>
Zane Bitter [Fri, 29 Jun 2012 08:22:21 +0000 (10:22 +0200)]
Fix typo in stack creation code
Broken by
b942be0e362ef6c04afb45f0ecae8fa4ce432a20
Change-Id: Iad6ace2d460212a41b8504d479335b9f16b5d5ce
Signed-off-by: Zane Bitter <zbitter@redhat.com>
Jeff Peeler [Thu, 28 Jun 2012 03:35:32 +0000 (23:35 -0400)]
Change oz rpm install to use yum
yum localinstall will automatically download needed dependencies.
Change-Id: I0a24c549909ff50062affade014d3a17fc252e4d
Signed-off-by: Jeff Peeler <jpeeler@redhat.com>
Jenkins [Thu, 28 Jun 2012 22:00:45 +0000 (22:00 +0000)]
Merge changes I05dcfd9a,If938b51a,Iebd2693b
* changes:
Don't go fishing in the stack for the KeyName
Tidy up create timeout code
Get rid of _wrap_db_error()
Steven Hardy [Mon, 25 Jun 2012 16:42:15 +0000 (17:42 +0100)]
heat engine : Return timestamps formatted by heat_utils.strtime
Fix remaining timestamps which are not formatted via heat_utils.strtime
This allows event timestamps to be correctly parsed by boto.
ref #125
Change-Id: I62c3bdcdcfd8e1d51e6c3f2566eb1568e60097d2
Signed-off-by: Steven Hardy <shardy@redhat.com>
Steven Dake [Thu, 28 Jun 2012 20:01:12 +0000 (13:01 -0700)]
Clean up pip-requires for stackforge
Change-Id: I50a79fedf80269b8b1bad2c94d132d6692c8ecae
Signed-off-by: Jeff Peeler <jpeeler@redhat.com>
Signed-off-by: Steven Dake <sdake@redhat.com>
Steven Dake [Thu, 28 Jun 2012 18:36:50 +0000 (11:36 -0700)]
We don't need to be installable via PIP so remove build and install deps
setup.py is installing dependencies via pip, making a mess of the system.
Instead if someone wants to install, expect they will have openstack
installed already, which should contain the necessary dependencies.
Change-Id: I8ff82aad1b85bd4e1acc454b04c5fcec2adcadbe
Signed-off-by: Steven Dake <sdake@redhat.com>
Zane Bitter [Wed, 27 Jun 2012 09:47:30 +0000 (11:47 +0200)]
Don't go fishing in the stack for the KeyName
The KeyName should be a property of the Instance, and need not have the
same name in the stack parameters.
Change-Id: I05dcfd9aa6f92bc7aaa2dbc594062984ac074b7e
Signed-off-by: Zane Bitter <zbitter@redhat.com>
Zane Bitter [Tue, 26 Jun 2012 09:36:10 +0000 (11:36 +0200)]
Tidy up create timeout code
- Change the parameter name to 'TimeoutInMinutes' to match CloudFormation
- Don't hack parameters into the template, just pass them as parameters
Change-Id: If938b51a0fcb36bb76efeea3527ee7f8eaae9f81
Signed-off-by: Zane Bitter <zbitter@redhat.com>
Zane Bitter [Mon, 25 Jun 2012 13:03:17 +0000 (15:03 +0200)]
Get rid of _wrap_db_error()
This was causing recursion depth errors, and the exceptions in question are
never being specifically caught anywhere anyway.
Fixes #137
Change-Id: Iebd2693bb1418392ebb041fbbb788bef28aae581
Signed-off-by: Zane Bitter <zbitter@redhat.com>