Removed 'message' keyword when raising Error

The exception handler for listing nova images (now glance images)
was raising an unexpected argument exception because Error() was
getting called with a 'message' keyword. Removed the keyword in
line with elsewhere.

Change-Id: If928aec0bb807495a00b8447a69c4e3dea43fb3b
Closes-Bug: 1315456
Add boolean type parameter process for template resource

When template resource generates properties from parameters, boolean
type parameter process is missed.

Change-Id: I893471776eafcbca57aae1556d9b6bf1d4b5bf53
Closes-Bug: #1329221
ec2token tolerate fully-qualified ec2authtoken auth_uri

If (as is currently done by the puppet-heat manifiests) the ec2authtoken
auth_uri is specified, and it looks like http://127.0.0.1:5000/v2.0/ec2tokens
ec2token authentication will fail, because we always append "ec2tokens" to
the auth_uri.  Instead, only add it when needed.

This probably needs to be combined with a change to the puppet manifiests so
we don't set the ec2authtoken auth_uri, as it's an optional section - we can
derive the correct path with only the auth_uri from the keystone_authtoken
section.

Change-Id: I8c89772b40523b30f1c46b2ca8b68f9e20d5c213
Closes-Bug: #1318599
Add parameter type validation before stack-create

If a number parameter accept a string that can't convert to number,
it will break heat functions and heat cli can't get any stack
information but a ValuerError message.
Add Number and Boolean parameter type validation before stack
create, so we can avoid above situation.

Change-Id: I25a41543027f929201a9b053d123d8e2b16e2725
Closes-Bug: #1329152
Instructions on image creation for SoftwareConfig.

Instructions on creating images that can be used for SoftwareConfig and
SoftwareDeployment are added.

Change-Id: If4bc6197ca38d73378ada6a6b32e47a658d88fc5
Add name attribute to Nova server.

This patch add a 'name' attribute to OS::Nova::Server resource for
convenience.  It also avoids additional calls to Nova API.

Change-Id: I67943563268ae0c1c7381ca8b472c7d41190f28b
Closes-Bug: #1327922
Add log output of x-openstack-request-id from nova

This patch enables heat to output
'x-openstack-request-id'/'x-compute-request-id'
of nova's responses to the log.

DocImpact: There is a new novaclient configuration
option 'http_log_debug' in heat.common.config

Change-Id: Id085af411c6d4ceddce1a75022c4baec9a8210ce
Closes-bug: #1329612
Hide warning for old style attribute schema test

Change-Id: I6a3d0464bffe65f8ef7ab9006882cbeaa03cc20d
parser.Stack add use_stored_context option

Add an option to switch to a context based on the user_creds data
at constructor time, which allows a cleaner interface for selecting
the stored context than creating it before creating the Stack object.

Partial-Bug: #1306294

Change-Id: I44df4e142dfbba1e70199b0d8f14c910f028a0f1
Convert service.py to use_stored_context

Related-Bug: #1306294

Change-Id: Ia75126ad77e6cad187a1953c2fb43eceb50299f2
Remove test_autoscaling _stub_validate

The _stub_validate is stubbing the wrong thing, it stubs the top-level
validate which hides the fact that the image validation fails for all
delete operations, where the validation always fails because the call
to glance is not correctly stubbed.

Partial-Bug: #1306294

Change-Id: Ibe3480f5ff358c00a4ad3c2df9b6cd7d15bda71d
test_autoscaling refactor suspend/resume stubbing

Rework to encapsulate the suspend/resume stubbing in functions and add a
stub of the image validation, which is required because the properties
get revalidated when we create the events associated with the state
transition (ref bug #1324102).

With the current keystoneclient mocking this is not visible in the
tests because the error creating the client to do the validation is
obscured by the fact that the Event constructor tolerates a validation
error and the error creating the client is just treated as an unexpected
validation error by the CustomConstraint code.

Moving to a model where clients.keystone() is consistently mocked
exposes the fact that we will try to connect to glance on suspend when
the event is created if the validation is not correctly stubbed.

Partial-Bug: #1306294

Change-Id: I001d3a432397d4cdfaa62145228aad7eaf051b98
tests add stub_keystoneclient to base test class

Add convenience function to allow easy stubbing of keystoneclient
in all tests where explicit control and verification is not required.
This is a precursor to making all clients use the auth_token property
from keystoneclient (instead of using the context auth_token in
preference) such that trust tokens can be refreshed before expiry.

Partial-Bug: #1306294

Change-Id: I9ba4595b8750ff769e76972cc30b55a68253e76d
engine.clients always use keystoneclient auth_token

Always get the token from keystoneclient, even if there is one in
the request context, as if the context contains a username and
password, there is the possibility the keystoneclient auth_token
may be a reissued token which should be preferred to the one in
the context which may have expired.

Change-Id: Icbce9ae7a8ff7cad5eadec3de4f69b977949c265
Partial-Bug: #1306294
Don't set context auth_token in heat_keystoneclient

Now that all clients refer directly to the auth_token in the auth_ref
there's no need to set the auth_token in the context when consuming
a trust.

Change-Id: I2fe58de7b950a65672b490f1769c88dedda3895b
Partial-Bug: #1306294
Remove heat_keystoneclient roles filtering workaround

The currently required version of keystoneclient contains the logic
to filter by name so remove the interim workaround

Change-Id: I7bd7657031e00d2db9376dbf587253a3b3be5a9d
Hide deprecate warnings for metadata tests

attribute metadata is deprecated, the deprecate
warnings in tests should be hidden

Change-Id: Ia7c04a8edb55fb5e2ef27a10da72804d4af75991
Merge "ec2token tolerate fully-qualified ec2authtoken auth_uri"
Update to latest version of pyrax and add Swift support

Change-Id: Ia7f638295d66df7d9df7853f52b5253a74317712
Account for differences in Rackspace Cloud Glance

The Rackspace Cloud service catalog has a tenant-scoped URL
for the image service so our client implementation needs to
munge the URL a little to make it work.

Change-Id: Ic5b3702aec8c4ab373dbcf6eb8e6f164d9fd48d0