Add more unit tests for ThreadGroupManager

this patch adds unit tests for the rest of ThreadGroupManager methods.
Related-Bug: #1288627
Change-Id: I38a0864c649d1693ef4fb5b49d5aeb37632263ca
Refactor CLB to work with groups

The Rackspace CLB resource couldn't be used with resource groups
because nodes were individual IPs or references. This change
allows a node to have a list of ips for a given port, status,
etc so that references to resource groups can easily be added
to Rackspace CLB instances. Ref-based nodes were removed as they
aren't used.

Change-Id: Ia26a012758fb1cd0470c1c0edc27e61e77bd8f0a
Get rid of global variable in JSON->YAML conversion

The best way to deal with the lack of proper closures in Python 2 (Python
3 has the nonlocal keyword to handle this) is to wrap the object in a list
and manipulate the first list element instead. In this case, though, even
that is not necessary.

Change-Id: Iac6d95a66b1bfc6fd409851bf6c918629a98335f
Never specify project_name in keystone v3 auth

All of our middlewares populate the context with both the tenant name and the
tenant_id. The tenant_id, is unique across domains which means you can do lookups
without having to know what domain the project is in.

When project_id and project_name are both specified, it seems that project_name
takes precedence, which will fail when the credentials are from the stack domain since
we cannot lookup by project names when the domain is not specified.

It looks like specifying project_name is never the right thing to do, and we should
assume that the context always has a tenant_id.

Change-Id: Ifea21e13be482a6347438d6baaca3111caad4a97
Closes-Bug: #1290621
Catch NotFound exception on user delete_key

Deleting a key which doesn't exist shouldn't cause a failure. Catch
NotFound exceptions so delete can succeed in this case.

Change-Id: If651a2936862f8ed2168c2c216ef6df8e944d6ba
Closes-Bug: #1291060
Add documentation to the firewall properties

miss documentation for the firewall properties,add it.

ref:
  http://docs.openstack.org/api/openstack-network/2.0/content/fwaas_ext_ops_firewall.html

Change-Id: I7bca7d29b05133d11ed53dede0caa561e792fa09
Fix user provider template registration

Trying to use an external template as a resource fails in obscure path
in the environment because TemplateResourceInfo value is not required.
Enforcing a value (with the template path) fixes the issue.

Change-Id: Ib92bc0827e9a94a3735493eb47cd227449552990
Closes-Bug: #1288541
Don't re-bind parameters during stack update

While we're in the process of updating a stack, we set the stack's parameters
to the new, updated values. However, we don't want to change existing
resources' idea of their own values until we have explicitly done an update of
them to bring them into line with the new template/parameters. So when parsing
a template snippet, store the parameters object to which it will refer.
References will resolve to the new parameters only when the template has been
re-resolved.

Closes-bug: #1291411

Change-Id: Iebbb518c5d15cfba858db001648f3412a7d8b1c0
Stack identity reads tenant from stack not context

This refactors the way stack identity reads tenant_id information so
that it uses the information already in the stack, instead of getting it
from the context every time.

This allows for unscoped list of stacks to show correct project
information (the project that each stack belongs to), instead of the
current one in the context.

Co-Authored-By: Richard Lee <rblee88@gmail.com>
Closes-Bug: 1294385
Change-Id: I976e7f7dea4432b97a2b97382bf05eb3bd1ca565
Using resolving properties for update

For definition reference in template we should use built-in functions.
So template after parsing with resolve_static_data will contain
references on these functions instead resolve values.
If we want get some information about previous state of stack during
update, we should use self.properties instead of self.t['Properties'].
Also default=[] was added to avoid error when we try to do set([]).

Closes-bug: #1292495
Change-Id: I0cc44a0a541913cca665caec1a7f3a2a1a6cebc9
Merge "Never specify project_name in keystone v3 auth"
Merge "Catch NotFound exception on user delete_key"
Merge "Stack identity reads tenant from stack not context"
Merge "Using resolving properties for update"
Implement an identifier stack_path()

This returns stack_name/stack_id, which is the form that needs to be
used with heatclient to avoid doing an extra stack lookup API call.

See the next change in this series to see this in use.

Change-Id: I41dcb732d36d702b7583b5e877fd074f86445a03
Related-Bug: #1291097
Provide the necessary inputs to enable HEAT_SIGNAL

To allow signalling via a native heatclient call using stack domain credentials
the following inputs are needed:
- the user ID, required to successfully auth with stack domain users, since it avoids
the need to have knowledge of the domain ID.
- the V3 endpoint as the auth_url, since it is domain aware
- a stack ID which consists of stack_name/stack_id, to avoid the need for an extra
  stack identifier lookup

Closes-Bug: #1291097
Change-Id: I677d1afb9bc40f84d9a71f376869946022a6635f
Merge "Get rid of global variable in JSON->YAML conversion"
Merge "Fix user provider template registration"
Merge "Implement an identifier stack_path()"
Merge "Provide the necessary inputs to enable HEAT_SIGNAL"