Order imports in alphabetical order (2/9)

This patch is one in a series to re-enable H306 style check rule
(imports are in alphabetical order). It touches API files.

Implements: blueprint reduce-flake8-ignored-rules (partial)
Change-Id: I81c7c79516ce1a17055c3b9c12a94312ed3d1940
Order imports in alphabetical order (3/9)

This patch is one in a series to re-enable H306 style check rule
(imports are in alphabetical order). It touches common and cloudinit files.

Implements: blueprint reduce-flake8-ignored-rules (partial)
Change-Id: Ie9838dba11323575165fc3bfdfbd0d0b93f653fa
Set statuscode=404 in NotFoundException in tests

when resource can'n be found,neutron will set
statuscode=404 in NotFoundException,so add statuscode
in exception to make fake client have same action.

Change-Id: I6597f080903501d9fe6050893054cc7dba6a595b
Fix start_with_acquired_lock - pass kwargs to func

This method of ThreadGroupManager was not passing kwargs
to the function to be started.

Closes-Bug: #1288627
Change-Id: Icaaa012bcc65c67f3e8ecc2878dee2a78121e357
Fix InternalException raised on stack-show

Getting attributes of a OS::Nova::Server raises a 500 error if the server
doesn't exist. So stack show doesn't work. We should catch the exception
and return the default values of the output keys of the server while
getting attributes to make sure the api works.

Change-Id: If569b4d73abbce93d3c56c45a1eb284720c6e416
Closes-Bug: #1279085
Remove unused versions define in template_format.py

Remove unused 'HEAT_VERSIONS' and 'CFN_VERSIONS' define in
template_format.py.

Change-Id: Icb6920fa481259868b6bf2feaab9859a13c59467
Return template based class in list resource types

Don't filter out TemplateResourceInfo in ResourceRegistry.get_types so
that they are available in the resource-type-list API.

Closes-Bug: #1286179
Change-Id: Ie26e3b12e9f05568f146458a0d0c5c120970978b
Order imports in alphabetical order (1/9)

This patch is one in a series to re-enable H306 style check rule
(imports are in alphabetical order). It touches contrib resources.

Change-Id: Icfe39ee206a70a25e78027a5d097d1208f8750cf
Implements: blueprint reduce-flake8-ignored-rules (partial)
Allow update of disable_rollback

Previously, any change to disable_rollback was ignored during
stack-update.

Change-Id: I76aaf5be379dab5347e392392b2334ab1d8749b0
Closes-Bug: #1290943
Removing unnecessary required=True options

Property with a default value should not have required=True,
since it has no effect (the default value would be used if a property
were not given, making it not required).

Change-Id: I760ed5c010c9ff3c0e4dc0fc7860f1e18147921d
Refactor Template.parse()

Split out Template.parse() as a separate function. This saves an expensive
method call to self.functions() for every potential intrinsic function in
the template, plus makes a template parsing routine available to other
parts of the code that may want to use it, without being tied to a
Template's ideas of what the intrinsic functions available are.

Change-Id: I1d4b847967357dbe5c9960223a063377aec50e5d
Default properties to the empty dict in ResourceGroup

Sets the properties of the grouped resource to {} when it's None to make
sure the resource is built properly.

Change-Id: I2938c741063159ef81a7996d203adaf466cf19c4
Closes-Bug: #1291421
KeyError generated when using a provider template

The function for registering information about provider templates
referenced via urls is causing a KeyError. This patch checks for
checks for the existance of the specified resource befor removing
from the registry. This will prevent KeyErrors in stacks referencing
provider templates that are persisted in the database.

Partial-Bug: #1288541
Change-Id: Id58d5bfeac896d0d52eb4262b25eff3a5fe2238c
Move load_user_creds out of StackWatch

This method was moved out of EngineService in a recent refactor
however load_user_creds not related to stack watching, so this
method is better off living in EngineService.

Change-Id: I67fa06df5c24baa901dc6314205ea09d012437fb
Reimplement L3Agent as router's property

We implemented Neutron's L3Agent resource as Heat's RouterL3Agent resource at
once.

  https://review.openstack.org/#/c/61388/

However, that model can change the router_id when doing stack-update.
The bug 1272254 was caused by that model.

We discussed about how to resolve the bug 1272254 with the Heat community.
The conclusion is to remove RouterL3Agent, then to reimplement agent_id as
router's property. This model can't change router_id. So its model can resolve
the bug.

Closes-bug: #1272254
Change-Id: Id9f75920ec46ec32f3e41bdb97f89a7fd09490ec
Replacing NetworkGateway when devices updated

Updating OS::Neutron::NetworkGateway failed when devices property changed.

Currently, NetworkGateway's devices property doesn't have update_allowed=True.
So, UpdateReplace have used when updating devices property.
However, Neutron doesn't allow that same Gateway Services ID exist at a time.
Eventually, 409 error occured by Neutron.

For avoiding above error, I implemented replacing NetworkGateway in handle_update.
The processing order is delete -> create. It can avoid the 409 error.

Change-Id: I4021610355d03eb6ca07272cb1e44ff2b31dfff9
Closes-bug: #1291901
remove attributes from OS::Heat::AutoScalingGroup

The InstanceGroup attribute was inherited from the InstanceGroup
resource, but not implemented properly by OS::Heat::AutoScalingGroup. This
patch makes OS::Heat::AutoScalingGroup explicitly declare no attributes.

Change-Id: Iacf90b4590551a257ddd5442f28872e712da6c88
Closes-Bug: #1291789
Fix update of Pool's list of HealthMonitors

It was broken as it was calling disassociate_health_monitor() with wrong
arguments (json request body instead of monitor id).

Change-Id: I5dd1175fa41256cf27b565d2429d099524204a9d
Closes-Bug: #1292058
Merge "Move load_user_creds out of StackWatch"
Merge "Order imports in alphabetical order (3/9)"