Updated from global requirements

Change-Id: I4577a5e16ab79203999ade8f782d7eb1b535c44d
Allow for stack users in _authorize_stack_user

This change allows stack user credentials to be used to call
describe_stack_resource (heat resource-metadata)

It makes the following changes:
* _authorize_stack_user first attempts authorize with
  stack.access_allowed using the context user_id before falling back
  to looking for ec2 credentials
* context middleware sets the user_id on the context even when the
  username is not specified

This change also adds missing test coverage to ContextMiddleware

Change-Id: Idb655e403ba11a3144dacf34eba0feb59ab8d911
Closes-Bug: #1299982
Credentials for native heat os-collect-config polling

For Server software_config_transport=POLL_SERVER_HEAT the os-collect-config
configuration has been changed in the following way:
* included stack_id and resource_name
* replaced username with user_id, since domain users should always be
  referenced by ID.
* renamed the collector key from "heat_server_poll" to "heat" since that
  is the intended name for the heat collector in os-collect-config

Closes-Bug: #1299986

Change-Id: I42326c81c7276d7d305a05c00d72a6102e80abca
Fix timeout for stack actions

The problem is that the timeout for running any action (i.e. create or update)
on stack is not passed from parent stack to nested stack.
All heat resources which are internally implemented as StackResource are
affected. For example AutoScalingGroup always using default timeout
(60 minutes). If creating any of the instances will take more that it will
fail no matter what timeout you will pass creating stack.

Changes:
* removes hardcoded timeout (60 minutes)
* adds new config option to specify timeout for stack action
* if timeout was not specified for nested stack then timeout from parent
  is used
* adds test for StackResource and parser.Stack

Change-Id: I39494b75774988c625cb22cc7873d628c04d3228
Closes-Bug: 1287719
Check top-level sections when parsing a template

This patch adds validation to template parsing to detect any sections
that do not comply with allowed sections in a template. In the past,
there have been cases where small typos in section names (e.g.
'output' instead of 'outputs') did not get detected and caused issues
at a later point, i.e. by simply not showing any stack outputs.

The place where the template.validate() call has been added to the
parser code only affects new stacks and rejects invalid templates
with an error message. This does not affect stacks that are already
in the database (I did some tests to check this).

Change-Id: Ifed4207badeb364675c905224ba762a9d8eaedd9
Closes-Bug: #1297761
Merge "Updated from global requirements" into milestone-proposed
Merge "Fix timeout for stack actions" into milestone-proposed
Merge "Check top-level sections when parsing a template" into milestone-proposed
Cherry pick oslo rpc HA fixes

Get 2 commits from oslo-rpc fixing HA failover:

* Ia148baa6e1ec632789ac3621c85173c2c16f3918 (fixed HA failover, Qpid
 part)
* I67923cb024bbd143edc8edccf35b9b400df31eb3 (fixed HA failover, RabbitMQ
 part)

Change-Id: I45f679f3da720a0c28fb552d9f4cfb3d8bd21c20
Closes-Bug: #1261631