261 Commits

Author SHA1 Message Date
Zane Bitter
715a62d2b4 Move CloudFormation API to heat.api.cfn package
Change-Id: Ib0adf6f38da298b0b87d80272904767066b41087
Signed-off-by: Zane Bitter <zbitter@redhat.com>
2012-09-27 15:00:30 +02:00
Steven Dake
5208008db0 Add a Folsom specific heat-keystone-setup binary to bin
Fixes issue #253

Change-Id: Ie223c43c15ac806da393e3d532ef410526ac16ce
Signed-off-by: Steven Dake <sdake@redhat.com>
2012-09-26 10:11:07 -07:00
Zane Bitter
2f9a1310e3 Rename heat-api to heat-api-cfn
The previous heat-api is, in fact, a CloudFormation-compatible API. Rename
it to heat-api-cfn, analogous to how the EC2 API in Nova is named
nova-api-ec2.

Change-Id: I9759f10cee6a60cdc9cb917966eb9fb95a618f85
Signed-off-by: Zane Bitter <zbitter@redhat.com>
2012-09-06 16:11:24 +02:00
Angus Salkeld
5655589895 Fix pep8 warning
Change-Id: Ia0b4336e7e861fefc7afebc99a3c6ddf48841d71
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-09-05 23:47:44 +00:00
Steven Hardy
51dc63bb07 heat cli : initial heat-watch cloudwatch API client
Implements new client to demonstrate new Cloudwatch API

Currently only provides options for DescribeAlarms,
ListMetrics, PutMetricData and SetAlarmState

Signed-off-by: Steven Hardy <shardy@redhat.com>
Change-Id: I3963a07694cec9af96d9d7369cc7d18d629fcd2d
2012-08-31 18:27:48 +01:00
Steven Hardy
311092a294 heat API : Implement initial CloudWatch API
Initial AWS-compatible CloudWatch API implementation
Supports the following API actions:
- DescribeAlarms : describe alarm/watch details
- ListMetrics : List watch metric datapoints
- PutMetricData : Create metric datapoint
- SetAlarmState : temporarily set alarm state

Skeleton implementation of all other TODO actions which
returns HeatAPINotImplementedError.

Only basic filtering parameters supported at this time.

Signed-off-by: Steven Hardy <shardy@redhat.com>
Change-Id: I8628854a135fff07b675e85150ea0b50184ed2e1
2012-08-31 18:27:48 +01:00
Steven Hardy
a9252c9b05 heat cli : Workaround inconsistent boto return type
Work around the inconsistent boto return type for DescribeStackResource
action, upstream patch pending but not yet merged, so this provides
a simple workaround

Fixes #175

Change-Id: I026ec7b1845fb591a47a5fb12cfcb25705b33909
Signed-off-by: Steven Hardy <shardy@redhat.com>
2012-08-16 13:02:09 +01:00
Steven Hardy
5aa80047b6 heat cli : Rework to separate cli tool from client-API wrappers
Rework to remove duplication between heat and heat-boto, and to
provide better separation between the CLI tool logic and the
underlying client API (should allow easier porting to new ReST API)

Ref #175 (partially fixes)
Fixes #192

Change-Id: Ib1f821667c40c78770a345204af923163daeffae
Signed-off-by: Steven Hardy <shardy@redhat.com>
2012-08-16 12:23:50 +01:00
Steven Hardy
619239527f heat cli : remove some duplication from parameter formatting
Cleanup - bin/heat move some duplicated code into a function

Change-Id: Ib74077c557a2b8d7c640ee1686237bb5223b2a85
Signed-off-by: Steven Hardy <shardy@redhat.com>
2012-08-16 10:51:29 +01:00
Steven Hardy
c2382317de heat cli : remove unused paths from heat cli tool
Cleanup the the jeos and cfntools paths which are no longer needed

