Enable lazy translation in unit tests

Change-Id: Ia2aaaaae34f0f234b2493e7c724d7b874035bcfb
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
Fix failed to delete the NovaFloatingIPAssociation resource

Unable to delete a CREATE_FAILED stack which the NovaFloatingIPAssociation
resource create failed. So we should check if the resource is not created
successful, don't try to delete it.

Change-Id: I0eba68cc2d84b2c683e66c971534afe55d391949
Closes-bug: #1318869
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
debug level logs should not be translated

According to the OpenStack translation policy available at
https://wiki.openstack.org/wiki/LoggingStandards debug messages
should not be translated. Like mentioned in several changes in
Nova by garyk this is to help prioritize log translation.

Change-Id: I770dfc2fd474123a8ccc37311ef69d0c03e85545
Closes-Bug: #1318713
Allow setting the number of heat engine workers

This will allow scaling stack operations up on a single host.

Change-Id: I8e9a3a7f86663fdda9b03c42e16b3e2189cbbfa5
Default engine workers to the number of CPUs

The engine is single-threaded and thus needs more workers to handle more
concurrent requests on a single machine.

Change-Id: I36117c3876f84a2ff7ba5576444fdbf7716cc69e
Remove update_allowed_keys definition and usage

The update_allowed_keys attribute didn't really define any useful
policy, and prevented automatic update which should be handled by the
base Resource class like DeletionPolicy. This patch removes the usage
and the various definitions around the code base.

Change-Id: I78494aba07b6badeca8e95f1875ca8e4b9b0290c
Co-Authored-By: ala.rezmerita@cloudwatt.com
Partial-Bug: #1316171
Only push metadata when required

Metadata only needs to be pushed on deployment update when the
config_id changes.

Tripleo are experiencing config being retriggered by deployment signalling,
causing eternal config loops.

Change-Id: I3953d45db745ee6a7a4a7b0f989f18cb0ecba3bf
Closes-Bug: #1320262
Handle NotFoundException when deleting alarm

If delete a alarm which has been deleted from ceilometer
already, ceilometer client will throw a exception, and deletion
will fail, so we need to ignore NotFoundException when
deleting alarm.

Change-Id: I224c2de575106d3ce827d48853e0729b6bf9a221
Merge "Fix failed to delete the NovaFloatingIPAssociation resource"
Merge "Only push metadata when required"
Using correct attribute of exception

Currently patch (https://review.openstack.org/#/c/69837/6) was merged in
python-novaclient. New exceptions have not attribute 'code' and now we
should use http_status instead, falling back to the old attribute if
the new attribute does not exist.

Change-Id: I16e54c8e19dd93229fd7bcfe124fd4f2595f4e59
Closes-bug: #1319499
Merge "Handle NotFoundException when deleting alarm"
Merge "debug level logs should not be translated"
Merge "Using correct attribute of exception"
Merge "Remove update_allowed_keys definition and usage"