Add import_opt() method to ConfigOpts

Related to blueprint cfg-global-object

When using the global config object pattern, you often have modules
which define options that are referenced in other options.

So, for example if module A defined option 'foo' and module be needed
to reference that option, you might do:

  import A
  print CONF.foo

However, this makes it entirely unclear to the casual reader why
module A was imported.

Nova has a flags.DECLARE() function that helps with this problem
by allowing you to do:

  flags.DECLARE('foo', 'A')

The function simply imports module A and checks that the 'foo'
option is now defined in the global config object.

This is fine, but it is also implicit that this function applies
to the global config object. Instead, let's do the following:

  CONF.import_opt('foo', 'A')

Change-Id: I7b98f5be71068bbde70cc0eab991eaebb577de52
Make receiver spawning in impl_zmq more robust/clean.

The receiver spawning had some faulty and complex logic
which this patch improves. The old logic was logging detection
of a zmq-receiver socket, although the code was also launching
a receiver daemon. It was also doing dirty things such
as intentionally doing a return to trigger a finally block.

Change-Id: Ic044710679c43753240a2b9d909088af5317cbf4
Add multiple-driver support to the notifier api.

Move all of the functionality previously provided by the list_notifier
into the basic notifier api.  Move and restructure tests accordingly.

Remove the list_notifier file and test file.

For bug 1025820

Change-Id: Idf7cb975dd78e9951188781622a4d10ca466b154
Fix meaningless test case

Related to fixing bug 1031351

The testcase was meaningless.

Change-Id: I7b88b86a600fac0c30bcac354262ac00593b495c
Merge "Fix meaningless test case"
Rename FLAGS to CONF; Remove self.conf

Remove all uses of self.conf and rename FLAGS to CONF.

Change-Id: If7b3a3e69fe3c3d2c83033d2b44eb106794ef087
Merge "Add import_opt() method to ConfigOpts"
Support for marshalling datetime while preserving microseconds.

Needed for performance measurement via "inflight" service.

Change-Id: I5c1a8395b4cbc5fc0f8649b3af8130f45dd401bb
Merge "Make receiver spawning in impl_zmq more robust/clean."
Tilde expansion for --config-file and --config-dir

Fixes bug #1012671

Allow a filename starting with ~ or ~user to be passed for
--config-file or --config-dir.

Change-Id: I67705401ed1c35c0cc2161095e36616552740aba
Allow set_default and set_override to use None

The current implementation interprets set_default('foo', None) and
set_override('foo', None) as 'clear the existing default or override',
which makes it impossible to override a value with None.

This patch adds support for overriding with a None value by adding
a special internal class. set_override('foo', None) will now override
the existing value with None. This is a slight change to the existing
behavior, so this patch adds two calls for the old functionality of
clearing defaults and overrides. Example syntax for the new calls
are shown below:

conf.clear_default('foo')
conf.clear_override('foo')

The patch also updates the tests to reflect the change in functionality
and adds new tests to verify the new functionality.

Fixes bug 1035478

Change-Id: Iee5e20e44da9bef6b86e0483ab0b48b625fe503c
cfg: clean up None value handling

Remove the need for an internal NoneValue class by making the existence
of the 'default' or 'override' keys signify whether a default or
override is set.

Change-Id: Iacf49553df5ba8414307904a3ee334c7b8c55758
Merge "Allow set_default and set_override to use None"
Merge "cfg: clean up None value handling"
Merge "Rename FLAGS to CONF; Remove self.conf"
Remove amqp import from rpc/test_common

This import is no longer used.

Change-Id: I4683a5b173fecc345b27c43b6cace39b4b491e8b
Move manager.py and service.py into common.

- Just start with the skeleton classes.

Part of blueprint service-infrastructure

Change-Id: I90fbff3805455d9d82aacf43257d74e4cb443042
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Basic service launching infrastructure

Part of blueprint service-infrastructure

Change-Id: I4e97db2877be976b0c681da9ff0d331fbfb306b0
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Remove register_opts from client methods

During the nova->common migration,
it was required to call register_opts on every
client RPC api call. This is no longer required
with cfg.CONF.

Change-Id: Ia46c5d54e68c4d86a87570b2caff0da9755ca931
Remove unused imports

Fixes bug #1037578

Change-Id: I87dbd0bc5fe16a4416a676dc26f2446a54509bc1