Add IP address to error message of failed stack

The error message that occurs when the heat-script.sh or cfn-userdata
script runs doesn't include the IP address of the server, and it's not
possible to find that info in the stack-show output of a failed stack.
Add the IP address to the error message so it is displayed in the
stack-show output to aid in debugging.

Change-Id: I35bd4fbc1a05fa8207f3eb4f501f5becf78415c9
Ensure that the NoCloud data source is loaded, part 2

The cloud-init config is now in /etc/cloud/cloud.cfg.d/90_dpkg.cfg
instead of /etc/cloud/cloud.cfg.d/10_rackspace.cfg, and that caused bug
1285891 to resurface.

Change all files in /etc/cloud/cloud.cfg.d to make this somewhat
future-proof.

Change-Id: I65e2c0795952a5807783bf272061550a4a3447e0
Closes-Bug: #1288920
Closes-Bug: #1285891
Add events for automation statuses to Cloud Server

Previously, it was difficult to know if the server was stuck in
CREATE_IN_PROGRESS or if it was waiting for another automation to
complete.

Change-Id: I988a12fc520629a78d8215d4a9c529729a302741
Fix heading markup in hot_spec.rst

The Resource Dependencies section in hot_spec.rst used a wrong
heading markup (inconsistent with previous sections' 2nd level
markups), so the heading did not appear in the HTML.

This patch fixes the markup.

Change-Id: Id10ca0246942b2b64ea6269413243379c3ae2158
Closes-Bug: #1295538
Fix creating docker containers

Due of an API change in the pydocker library we need to set the
privileges argument on start() and not on create()

Change-Id: Ie4c63c8d8104577d2766a5f74ac2bae9bf0e3468
Fixes-bug: #1296617
Display container ip not gateway IP

As described in the attribute schema of network_ip we want to show the
container ip and not the gateway ip.

Change-Id: I86a3c3476d04d437d7b6bb270d3178d0bc7e8136
Partial-Bug: #1296745
Add subnets as a dependency for router

Because router's external gateway depends on at least one external subnet,
so add subnets as an implicit dependency for the router.

Change-Id: Ib34636b440b3eee3993cd1030dab23312824510d
Closes-Bug:1279645
Change router's prop name agent_id to l3_agent_id

Currently, the OS::Neutron::Router supports associating the L3Agent via
"agent_id" property.

However, Neutron supports a few kind of agents(L3, DHCP and etc).
The property name of "agent_id" is little bit ambiguous.

It's nice to change property name "agent_id" to "l3_agent_id".

Change-Id: Ie3c90d703df81bbf9d541a7d7c08641eed9c8e2a
Closes-bug: #1296608
Add docker network_gateway attribute

We previously had it in network_ip attribute when that value should have
been the container ip. Add a new value called network_gateway giving
this information to the user.

Change-Id: I8ebfc576f4bbc470aa2d405e8b063932017904cc
Closes-Bug: 1296745
Don't create cloud-init user unless specified

When the the instance_user value from heat.conf is set to empty string/None and
the user doesn't specify Server's admin_user property, Heat will not create a
custom cloud-init user.

The instance_user config option and admin_user property are deprecated and will
be removed in Juno where this behaviour becomes the default.

AWS::EC2::Instance will still create a cloud-init user for CloudFormation
compatibility. In the absence of the instance_user config option, 'ec2-user'
will be used.

Closes-Bug: #1257410
Change-Id: I42dda36045f79be079b2030669284e9db71463d7
Revert "Add validation to KeyPair resource"

This reverts commit 6124fdea6552145ec38817bbd409b81d717be1c2.

Nova Keypair validation doesn't work with stack-update.  Validation will
fail even if the Nova Keypair resource wasn't changed.

Change-Id: Iaa17e97ca7847c344aabd46f62ae3068cfbbe061
Closes-Bug: #1296747
Merge "Don't create cloud-init user unless specified"
Don't catch all exceptions in image constraint

Just catch ImageNotFound, as otherwise we can hide other problems.

Change-Id: Ib0e813043b1e4fe7b5b4a14ae8130ac17c4355a5
Closes-Bug: #1297349
Merge "Add subnets as a dependency for router"
Merge "Revert "Add validation to KeyPair resource""
Make OS::Nova::Server networks property updatable

This patch adds the ability to update the networks property.
Update process consists of two simple steps:
    1. detaching all old interfaces
    2. attaching all new interfaces.

Change-Id: Iaabf8be1adc6cb7d5ecc08edb92d9f9ce029b125
Closes-bug: #1250645
Merge "Don't catch all exceptions in image constraint"
Merge "Change router's prop name agent_id to l3_agent_id"
Merge "Make OS::Nova::Server networks property updatable"
Merge "Fix creating docker containers"