Improve exception from importutils.import_class().

The ImportError raised by import_class() attempted to tell you what the
original error was by just doing str() on the original exception.
Sometimes that's helpful, but sometimes a full traceback is needed.
This patch includes a traceback for debugging purposes.

Change-Id: I00cefb9ebf9d6a71ef491204d81765e30e7941f6
Add 'filedecoder' method to the jsonutils wrapper module.

Fixes bug #1017765

After version 3.3.2, the anyjson library will throw a KeyError if
filedecoder isn't present.  The filedecoder is just like the decoder
except it takes a file instead of a string, like json.load() instead
of json.loads().

Change-Id: I7bd012a7b4afa9b1ec987c3e6393cc922b5dadff
Fix import order.

Fix import order in rpc.common.  They must be alphabetical.  Nova tests
for this and caught it when i synced in the latest changes.

Change-Id: I0dbd6b5004d754d0bd2d1861905db3405c64e3d4
cfg: Fix typo in documentation

with with -> with

Change-Id: I7a524c024b05639ec7ab4d57b6a52f70a95d2235
Add common plugin framework.

For blueprint novaplugins.

It turns out that most of the plugin framework applies equally well
to other projects, so it's going into Nova via common so that
other projects can pull it in with a minimum of fuss.

Change-Id: Ia4455a8ca0b8c1c3e4b0b9647e8cacaf0a47c914
pep8 cleanup in the plugin code

The nova hacking test turned up one alphabetization error
that I missed previously.  Also, our path-altering
process caused one line to exceed 80 characters
when copied into nova; that line is shorter now.

Change-Id: Ia3acfc25ecc5ba388526766dae3ed03792e906e3
Minor pep8 cleanup in rpc.

Removed a space, reordered an import.

Change-Id: I418d1f7c6a5a3b8ef231c88b4ef28114ca0eb7cd
Rework the version consumer functionality.

Moved the version routines into a class for better structure.
Added caching/memoization logic so that pkg_resources/git doesn't get
called more than is necessary.
Added periodic-based caching that will only cause the meta info refs to
be checked at most once a day, to reduce network load for developers. (The
information in the meta refs should really only change once a month, and
this will only affect local developer workstation version reporting, so we
should be fine here.
Added a deferred version string class and function to allow for consuming of
the version string but doing the calculation only when it is requested,
based on test runs in glance.

Change-Id: I6a436c8817f6904959727a76d876b807ec545ee9
Fix line length for pep8 compliance after cloning into other projects

There are a few lines that are close to the length limit so they pass
the PEP8 check under the common repository but fail the check after
the code is cloned into another project such as ceilometer. These
changes adjust the lines to give more space to allow the merge into
the other projects to go ahead without breaking the pep8 gating tests.

Change-Id: I33a05f5b51120114cc8ceffd0bf1b1ef462ed636
Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
Merge "Add common plugin framework."
Merge "Improve exception from importutils.import_class()."
Merge "Fix import order."
Merge "cfg: Fix typo in documentation"
Merge "Add 'filedecoder' method to the jsonutils wrapper module."
Merge "Fix line length for pep8 compliance after cloning into other projects"
Fix missing gettextutils in several modules.

Fixes bug 1021453.

Change-Id: I05771a588746a0e43fec0078c5c7152dd9d33b9f
Add SKIP_WRITE_GIT_CHANGELOG option to setup.py

Updates the write_git_changelog function in setup.py so that
it will skip changelog generation if the SKIP_WRITE_GIT_CHANGELOG
env variable is set.

The motivation for this change is to speed up running sdist which
gets executed at the begining of a tox run. Some projects (like Nova)
can take between 10-20 seconds to generate a changelog in this fashion.

Change-Id: I2e75060d303bc8fae784129e8e42f09922a8b09e
Add SKIP_GENERATE_AUTHORS option to setup.py

Updates the generate_authors function in setup.py so that
it will skip generation of the authors file if the
SKIP_GENERATE_AUTHORS env variable is set.

Authors doesn't currently take that long to generate but having
the option to explicitly skip it (regardless of whether .git is there)
seems like a good addition.

Change-Id: Ie18064d2450cecc86f18d0b10e1ce473253d1a51
Merge "Add SKIP_GENERATE_AUTHORS option to setup.py"
Add more rpc version docs.

This patch adds some additional documentation, including some examples,
on making changes to versioned RPC APIs.

Change-Id: I5f40b11e07538f36d0f1299f7e822b408bf8e96a