Catch SSH Disconnection errors in functional tests

Change-Id: I24f959cbaa36138bafeda70a3966000673c80c56
Signed-off-by: Zane Bitter <zbitter@redhat.com>
heat : boto_client_cloudwatch allow credentials override

Allow the AWS key/secret to be passed in when making the client
connection like boto_client.py

Ref #222

Change-Id: Iee24120eb52c8ffb97b1b421b0a27313e5f5cbdd
Signed-off-by: Steven Hardy <shardy@redhat.com>
heat : heat cli pep cleanups

Fix some pep whitespace issues, which were not picked
up by the jenkins gate for some reason..

Change-Id: I9a3488d61a3cde4bb8038f3f1927eb0c1ad0f60c
Signed-off-by: Steven Hardy <shardy@redhat.com>
heat API : ValidateTemplate fix response format

Fix CFN API ValidateTemplate response format, missing the
ValidateTemplateResponse wrapper, required by boto to parse the response

Change-Id: I89464df402346ff87041496652d2b4d39cc35fc6
Signed-off-by: Steven Hardy <shardy@redhat.com>
heat tests : Add ValidateTemplate test to CFN_API_Actions test

Add test for ValidateTemplate action to test_CFN_API_Actions.py

Change-Id: Ia7a377f952d096e7b728a7151906ab2781695008
Signed-off-by: Steven Hardy <shardy@redhat.com>
heat tests : add ValidateTemplate test to CFN_API_Actions_Boto test

Add test for ValidateTemplate test to test_CFN_API_Actions_Boto.py

Change-Id: I1fff55cd9aaa0c62c2a1e05050695bcd3f96664a
Signed-off-by: Steven Hardy <shardy@redhat.com>
Merge "heat : heat cli pep cleanups"
Use password in preference to token if both supplied

Fixes #263 - devstack is providing a token in the environment, which was
causing the wrong path to get hit.

Change-Id: I9aae346e57fdfe156e52d4696e8f2f859884ff2f
Signed-off-by: Zane Bitter <zbitter@redhat.com>
heat tests : Remove utils.Stack getter methods

Remove the get_*_client getter methods, as they aren't
actually doing anything, so just access the attributes

Change-Id: Ic6740bdfe7d44c40b9fdf9fc4d03f8eddaf9a740
Signed-off-by: Steven Hardy <shardy@redhat.com>
Merge "heat tests : Remove utils.Stack getter methods"
Rename CloudFormation service to heat-cfn

This is consistent with what is implemented in devstack.

Change-Id: If47c28ddbef1d6c61e2d741f359d850e4ecffaa9
Signed-off-by: Zane Bitter <zbitter@redhat.com>
Handle upgrades in heat-keystone-setup

Handle upgrades of Heat by removing any outdated endpoints that exist in
keystone and adding any existing "heat" service user to an admin role in
the service tenant.

Change-Id: If6393417b5404a56b4723f42fb1a1b394d01cc6a
Signed-off-by: Zane Bitter <zbitter@redhat.com>
Set up for auth passthrough for deltacloud.

This simple patch allows the authentication information to pass
through the API without checks so that we can authenticate against
deltacloud in the backend.

To use this, just set OS_USERNAME and OS_PASSWORD environment
variables and then use ./bin/heat to perform operations.  I added
a logger statement in the authenticate method to print out the
user/pass so you can see how to use it for deltacloud.

Signed-off-by: Ian Main <imain@redhat.com>
Add a mock Deltacloud client

This creates a Deltacloud client object that will have identical API to
the Nova client. All `resource.nova()` calls will get the Deltacloud
client instead.

Right now it just provides most of the necessary methods and attributes
but doesn't do any calls to the Deltacloud API.

You can create the Wordpress_Single stack and it will "launch" the
instances as far as Heat is concerned but they will not be launched
physically.

The next step is to finalize the API and then hook it up to the real
Deltacloud client.

Change-Id: I4902cfa205270116df649736604d9aad8beffbeb
Signed-off-by: Tomas Sedovic <tomas@sedovic.cz>
Add missing API calls to the Deltacloud client

The mock Deltacloud client is now able to emulate launching the Wordpres
single instance, RDS and EBS+EIP stacks.

Change-Id: Ie83d366fcf23fd929b99c8baa160398d13d1d94a
Signed-off-by: Tomas Sedovic <tomas@sedovic.cz>
Hook up deltacloud client and do basic auth

So I went ahead and setup the import for deltacloud python client
and did an 'authenticate' method which works providing you throw a code
in the python client when an error occurs.

Signed-off-by: Ian Main <imain@redhat.com>
Hook the deltacloud wrapper to deltacloud client

The `heat.deltacloud.client` code is now connected to Deltacloud and it
passes requests for instances, images and flavors to Deltacloud API.

It is now possible to "launch" instances on Deltacloud Mock provider
using Heat.

Change-Id: I4bc8cc8b0c962a979ac4b016792b125ea860eef9
Signed-off-by: Tomas Sedovic <tomas@sedovic.cz>
Fix the arn/tenant issue

Showing stack's details returns ARN. This was failing for
Deltacloud-based stacks because they don't set a tenant.

Change-Id: I485fd0fa685b907c57baacc4363fc0d74f343e7b
Signed-off-by: Tomas Sedovic <tomas@sedovic.cz>
EC2 compatibility fixes

This fixes issues uncovered by using a real provider rather than Mock.

Namely:
- testing authentication by loading a list of all images is
sloooooooooooooooow
- the instance deletion states weren't matched properly

Change-Id: I7a714d040a4ab2023b5eb5e6d8ac7ec4a31006f5
Signed-off-by: Tomas Sedovic <tomas@sedovic.cz>