Shorten physical resource name to custom limit

The default limit for resources is 255, which is
determined by the column size of the name columns in
other openstack project databases.

The limit for nova servers is 53 characters due to typical default
linux HOST_NAME_MAX of 64, minus the '.novalocal' appended to the name.

The reduced name will consist of the following:
* the first 2 characters of the name
* a hyphen
* the end of the name, truncated on the left to bring
  the name length within the limit

The validation fix from bug: #1238272 has been removed.
Closes-Bug: #1250291

(cherry picked from commit 574f3ea54b1299f7f827bf0f6a88a83bccf9c3af)

Conflicts:
	heat/engine/resources/server.py

Change-Id: Iccaf905b2e73433a671559c49223c2b635402853
Bump stable/havana next version to 2013.2.2

Change-Id: I3a7170180717bd62fce4cbc2c3a9107187f89fb1
Merge "Shorten physical resource name to custom limit" into stable/havana
Make LoadBalancer nested stack template configurable

Reviving work originally posted by Angus Salkeld under
https://review.openstack.org/#/c/21405/

This is to enable the various distros to easily override the
hard-coded default nested template (which currently only supports
Fedora 17) with a template approporate to their distro, and
enables deployers to specify their own template (although the
latter use-case will probably be catered for via a provider
template implementation long-term).

Conflicts:
	heat/engine/resources/loadbalancer.py

Partial-Bug: #1234375
Co-Authored-By: Angus Salkeld <angus@salkeld.id.au>
(cherry picked from commit 746a0ed4ad2273d0e67b896efbb6d7a69f9f4c77)
Change-Id: I0a4eccb23b2eebbf31b7aabf0fe85ab31f0ca971
Tolerate lookup failures in Fn::Select

A wait condition will return an empty dict for its Data attribute
until it has been created, however Fn::Select on Data will be evaluated
before the wait condition is created (for example, during stack-list
or stack-show). The current error raising of Fn::Select leads these
operations to fail.

This change results in Fn::Select evaluation behaving in the
following way:
- KeyError on dict lookup failure results in empty string
- IndexError on list index results in empty string
- Passing an empty string as the value results in an empty string

Closes-Bug: #1243958
Change-Id: I3b01c8ce5dc56e804016274282d2ee69f539bf40
Allow DependsOn to accept a list

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-dependson.html

Change-Id: I8187d8a0395cc96d9727aa812d57f281e69c516d
Closes-bug: #1235496
Use "python -m coverage" instead of coverage cli

As requested by the Debian package maintainer, this makes the
coverage report work more easily on Debian/Ubuntu

Change-Id: Ibed9e164c89543b679393ee18ccdb4a15bdea6d7
Closes-Bug: #1241330
Validate template parameter attributes

Validate that template parameter is provided with at least one attribute.

Closes-Bug: #1227061

Change-Id: I5e245556c21a1ea800eb9e0346f3b2414ad56183
Do not attempt a stack update when it is suspended

And in any state (inprogress, complete, failed).

Closes-bug: #1234242
Change-Id: Ic0bccfa3d3d98cb41d0f5228d8cdc164c5c1fd32
Improve coverage of storing credentials in parser.Stack

Currently the trusts path is not directly tested, so add coverage
and ensure the correct credentials are stored in each case.

Related-Bug: #1247200
Conflicts:
	heat/tests/test_parser.py

(cherry picked from commit 5397e94292dcbf61778bdaf8abdd3c14be728458)
Change-Id: I0aa999e01015046946f242a9b52b484522dc6d72
Add coverage for trusts parser.Stack delete path

Related-Bug: #1247200
(cherry picked from commit 9904be6febc4acd39fb86afe119aa6427e890b9a)
Change-Id: Ic55030be389ac71ec999e08533fa9d5fc05b5bd1
Catch error deleting trust on stack delete

When deleting a stack, it's possible for deleting the trust to fail,
for example if the user deleting the stack is not the user who created
it, or an admin (which raises a Forbidden error), or due to some
other transient error e.g connection to keystone interrupted.

Currently in this case, we fail to mark the stack deleted in the DB
and leave the status "DELETE, COMPLETE", which is misleading.

Conflicts:
	heat/tests/test_parser.py

Closes-Bug: #1247200
(cherry picked from commit 214ba503757e5bd9bf5a5fab6692c4e94d0536fa)
Change-Id: Ie8e9ea48bc4f44e56ff4764123fcca733f5bd458
Merge remote-tracking branch 'upstream/stable/havana' into havana