Add a sample script that can be used to build a test environment

It can be difficult to figure out what to install to get a test
environment that can be used to test all the opportunistic tests,
zookeeper and mysql (with the right user and password and test
database).

This script provides a way to do this on rhel/ubuntu based
environments and can be used to examine how to do this for other
environment types.

I use it with nova boot (on rhel images) and it has worked out
great as a way to rebuild a clean test environment as I need.

Change-Id: I9aef7e5536aa38e951a6411a8e83097339a43955
Refactor parts of the job lock/job condition zookeeper usage

This reduces the necessary locks to operations which really only
need to be locked, removing some of the ones which are not needed
around read only operations or operations which are thread safe
when used with dictionaries (popping a single item for example)
or checking if a *string* key is in a dictionary, or fetching a
dictionaries length...

Change-Id: I28a9d66afa7f7b733b2963b8cee3edd45696561b
Ensure that the zookeeper backend creates missing atoms

When 'create_missing' is true the atom should be created
instead of raising an exception; this is used when a flow
detail is updated with a new detail and then saved.

This also adds test cases that verify this happens so that
we verify this on an ongoing basis.

Fixes bug 1395812

Change-Id: I4851a08ff1ab4101dbec4a6656177908095c3c52
Raise value errors instead of asserts

Since asserts can be silenced using -0 and/or compiled out
we want to be more strict here and raise value errors when the
expected callable objects/functions are not actually callable.

Change-Id: Ib14e2e7329dbfcce50660f144ad4780d99f36854
Merge "Add a sample script that can be used to build a test environment"
Some package additions and adjustments to the env_builder.sh

This just adjusts to install wget and certain other packages
before further work commences to ensure they are ready and
avaiable for further use.

Tested on rhel6.x as a cloud-init userdata script and it appears
to continue to work as expected.

Change-Id: Ia85715e27bc8342fd61d23e2c8a659dbce20aea9
Be explicit about publish keyword arguments

Instead of allowing for arbitrary keyword arguments which
makes the API hard to change in the future prefer to have
explicit arguments (and keyword arguments) instead of allowing
**kwargs to be passed.

Change-Id: I374db6b19ef76c2f9ee04771f5d928c79b7cf049
Merge "Raise value errors instead of asserts"
Allow for the notifier to provide a 'details_filter'

When a notifier is being used for retry atoms and for
task atoms it is useful to allow a filter callback to
be provided that will skip notification depending on
whether the details matches or not (so that task or
retry notifications can proceed).

Part of fix for bug 1395966

Change-Id: If03005c253c3f540d2c33faf7a7474a5fde9dcdd
Update listeners to ensure they correctly handle all atoms

Instead of looking for keys that are task specific (as well
as using the deprecated 'task_notifier') we need to update the
listeners to be agnostic to atoms (retry or task) that are
sent to them so that key errors do not occur when extracting
any data sent along with the event notification.

Fixes bug 1395966

Change-Id: Ib61b34b83203f5999f92b6e8616efd90cb259f81
Ensure frozen attribute is set in fsm clones/copies

Change-Id: Ic267eaeeda70046e37e6edeb296a956f32c82edf
Workflow documentation is now in infra-manual

Replace URLs for workflow documentation to appropriate parts of the
OpenStack Project Infrastructure Manual.

Change-Id: I29028bae8800e0e5cc4e3c0ec56756f82f0e6fe3
Merge "Some package additions and adjustments to the env_builder.sh"
Move atom action handlers to there own subfolder/submodule

Since action handlers are atom specific it seems appropriate
to place the handlers under a specific submodule so that the
action engine module/folder layout is more obvious and makes
more sense.

This also adds on a handles(atom) method to those handlers
so that the runtime module/class can use those methods to
determine which handler should handle resetting an atom to
its initial state.

Change-Id: I7067d91347b41613fba1492d81d68a590f22c467
Merge "Be explicit about publish keyword arguments"
Merge "Move atom action handlers to there own subfolder/submodule"
Merge "Ensure that the zookeeper backend creates missing atoms"
Merge "Workflow documentation is now in infra-manual"
Merge "Allow for the notifier to provide a 'details_filter'"
Merge "Update listeners to ensure they correctly handle all atoms"