Change-Id: Idc7d37446a0072e38369939cbd3fd5fb374c15c9
Signed-off-by: Steven Hardy <shardy@redhat.com>
2012-08-15 15:20:14 +01:00
Tomas Sedovic
6029c031ea 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>
2012-07-18 13:34:35 +02:00
Steven Dake
e9eee939c7 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>
2012-07-17 08:27:19 -07:00
Steven Dake
b0a0f0c24e 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>
2012-07-17 07:18:42 -07:00
Steven Dake
c7ec88f2c7 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>
2012-07-14 13:51:38 -07:00
Zane Bitter
8cbd065bf0 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>
2012-07-11 15:18:18 -04:00
Steven Hardy
b96c15c96f 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>
2012-07-10 15:17:02 +01:00
Steven Hardy
637875f729 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
2012-07-06 14:41:58 +01:00
Steven Hardy
9d0a22f92b 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>
2012-07-04 17:43:35 +01:00
Steven Hardy
b7eee6c64e 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>
2012-06-29 09:34:30 +01:00
Zane Bitter
b942be0e36 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>
2012-06-28 18:02:08 +02: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
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
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
1fc9ff4a0b heat API : return response body as XML not JSON
AWS API returns response as XML, this implements a new response serializer which
turns dicts returned from the engine into AWS style XML responses.  Ref #125.
Updated following review comment.

Change-Id: I8170ed814be0b5cea98761a2723e12be216374a3
Signed-off-by: Steven Hardy <shardy@redhat.com>
2012-06-14 07:48:26 +01:00
Angus Salkeld
0b7feab00b Add EstimateTemplateCost API
see #1

Change-Id: Ib362b5320b5fa050dfb70202838042e222287534
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-06-08 12:06:50 +10:00
Angus Salkeld
3601fb263c Add the GetTemplate API
see #1

Change-Id: I178a1d9a19570296b62381548434fb4fcf836fee
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-06-08 11:37:08 +10:00
Steven Dake
4c359db1b0 Remove cfntools and jeos
These files are now available in the heat-jeos repository.

Change-Id: I392e7443348a31e8454ae14d957b0b54560c2ec3
Signed-off-by: Steven Dake <sdake@redhat.com>
2012-06-07 07:47:47 -07:00
Angus Salkeld
aca71be770 Add a Timeout (-t) to the heat options (and make -f for templates).
This makes the cli more consistent with AWS and implements
the timeout feature.

Note: the timeout is in minutes and defaults to 60 minutes.

Change-Id: I41dea75170c871c1ee47948643311752d9d5e41e
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-06-07 11:41:03 +10:00
Angus Salkeld
7e02a65f79 Fix the setup of daemon config
Change-Id: I02d4a3da63d2438067cf64c15432d66b539c30bc
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-06-06 23:07:54 +10:00
Angus Salkeld
93ea554c0e Teach heat-api about the bind_host
Change-Id: Ica32693373a87f01c41755a2b041c187bddd034d
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-06-04 21:16:31 +10:00
Ian Main
6b0e7a4314 Fix new pep8 warnings.
With the new release of pep8 we have some different requirements.
This patch fixes them all.

Change-Id: Ief16becba47007460f8b125907b055aa51de999e
Signed-off-by: Ian Main <imain@redhat.com>
2012-06-01 11:50:36 -07:00
Angus Salkeld
d1f71f6d5d Remove _authenticate() check for metadata calls (temp)
To be replaced by proper AWS auth, which needs AWS::IAM::AccessKey
resource type to be hooked up.

Change-Id: Icbdb08493fb51add5e6d3d5f4a153595f93c8f75
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-31 14:30:48 +10:00
Angus Salkeld
07018fe88a Fix jeos_path when not intalled as an egg
Also use os.path.join() to sort out trailing "/"

Change-Id: I212cffacc018f456894e9b7921fef75256edcf45
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-25 11:51:21 +10:00
Tomas Sedovic
67203a5497 Allow engine and metadata server start in any order
When the metadata server starts first, it will wait for the engine to come up
and only then registers it's hostname and port and becomes available.

