heat templates : Add openshift template for pre-built jeos

Add new openshift template which uses a pre-built JEOS
also creates the example application allowing a fairly
quick full demo of a two-instance openshift setup

Fixes #186

Change-Id: I9bd886b0717c8b0d810eff036b76883b537c2421
Signed-off-by: Steven Hardy <shardy@redhat.com>
heat api : bugfix, save config correctly in EC2Token

Fix issue where EC2Token fails to save the config correctly,
which breaks AWS Authentication

Fixes #191

Change-Id: I77dfe182aac81c55b7d487d88073b40eac1faadd
Signed-off-by: Steven Hardy <shardy@redhat.com>
Update Getting started to match change to heat-jeos

heat-jeos list will no longer list jeos in the image name.  As a result,
we can't specify "-jeos" in the getting started guide.

Signed-off-by: Steven Dake <sdake@redhat.com>
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>
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>
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>
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>
Use cached keystoneclient

Change-Id: I787edd10bcc29746a08878fd371204f81f0400db
Signed-off-by: Steven Dake <sdake@redhat.com>
heat template : Align two Openshift template varieties

Align the build-from-scratch Openshift.template with the
now-working OpenShift_Prebuilt_JEOS.template

Change-Id: I8d164b0837b4cb28a6ce4ad1573b19f8daf68b8a
Signed-off-by: Steven Hardy <shardy@redhat.com>
Add a tool to register prebuilt JEOS images into glance from github

Change-Id: Idb02e892f390516557c9cce3ca0fbab7109d33e1
Signed-off-by: Steven Dake <sdake@redhat.com>
Inject command into userdata

The injected command touches /var/lib/cloud/instance/provision-finished
so it is easily determinable if provision has been completed.

Change-Id: Ib5b93f7bd14f533af41182ffdab6a029a3b9e13a
Signed-off-by: Jeff Peeler <jpeeler@redhat.com>
heat tools : glance-jeos-add-from-github scrape image names

Scrape image names from github index page to avoid hard-coded
names in the script

Change-Id: Ifca85b71a1c20d436486a80cc5e9347a7791e5fa
Signed-off-by: Steven Hardy <shardy@redhat.com>
heat tools : glance-jeos-add-from-github avoid duplicates

Avoid adding images to glance when they already exist

Change-Id: Ia914cc3015fcdcc0c12e3773985298fce6872751
Signed-off-by: Steven Hardy <shardy@redhat.com>
heat engine : Fix engine.api variable shadowing

Fix weird-looking/confusing variable shadowing in
the engine api

Change-Id: Ic7aca18ef877149bbdb49ee33abc62241706a3f3
Signed-off-by: Steven Hardy <shardy@redhat.com>
heat API : move aws common files from api/v1 to api/aws

Move aws api common files to common directory
(so they can be more easily reused by cloudwatch)

Change-Id: I1a455ef11226dd960503bac5d79fa5c28607a1f6
Signed-off-by: Steven Hardy <shardy@redhat.com>
heat API : move remote_error to common exception.py

Move API exception-mapping function to the common exception.py

Change-Id: If64511be0d77d9c9f9e610bbb0564d57f4530499
Signed-off-by: Steven Hardy <shardy@redhat.com>
heat API : Move aws api common code into aws/utils.py

Move heat-api AWS common utility functions into a new
utils.py, so these functions can be reused by cloudwatch

Change-Id: I030d796b1048ffc4e7c40f7c8760121ab2854733
Signed-off-by: Steven Hardy <shardy@redhat.com>
heat API : Add HeatAPINotImplementedError exception

Add heat-specific HeatAPINotImplementedError, which
allows us to return a sensible error to requests for
API actions which have not yet been implemented

Change-Id: Ibaee8312e7e563d29801bd325d7638bca9efa622
Signed-off-by: Steven Hardy <shardy@redhat.com>
heat DB : make watch_data_get_all work with no watch ID

Align watch_data_get_all with other "all" methods, and
return all watch data without requiring an ID.  We may
also need by_id and by_name variants but this is more
consistent and makes things easier for cloudwatch.

Change-Id: I09c90278349efc769ab7c719f686a1fd854b425a
Signed-off-by: Steven Hardy <shardy@redhat.com>
Split functional test into standalone and utility class

This allows functional tests to be written for each individual template.
See the test_Wordpress_Single_Instance for an example, but the basic
form to follow is:

import util

def test_template():
    func_utils = util.FuncUtils()

    func_utils.create_stack(template, 'F17')
    func_utils.check_cfntools()
    func_utils.wait_for_provisioning()
    func_utils.check_user_data(template)

    ssh = func_utils.get_ssh_client()

    # test stuff here

    func_utils.cleanup()

Functional test changes:
Changed jeos creation to use new tool.
Added distribution to heat stack creation.
Improved IP parsing from glance.
Improve SSH connection exception handling.
Changed cfntools SHA check to match installed copy instead of locally.
Fixed stack parsing to check correct file and handle user-data injection.

Clean up run_tests a little to make it clear default execution is on host.
Add a short option for unit test running only (may be important due to not
wanting to run functional tests locally).

Also added paramiko to test-requires.

Change-Id: Ib2ae1be32801cb0ee3d1937c4f82ab9f574b4591
Signed-off-by: Jeff Peeler <jpeeler@redhat.com>