621 Commits

Author SHA1 Message Date
Jeff Peeler
29ffcfb0b7 Remove --root=/ in install script
Installing with --root=/ put the files outside of the egg directory,
which is not desired.

Change-Id: I40142d1a67c0ee12814e08e7b2846bee0ce4e32e
Signed-off-by: Jeff Peeler <jpeeler@redhat.com>
2012-06-25 18:04:25 -04:00
Jeff Peeler
d48c537760 Add keystone create script for devstack
Copied from heat-keystone-service, with two differences:
The keystone endpoint-create command has been deleted. Devstack uses the
templated catalog driver by default, which does not support this
command. (The equivalent operation is handled manually elsewhere.)

keystone user-role-add parameters have slightly different names,
requiring _id suffixes.

Change-Id: I3d56becde7b6fedbe29e1cfc6a2b4ad9ab2621fa
Signed-off-by: Jeff Peeler <jpeeler@redhat.com>
2012-06-25 12:47:23 -04:00
Steven Hardy
34f1bb34a5 heat API : Align DescribeStacks response with AWS docs
Reformat the DescribeStacks response to more closely align
with the AWS API spec - boto parses the result correctly with
these changes.  Ref #125

Change-Id: I23b270c040653f404014807de79c85b2ab63c85f
Signed-off-by: Steven Hardy <shardy@redhat.com>
2012-06-25 14:15:51 +01:00
Steven Hardy
d2487050b6 heat API : Escape JSON TemplateBody XML serialization
AWS API defines JSON templates returned inside XML "wrapper"
this change escapes XML serialization of TemplateBody content
ref #152

Change-Id: I7e38dd2010b03061979f0906b582f9461c85cabc
Signed-off-by: Steven Hardy <shardy@redhat.com>
2012-06-25 10:16:06 +01:00
Jenkins
e09bd8e662 Merge "Add uninstall script for Heat" 2012-06-24 04:27:46 +00:00
Jenkins
85fe316bcd Merge "Fix path to cloudinit directory" 2012-06-24 04:25:38 +00:00
Jeff Peeler
6603aa27fe Add uninstall script for Heat
Change-Id: I1f0cbde19f5b75106d93cafdbd0b8fbf47cbbfe0
Signed-off-by: Jeff Peeler <jpeeler@redhat.com>
2012-06-23 22:41:30 -04:00
Ian Main
e0c3141253 Factor out authenticate method for engine.
This patch factors out an authenticate() function for use by both
the heat service authentication and the resource authentication.
This fixes the AWS auth method for creating resources - issue #153.

Change-Id: I134e993263ae6ba4890f56bfbe6a6a3205b7f921
Signed-off-by: Ian Main <imain@redhat.com>
2012-06-22 10:58:54 -07:00
Ian Main
38d382ad07 Fix metadata startup.
A previous change to wsgi init caused the metadata to break.  This
makes the 4th argument to init optional allowing other wsgi apps to
continue to work as normal.

Change-Id: Ib0e7042f656a9319013dba4e30c7ffa35cb85f92
Signed-off-by: Ian Main <imain@redhat.com>
2012-06-22 10:14:37 -07:00
Jeff Peeler
f87fb58e01 Change install.sh to work on fresh install
Also, change shell to allow use of bash on Debian.

Change-Id: I53b038432389c824556d90ea686c28d132708904
Signed-off-by: Jeff Peeler <jpeeler@redhat.com>
2012-06-22 12:26:38 -04:00
Zane Bitter
893cda4314 Fix path to cloudinit directory
The various path manipulations designed to search for the cloudinit
directory do not work with the current installation script, or when
heat-jeos is also installed. They also perform gratuitous manipulation of
sys.path (causing warning messages) and may pick up the cloudinit files
from a different location to the code that is actually running. Python
already knows which heat package we are using - just look for the directory
inside there.

This patch also tidies up the code for generating the user data.