Signed-off-by: Tomas Sedovic <tomas@sedovic.cz>
2012-05-17 16:49:15 +02:00
Zane Bitter
0720684956 Modify command names for consistency
Replace 'events_list' with 'event-list' and 'jeos_create' with
'jeos-create'. This makes things consistent with the conventions of
OpenStack projects. The old versions will continue to work for now.

Signed-off-by: Zane Bitter <zbitter@redhat.com>
2012-05-15 11:42:37 +02:00
Zane Bitter
7a28ec601e Make 'heat help' show a list of commands
Previously we just printed an error message about not specifying a command
to get help about, and no hint about how to work out which commands even
existed.

Signed-off-by: Zane Bitter <zbitter@redhat.com>
2012-05-14 19:25:11 +02:00
Zane Bitter
645d093c45 Allow the Getting Started script to run non-interactively
Related: #84

Signed-off-by: Zane Bitter <zbitter@redhat.com>
2012-05-14 16:03:49 +02:00
Zane Bitter
cbdbf3146e Fixed problems with starting MySQL in heat-db-setup
Signed-off-by: Zane Bitter <zbitter@redhat.com>
2012-05-11 18:54:38 +02:00
Angus Salkeld
7a28922d1e Metadata: Add bind_host to the config
This needs to be set to the nova interface to work.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-07 18:25:03 +10:00
Tomas Sedovic
fa55a69842 Register metadata server's entry point with Engine
Signed-off-by: Tomas Sedovic <tomas@sedovic.cz>
2012-05-05 03:01:31 +02:00
Tomas Sedovic
9d69b20402 Connect metadata server to the engine via RPC
Similarly to the way heat-api works, the engine does all the heavy lifting (db
access, etc.) while the metadata server provides the API layer that communicates
with the engine.

Signed-off-by: Tomas Sedovic <tomas@sedovic.cz>
2012-05-05 02:22:42 +02:00
Steven Dake
9e2c35efa8 ValidateTemplate API call framework
This is a start on issue #111

While no actual validation is done by this patch, this patch introduces
the framework for validating in each of the resource types and returning
an appropriate error when a validation error occurs.

Signed-off-by: Steven Dake <sdake@redhat.com>
2012-05-04 10:16:52 -07:00
Jeff Peeler
908f572b34 Finish necessary changes related to jeos_create move
As a result of moving jeos_create, the code is now used during test
execution. The library libxml2 which was previously being used is not
available in pip, so lxml has been swapped instead.

Signed-off-by: Jeff Peeler <jpeeler@redhat.com>
2012-04-27 16:53:28 -04:00
Tomas Sedovic
4fa77a658c Add skeleton structure for the metadata server 2012-04-27 18:40:49 +02:00
Tomas Sedovic
669f312c9a Update heat-api docstring 2012-04-27 15:25:50 +02:00
Jeff Peeler
d4f0c0d25b Move jeos_create into utils so it can be imported
The main reason for this move is so that jeos_create can be tested with
the aide of Mox.

Signed-off-by: Jeff Peeler <jpeeler@redhat.com>
2012-04-26 17:05:26 -04:00
Steven Dake
2ba3934ce0 Put Starting Heat API in log file and add logging setup to bin/heat-api
Signed-off-by: Steven Dake <sdake@redhat.com>
2012-04-26 11:02:15 -07:00
Angus Salkeld
f489c956c6 Merge branch 'ha'
Conflicts:
	heat/db/sqlalchemy/session.py

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-04-27 00:22:24 +10:00
Steven Dake
724b5f3902 Make heat-db-setup generic enough to run on RPM or DEB distributions
Signed-off-by: Steven Dake <sdake@redhat.com>
2012-04-24 15:29:30 -07:00
Angus Salkeld
2019dec757 Move common cfn code into cfn_helper.py
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-04-23 13:08:32 +10:00