HOT str_replace default to empty string for param

If a str_replace param cannot be resolved or is None,
substitute an empty string in order to prevent raising
an exception during validate.

Closes Bug: #1234390
Change-Id: Ica6b84cfc2157b4e1f561f737e9aa67b9f6018ca
Add some docs on how to setup Ceilometer to use Alarms

We need to use Ceilometer's mongo backend if we want to use
alarms as the sql backend is missing a feature.

Works around bug #1223710

Change-Id: Ib569cfd650ce14480496530e7bbf1b2f71a24c02
Add a new db api stack_get_all_by_owner_id

This is to get the next level of child stacks.

Partial-Bug: #1234010
Change-Id: I64b30b4040bc443b64d23d85a054010da4dd1130
Start the watcher task if a nested stack has watches

Even if the parent stack has no watches.

Change-Id: I06322f908fdbd474778776749cb3e1634183ed23
Partial-Bug: #1234010
Make sure that nested stacks have their watch rules checked

Change-Id: Iee9629739e9549e33f8ed8c4ca08098a7e4d0acf
Closes-Bug: #1234010
Enabled request_id in RequestContext

As a means to enable logging on request id's, request_id in the RequestContext
can be set.

blueprint log-request-id

Change-Id: I13cd494d5af3255c03ec30e1040ef01c856c960d
Change pyrax identity_type of Rackspace resources

The Rackspace resources utilize the pyrax library. As of v1.4.11 of
pyrax, the manner in which default region is determined changed, such
that the keystone identity_type returned 'RegionOne' as the default
region rather than one of the Rackspace regions. Changing the
identity_type to rackspace fixes this.

Change-Id: I36cd61393a76fbb9b0bb1fd4b31f26f6a95df3a3
Closes-Bug: 1227387
resource_data saved unencrypted

Sqlalchemy is commiting unencrypted
data when a session commit happens after
doing a resource_data_get.

Closes-Bug #1233337
Change-Id: I9d20bf1faaf12cc1427976bf1223d4dfc9392c5f
Handle NetworkNotFoundClient and PortNotFoundClient

neutronclient has changed is behavior (recently?) in that it now
raises PortNotFoundClient for missing ports and NetworkNotFoundClient
for missing nets. These exceptions extend NeutronClientException but
do not set the status_code to 404 so the existing resource 404
checking has stopped working.

This change handles both 404 exceptions and the new exceptions
so that it continues to work with different neutron releases.

Change-Id: Id06e04d4b98e62b8062b119e959634fd61c8beb5
Closes-Bug: #1234924
Add contrib to tox pep8 check

This implements Clint's comment in
https://review.openstack.org/#/c/48690/1 adding # noqa
to the relative imports and adding contrib to the pep8 check.

run_tests.sh -p now returns no warnings.

Change-Id: I05085151258a6d0f3cc348211f64533fd4cbded9
Closes-Bug: #1234938
Merge "HOT str_replace default to empty string for param"
Merge "Add some docs on how to setup Ceilometer to use Alarms"
Merge "Add contrib to tox pep8 check"
Don't obtain resources through stack.resources

A particular logical resource name can be looked up by subscripting the
stack object directly.

Change-Id: I621280318cfb104ab9bfe1ae7c31fe2b5e55cfc6
Unit tests: don't use status strings from class

We should always obtain the status strings from the object we're actually
using them with. In this test, the parser.Stack class is actually stubbed
out, which can cause problems for accessing its attributes.

Change-Id: I8e060c6c937542dd11e96f243af26ee4dfa348dc
Make parser.Stack a proper Mapping

We no longer iterate over things in dependency order, so get rid of the
iterator methods that return values instead of keys. Instead, make
parser.Stack conform to the standard collections.Mapping interface.

Change-Id: Id66b2da4ba8e4335c72f1b538abfc2e97eab1e20
Refactor total_resources

Make the implementation slightly faster and more robust:

- Check that res.nested is callable
- Don't call res.nested() more than once
- Check for None explicitly
- Calculate totals directly, rather than with a for loop

Change-Id: Ib43cf5555620e54b9d4634e40cf46f75b50782ac
Get InstanceGroup InstanceList from get_instances()

Change-Id: I477aeede396e247134c838663fe7d54941758cd0
Don't iterate over Stack.resources dictionary

Now that parser.Stack is a proper Mapping, we can iterate over its
keys/values/items directly instead of accessing the resources attribute.

Change-Id: I6bd9f357c21a0e75623a71543e981d3f4f87fcbe
Implement parser.Stack.__delitem__()

Allow the update code to delete old resources from the stack without
accessing the stack's resource attribute.

Change-Id: I9dbc623d7396dd84cdbee992fa91d88b6c01a0e5