Change-Id: I14add5f1670aea2562329ff1a1303320a35ff428
Signed-off-by: Zane Bitter <zbitter@redhat.com>
2012-06-22 17:33:37 +02:00
Jenkins
fa7d89e5ed Merge "heat API : Add support for ContentType=JSON query parameter" 2012-06-22 11:05:24 +00:00
Angus Salkeld
60c6bb5319 Ignore the unimplemented properties of IAM::User
They are in lots of templates, and this is going to get
irritating fast.

Change-Id: I42cb5e5d0e8496028a70d6bed8477a0c864a09e7
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-06-22 14:41:20 +10:00
Angus Salkeld
0d9052ef4f Don't use json.dumps() on the output of get_template
Change-Id: I913e9f9e2b90cd983fb9674b18b6c81d66129e6c
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-06-22 14:11:01 +10:00
Angus Salkeld
2eadedf5fd Fix EIP template.
Some of the implemented flags were wrong.
Allow the eip to be deleted when no eip was created.

Change-Id: Id1d3aaff9adf0988a5c58f8bf0f7b2fb9c7bde44
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-06-22 12:01:55 +10:00
Steven Dake
e30ee55ff9 Remove service name from nova() def
The service_name field is not unique between distros or versions of
openstack, but is used to select endpoints for communication with nova
and volume services.  The nova client will sort out the correct operation
based upon the service_type field.

The service_name field should probably just be removed from the API
definition upstream.

Tested on F16 & Devstack U12.

Change-Id: I36409dba9d9ec2b453a027fc1e2e78f7c8ace2a2
Signed-off-by: Steven Dake <sdake@redhat.com>
2012-06-21 15:05:00 -07:00
Steven Hardy
b2ab26398f heat API : Add support for ContentType=JSON query parameter
From reading the boto code, and looking at real AWS API responses
it would appear there is an (undocumented?) AWS query parameter
which switches response format from XML (default) to JSON
ref #125

Change-Id: I7c8b0f5701be5ff8bd0a3b135e42cf0e46e39ded
Signed-off-by: Steven Hardy <shardy@redhat.com>
2012-06-21 20:45:30 +01:00
Zane Bitter
acf8334a1f Fix Stack initialisation
self.parms must be set before calling self.resolve_static_data()

Change-Id: Ic3864c56575d759f4f398eb55f90e12c2afdd5f6
Signed-off-by: Zane Bitter <zbitter@redhat.com>
2012-06-21 15:21:52 +02:00
Steven Hardy
89dca2fd6a heat templates : Cleanup README and template whitespace
Align README with latest templates and cleanup some whitespace issues
ref #147

Change-Id: Iad39c388806bba6497f8abf0de46c04ef7ac7e69
Signed-off-by: Steven Hardy <shardy@redhat.com>
2012-06-21 14:05:37 +01:00
Angus Salkeld
c44746d8d5 Fix the wait condition's reading of the metadata.
the db was caching the object, so we need to 'expire'
it to make sure we are getting live data.

Change-Id: I1108daccc96f3dcfa33fda968ea30d83e03aad2d
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-06-21 20:10:53 +10:00
Angus Salkeld
477baee868 Fix a typo (from the commit to use state instead of parsed_template)
Change-Id: I37800ad3fb50210b8f27ca889fcfa48e14da8af0
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-06-21 15:02:00 +10:00
Angus Salkeld
c20b33dd14 Use the correct resource name
Change-Id: I25d6962dfcc75b703aae6489cd0e751317029bc6
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-06-21 14:55:31 +10:00
Tomas Sedovic
970c333d4e Make the describe-resource API calls user-aware
Fixes #143

The stack retrieval DB calls were already fixed in previous commits but
there was still one query (resource_get_by_physical_resource_id) that
would return any resource, not just the ones owned the user.

