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>
heat engine : Make wait-condition poll interval better

Remove rising-rate sleep-time logic and replace with a bounded
poll interval derived from the timeout - this should avoid ramping
up to a really long interval and delaying stack complete status

Fixes #264

Change-Id: Id53b87a988299708c29fc853f2801f527fd825dd
Signed-off-by: Steven Hardy <shardy@redhat.com>
Make default distribution U10 for deb template

Change-Id: Ifcfc7d1fbb6fac2a785a0dc5a4e6ba09cf898ed4
Signed-off-by: Jeff Peeler <jpeeler@redhat.com>
Identify stacks using tenant UUIDs

Tenant names may come and go, but UUIDs are universally unique. Therefore,
ownership of the stack should be keyed on the tenant_id, not the tenant
name.

Change-Id: I7ec410aeaeceb6319299935b5f34d7c4e9c63d67
Signed-off-by: Zane Bitter <zbitter@redhat.com>
Do not assume host has selinux utils installed

related to #265

Change-Id: I4a6cff1f05b6f4f88d672cc0d4ce5e8f62a58e47
Signed-off-by: Jeff Peeler <jpeeler@redhat.com>
ReST API: Format output as JSON

Eventually, both XML and JSON will be supported, but for now make the
output JSON, the same as the input.

Change-Id: If0f00b182c27616a9a6f08b468d732c718b7635a
Signed-off-by: Zane Bitter <zbitter@redhat.com>
heat engine : remove unused EC2 style auth from engine

We handle EC2 style auth at the heat-api-cfn level, so EC2
style authenticated requests simply pass us an auth_token in
the context, so remove this duplicate/dead code.

Ref #268

Change-Id: I17708cb6ef4b0eb4989d47c116b6211f0d419dcb
Signed-off-by: Steven Hardy <shardy@redhat.com>
heat engine : Rework auth.authenticate

engine.auth.authenticate is really creating a novaclient
connection, so move this into Resource.nova

Ref #268

Change-Id: I15d9c0537b3af9e65cd1ea5bd667bde0c89dc4c2
Signed-off-by: Steven Hardy <shardy@redhat.com>
heat engine : Resource.keystone handle auth_token

Handle auth_token as well as username/password

Fixes #268

Change-Id: I7015556d74e026977fdd04f4ce9a378c0fac7695
Signed-off-by: Steven Hardy <shardy@redhat.com>
Start and enable libvirtd.

Just did a fresh install on fedora 17 and found libvirt was not running
by default which caused nova to not start.  Explicitly enable it.

Change-Id: Id244af934007020d1a9f263dd71f04e5950dd2c5
Signed-off-by: Ian Main <imain@redhat.com>
Merge "Start and enable libvirtd."
Merge "ReST API: Format output as JSON"
Pass the correct tenant for the service user

Previously, the service user (which authenticates tokens passes to the
engine by the APIs) was paired with the tenant of the end user to do
authentication, which worked only when they were in the same tenant. This
should not be the case, since the service user should only have an admin
role in the "service" tenant.

Fixes #269

Change-Id: I99b764fc489429dd6d081485bd89d5dde737c124
Signed-off-by: Zane Bitter <zbitter@redhat.com>
Change the service user to match devstack

The user which authenticates keystone tokens should be the "heat" user in
the "service" tenant. This changes the default configuration to do this, as
devstack already does.

Ref #269

Change-Id: I89978ec0b490f6d404c568197dd4208097a4b695
Signed-off-by: Zane Bitter <zbitter@redhat.com>
Handle %(tenant_id)s in endpoints when updating

Change-Id: I61112f02b60b6bb63f33d5459edec1f44a49bdd5
Signed-off-by: Zane Bitter <zbitter@redhat.com>
ReST API: Add a keystone endpoint

Change-Id: I2770279ec50822c106d3ae23ce2f736a49139443
Signed-off-by: Zane Bitter <zbitter@redhat.com>