Synced jsonutils from oslo-incubator

The sync includes change that drastically enhances performance on Python
2.6 with fresh simplejson library installed.

The latest commit in oslo-incubator:
- 732bdb6297eb9de81667f7713ebcb1ccc2ee45a7

Change-Id: Ib3dc0b713ed90396919feba018772243b3b9c90f
Closes-Bug: 1314129
Add a test equivalent to default_log_levels

This is to mainly kill the migrate script logs
but can be used to quieten down any log.
Also the migrations were not using the FakeLogger
so now both are using the same mechanism.

Fixes-bug: 1281226
Change-Id: I2f1efcace6a38450020fcbf516ee5026204359d2
Using new attribute schema for all resources

Currently resources use old style of attribute schema. For example:

    attribute_name: _('Description')

This patch contains changes to migrate for new attribute Schema class.
For example:

    attribute_name: attributes.Schema(_('Descriprion'))

Partial-Bug: #1307319

Change-Id: I54c7b9d481655b0051d0f7ff668672011ac882e9
Fix stack_resource's handle_adopt

- This changes a call from (non-existing) _to_parameters()
  to child_params() like the other surrounding calls to
  create_with_template()
- Also add a missing check_adopt_complete to stack_resource

Change-Id: I4ab9c299bf41d057f85b59dfdffa985e07a15bac
Make attributes definition similar on properties

Current attributes_schema contains hard codeded names of attributes.
This patch replaces all hard coded names on variables defined in
ATTRIBUTE tuple.

Change-Id: I1ea7b33bd598dba07f2190c282497c573463b0dd
Partial-Bug: #1307319
Do not validate constraints in schema constructor

This patch moves validation of constraints out of the constructor of
schema objects into a separate method that can be invoked on the
schema objects after creation. This gives us more control over when
validation shall be invoked.

This patch fixes an issue with custom constraints that could not be
validated when having a default value, since they require the RPC
context to be present. However, the context was not present in the
places where needed.
The short-sighted fix would have been to change a lot of method
signatures to pass the context properly, but that did not seem to be
really clean. The better fix seemed to be to move validation into
a separate method that can be invoked with the proper context. This
will also give us more control on when we do validation, and which
validation we do.

This patch
Closes-Bug: #1314240

This patch will also enable to fix
Partial-Bug: #1314401

For that bug it will be necessary to switch off validation under
certain conditions, which was not possible before when doing
validation right in the constructor.

Change-Id: I19e1fb520551eb42bf36bb380f1cc28c81bbaedd
Add range constraint to AWS volume size

Such constraint was added to OS::Cinder::Volume but was missing
from its AWS counterpart.

Related-Bug: #1267747
Change-Id: Ie2c85b6eed43793302a64cb1f8c44e6e413e69ef
Refactor neutron resources lookup

This patch moves new neutron resources resolution methods
of basic neutron resource to a separate module neutron_utils
(similar to nova_utils) for easier usage in other parts of the code.

Change-Id: Ifb2e103e6b66dd021e24eb48c816b8c46da921e1
Revert "Default engine workers to the number of CPUs"

This reverts commit 56041687844c7c04bfcad974a07ac3ff35f99e5c.

Problems have been reported on systems using QPID. The gate only tests
RabbitMQ.

Change-Id: Iaf83dc7582835ce5bf4534116c918640da7373aa
Partial-Bug: #1321303
Merge "Add range constraint to AWS volume size"
Merge "Do not validate constraints in schema constructor"
Merge "Revert "Default engine workers to the number of CPUs""
Use oslo.config for heat-keystone-setup-domain

Previously used environment variables exclusively.

Change-Id: If4b4266ce66212d7ae2579e7da6d3bae779ad04a
Restore resource_id from backup_stack when delete

When UpdateReplace is occured, the resource is moved to backup_stack,
and create new one. Then, resources which has dependency for updated
resource will be moved to backup_stack. If the creation of update is
failed, dependencies between backup_stack and exist_stack will exist.

Heat deletes backup_stack before deleting exist_stack. The dependency
still exists, so it will be failed. Thus, add behavior that restores
resource_id in the backup_stack when the stack is deleted.

Change-Id: Ib2a39fa20089b7140fc676f54db8cf66a4581c60
Closes-bug: #1270775
Merge "Synced jsonutils from oslo-incubator"
Merge "Fix stack_resource's handle_adopt"
Merge "Add a test equivalent to default_log_levels"
Merge "Using new attribute schema for all resources"
Merge "Make attributes definition similar on properties"
Merge "Restore resource_id from backup_stack when delete"