Change-Id: Ie02ff1e8ba6ea8da2c3d0c7f0a87c32452824fc6
2012-06-20 17:40:38 +02:00
Jenkins
d5d13120e4 Merge "Don't remove resources from the DB during HA restart" 2012-06-20 15:24:37 +00:00
Angus Salkeld
66fb2054fb DB: add stack status & reason, resource metadata
Change-Id: I369aa688fa9890a5484de417a9995e7f04f34ad2
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-06-20 23:49:26 +10:00
Angus Salkeld
b85bdc2d6c Use the resource.state_description
Change-Id: I114067f3bb91c6d38b3c4c69af842f4f3585810b
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-06-20 22:22:14 +10:00
Zane Bitter
6e6d0b4222 Don't remove resources from the DB during HA restart
This was broken by 3b91d100a6c6424961e1ec06cf7afd9a1c9cf49c. Resources
should be removed from the DB only when the stack is deleted.

Change-Id: I6822aee8453afd6076793cff9206a035cff33588
Signed-off-by: Zane Bitter <zbitter@redhat.com>
2012-06-20 14:06:29 +02:00
Angus Salkeld
1530a29cfd Make the saving cfn-signaling more reliable
1) The metadata saved in manager.py was not always showing up
   in the db (from wait_condition.py)
2) Reuse a little method in parser.py to retrieve the parsed_template
   db entry (and store the parsed_template_id).

Change-Id: Ib5b5474b81c0b7439eb1fa4aec5a0f1f21bbde1c
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-06-20 21:24:44 +10:00
Angus Salkeld
cfd1232038 Remove duplicate setup_logging()
This is already done in load_paste_app()

Fixes #146

Change-Id: I3631b7ade06c8b142960abbf9c172461fae93a56
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-06-20 14:01:29 +10:00
Angus Salkeld
bb92e62581 Work around keystone strangeness (error deleting user)
Fixes: #144

Change-Id: Ib9298605accc3fc7d12112a4fb57df2b4746864a
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-06-20 12:23:55 +10:00
Angus Salkeld
3df9355a68 Fix db exception description
Change-Id: Ie7c1076e9cf5be1d6d63d3af7bc90933c1e588f7
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-06-20 09:37:23 +10:00
Angus Salkeld
6ad3c5c3ea Fix the metadata rpc functions
Change-Id: Id3a071a45037d85920d273fa198d59602443026d
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-06-19 16:04:52 +10:00
Jenkins
f2784dbfba Merge "heat API : Align response StackId with AWS spec" 2012-06-18 17:34:50 +00:00
Steven Hardy
a4090bfb12 heat API : Align response StackId with AWS spec
Revise response format for CreateStack, ListStacks and DescribeStacks
so the StackId element is formatted in a similar way to the AWS spec

Change-Id: I0dd34a6dae2e30c63619449ebbf89643ccc9d364
Signed-off-by: Steven Hardy <shardy@redhat.com>
2012-06-18 17:52:08 +01:00
Ian Main
b40d770864 Add more per-user stack support (2).
This finishes up the API calls with per-user returns of stacks and
events.

Change-Id: Iab6118f35978a6f62ad4d3454842cb7f3d686bc8
Signed-off-by: Ian Main <imain@redhat.com>
2012-06-18 09:47:34 -07:00
Jenkins
d09bad5bef Merge "Add execute bits to executable scripts manage.py and runner.py" 2012-06-18 16:30:56 +00:00
Zane Bitter
f6e69f8419 Add example templates for nested stacks
Change-Id: I3b5fb7018a606895007dad589f1dcbeb6b0defe6
Signed-off-by: Zane Bitter <zbitter@redhat.com>
2012-06-18 18:14:11 +02:00
Steven Dake
0846b4dd1b Add execute bits to executable scripts manage.py and runner.py
Fixes issue #138.

