Support vnic_type in OS::Neutron::Port

This commit adds support for vnic_type
in OS::Neutron::Port. vnic_tpes can be
normal, direct, and macvtap

Change-Id: If7498c69abb44fa1ee7ed8bed15a221ca9aea313
Implements: blueprint neutron-resource-add-pci-port
Create common stack_create functional test helper

The same pattern for creating a stack, defaulting arguments,
setting cleanup, and waiting for status is repeated in all
tests, so move that logic to a common base-class helper.

Change-Id: Ibf4c2f61d1f1936816245178fd8cf794e347de8b
Remove Python 2.6 classifier

Heat does not support Python 2.6 anymore starting with Kilo and might
not work correctly with it, so remove the classifier.

Change-Id: Ie8239823b448cc95fdcce3afe27523cb960863d6
Support secgroups in Sahara Node group templates

Latest python-saharaclient (already in Heat dependencies) has ability
to provide security groups when creating node group templates.
This patch adds support for this feature to
OS::Sahara::NodeGroupTemplate resource in Heat.

Change-Id: I5f94366e1bb2db07b8f92ca8cabf4c4ecf5c3d51
Closes-Bug: #1379318
Support availability zones in Node Group Templates

Latest python-saharaclient (already in Heat dependencies) has ability
to provide availability zones for servers and volumes when creating
node group templates.
This patch adds support for this feature to
OS::Sahara::NodeGroupTemplate resource in Heat.

Change-Id: Ic74fd43f5d8c692ddb40d0c6cefa5ed6327dd654
Failed res no need UpdateReplace which has nested_stack

Now update the resources in FAILED status will enter UpdateReplace
flow, but it's not fit for resources which has nested stack.
Especially for autoscaling group, if there is one or more server
were created/deleted failed, we shouldn't destroy all the servers
and then create new servers for the group while updation.

Change-Id: Ib53f66fe481acc282123dc1743ef8310456a1d69
Closes-bug: #1383618
Fix outputs validation place in Stack.validate

Because of outputs validation check located in
wrong place, outputs validation skipped, when
template has no resources. It's incorrect because
of possible incorrect references to unknown resources.

Change-Id: I693b51540b0678aa17b861b9f85a0cb2a9552660
Closes-bug: #1396441
Fill test database from models description

Now Heat models are the same as the tables state in DB after migrations,
so we can use metadata.create_all() to fill a test database.
This will speed-up test database creation and reduce a necessity in DB
migrations on SQLite

Change-Id: Ib7b6ab2591c01e91d7a55f3384dae505fe1485a7
Updated from global requirements

Change-Id: I334579731599c46ff9cf89cb5c3942d0db7059e0
Record update_time for suspend/resume/snapshot actions

Record update_time for stack actions: suspend/resume/snapshot

Change-Id: I04f0f64bd267998b0bc4f7c1bd47e642fb1dffe6
Closes-Bug: #1385109
Pickup the region name passed in from heatclient

For standalone heat operation, middleware will need to set the region
from the X-Region-Name header. Then the keystoneclient will use this
region_name instead of the heat_region_name config option.

Closes-Bug: 1223068
Change-Id: Ia859e67cf8c6e0d1ed9d9e7f5eab2d138c6421ef
Add console_urls attribute to server resource

This is a composite attribute that returns a dict-like structure
lazily resolving the actual console URL based on key supplied or dict of
all available consoles if no key is provided.
Example of usage to get only 'novnc' console:

  outputs:
    console:
      value: { get_attr: [server, console_urls, novnc ] }

Change-Id: I27c0426f1a9100bb483f04c059fec87bb69b6340
Implements: blueprint vnc-console-attr
Co-Authored-By: Jun Jie Nan <nanjj@cn.ibm.com>
Consider invalid keywords a template validation error

This commit changes the exception type raised when an invalid
keyword is found in the resources and outputs sections of hot
templates from a KeyError to a StackValidationFailed. The
latter is better suited to be sent to heat-api to return to
clients, as oslo.messaging deserializes it to a more compact
exception that does not include the stack trace in the message
string.

Change-Id: I7c2da96fa07503b947c6c2c4a5f8ed3231dec9db
Closes-Bug: 1393831
Populate _template_classes global on first use

This change ensures that the _template_classes global variable is always
initialized when the first template is created. This was done when
instantiating the Template base class, but it was missed when creating an
instance of any of its subclasses.

Change-Id: I5edc9f06d6b48bb04e8ed41365823021ef133909
Closes-Bug: 1397468
Reduce Server update complexity to below 20

One of the goals to polish Heat code is to make sure the complexity is
below 20.  This patch refactors the Server resource implementation
regarding its update logic so that it meets this requirement.

This is a pure code refacto patch, so no test cases are modified.

Change-Id: I18c6ada4386c0a091ae1d369db91c6a3d6429f34
Add OS::Cinder::VolumeType resource

Add OS::Cinder::VolumeType resource, implement its
basic actions: creation, deletion, updation.

Change-Id: Id37f4a0b1c558caa83dbecf7b64f87241ea89cdd
Implements: blueprint cinder-volume-type
Fix documentation on Fn::Base64 function

The documentation says that the 'Fn::Base64' function converts an
input string into Base64, while the implementation is actually a
pass-through.  This patch fixes the documentation to avoid confusions
caused to users.

Change-Id: I643e73f7ed258da06d09f17a3302a258e3303414
Closes-Bug: 1377323
Merge "Support secgroups in Sahara Node group templates"
Merge "Support availability zones in Node Group Templates"
Merge "Support vnic_type in OS::Neutron::Port"