Change-Id: I90b139dac5775cb061bed79e86e1ded99b9322ca
Signed-off-by: Steven Dake <sdake@redhat.com>
2012-06-18 09:13:25 -07:00
Jenkins
9a19032ff8 Merge "Add manpage for heat-metadata" 2012-06-18 16:00:53 +00:00
Zane Bitter
7155c52d94 Fix DB calls in Resource API
The DB API changed in 892b99bff480aba8240a1f49eadeea079bae4c81, while
these calls were added in 247cc2bb9afb9db87ffad7160ef05d2cc4457235. Both
patches were under review simultaneously.

Change-Id: I8fc6c3228c99f025e01fc82979fa94f086649909
Signed-off-by: Zane Bitter <zbitter@redhat.com>
2012-06-18 15:16:35 +02:00
Tomas Sedovic
247cc2bb9a Add describe resource API calls
Fixes #62.

This commit implements the `DescribeStackResource`,
`DescribeStackResources` and `ListStackResources` AWS API calls.

Change-Id: Id9161b3c3eb527d5936c5b8978e32a67ba6c12bb
2012-06-18 13:36:10 +02:00
Steven Hardy
614f7868c4 heat api/engine : Reworked approach to aligning with AWS date format
Modifies heat internal default date-string representation to match AWS spec
Note heat.common.utils.strtime default format loses sub-second precision
Avoids having to regex mangle datetime string format
ref #125

Change-Id: I1347e82b1c3ccac5eac7c85858cf8009723547c2
Signed-off-by: Steven Hardy <shardy@redhat.com>
2012-06-18 11:30:50 +01:00
Steven Hardy
f7f4755076 heat API : Align time format with AWS spec
- Reformat ListStacks/DescribeStacks responses to align time format with AWS spec
- Remove duplicate member tags in DescribeStacks (now handled by XMLResponseSerializer)
ref #125

Change-Id: Ib001acba591dba52f3f56052427d2b298d781ea0
Signed-off-by: Steven Hardy <shardy@redhat.com>
2012-06-18 09:31:27 +01:00
Angus Salkeld
88c8bdee3f Lengthen the timeout of the WaitCondition in the HA template
Change-Id: I059075b80dfac0472ae2e2e47d14b2ee4093a530
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-06-18 15:10:30 +10:00
Angus Salkeld
be76361dea Change create_watch_data from POST to PUT
Change-Id: Ie460e76668fdbc3101da183e373d02eefda945f3
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-06-18 15:09:48 +10:00
Angus Salkeld
a9f0c446bc Get the context from the db not the context of the guest tool
Change-Id: Ia2403161a0f97eb1c807be339d8024ff5c245695
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-06-18 15:09:08 +10:00
Zane Bitter
6044ef1b78 Implement Nested Stacks
Fixes #123.

Change-Id: I89affe471b4df898c7d3157ff23f9b64003c2893
Signed-off-by: Zane Bitter <zbitter@redhat.com>
2012-06-17 18:29:00 +02:00
Zane Bitter
582b8b29cb Move parsing of parameters out of template parser
The format of the params received by the manager is a property of the Heat
API protocol, not of the template, so it makes sense not to have the parser
extracting the template parameter data from them. This simplifies the
implementation of #123 (Nested Stacks).

Change-Id: I8eaf50caf79f69359cbc8ee1f0193c08d7944d1c
Signed-off-by: Zane Bitter <zbitter@redhat.com>
2012-06-17 18:25:23 +02:00
Zane Bitter
892b99bff4 Get stacks from the DB by either name or id
This code was previously misleading, as it appeared to get stacks by id,
but actually got them by name. This patch adds a separate API, so
get_stack() gets the stack by id and get_stack_by_name() gets it by name.

Change-Id: I1cbbb3f9211661ad665e208d87298f177825f8ac
Signed-off-by: Zane Bitter <zbitter@redhat.com>
2012-06-17 18:24:37 +02:00
Jenkins
42ad6a7a65 Merge "Fix latest DB migration script" 2012-06-15 22:44:08 +00:00