Add 'create_volume' to scheduler RPC API.

Instead of directly call RPC methods, 'create_volume' should be
implemented in scheduler RPC API in order to do versioning.

This increases scheduler RPC version to 1.1

Change-Id: I22d5a097ec3a73c3460f4acd35c602da57f8b52d
Fix 401 from auth_token middleware

The openssl popen call to verify the token returns an error code
of 2 when a file doesn't exist. Normally this is caught and the
relevant file is downloaded, but monkeypatching os causes this
error code to be eaten and cinder to return a 401. Note that this
is likely a race condition that depends on exactly when greenthreads
are switching that is causing the return code from Popen to get
overwritten.

It is possible that this is exposing an underlying bug in eventlet
but the workaround is simply to make sure that we don't monkeypatch
os.

Fixes bug 1075838

Change-Id: I69ba75136e32e95c6fdf108f0c4fe21a5e3bdbe6
Changes bit mode of zadara.py to 644

Change-Id: I0b4693d7da4ecfe5242dc302630c40ed2b8268ef
Port openstack-common/uuidutils to Cinder

openstack-common has a new uuidutils to handle is_uuid_like(),
port it to Cinder.

Change-Id: I0ccc6166854193137af6a3210d3c465dd38fd955
Splitting out volume drivers in driver.py

Moved RBDDriver, SheepdogDriver into their own respective driver
files under cinder/volume/drivers/*. Moved FakeISCSIDriver and
LoggingVolumeDriver into a fake driver file under the tests,
since that's the only place where those are used.

Implements bp driver-cleanup

Change-Id: I39d91ac8e498a9e42c5443db16706203b988444b
Add admin only action for force detach

This action calls the same methods nova would after it successfully
detaches a volume.  By exposing it to the administrator it makes it's
easier to repair un-syncronized state between services.  Generally when
the host is no longer attached, but the volume state is wrong.

Future work: The Iscsi based drivers don't seem to use
initialize_connection and terminate_connection to create the export for
the volume.  This would be more useful with drivers that do that.

I added the force parameter to terminate_connection for drivers that may
want to differintiate between a normal terminate and the force detach.

Future Nova work:  Nova will want an admin action to update the bdm
tables - today it's a bit of nova-manage shell work.

Change-Id: Icc1cff0f50a5ace9ebdae62c85524ee8d6ec23e0
Fix run_tests.sh ambiguous usage msg and behaviour for -x option

In commit
https://github.com/openstack/cinder/commit/
50792c2ff41fdc7e73b3e3c51f4510366debfd14,
the committer wanted to add an option in run_tests.sh for generating XML
coverage report, but ended up accidentally overriding the default nose
option -x. But, the usage message still showed that using option -x will
'Stop running tests after the first error or failure'. So, I changed the
option to generate XML report to  -X (capitalized 'x'). So now both -x and
-X options are available, with different purposes.

Fixes bug 1070047

Change-Id: Ie8c30c14629d4811d6db74f3eea9cdecb1d27c8a
Scheduler API clean up and refactor

Unlike Nova scheduler, which has to consider serving compute and volume
scheduling, Cinder scheduler only serves volume scheduling, so there's no
need to keep generic interface 'schedule'. Instead, 'schedule_create_volume'
is added (if missing) to manager/driver class and chance/simple scheduler
driver implementation.

Also this patch changes the interface between API service and scheduler to
allow more information about volume is passed to scheduler for advanced
scheduling while maintained backward compatibility. And this change bumps
scheduler RPC API to version 1.2.

Change-Id: I42be05675cd73f89a03c84105ec512d7ee4f3c3a
Import order cleanup per HACKING

Change-Id: I5540a5d24f45aa51e0ef58b43427fbaf7726da89
Moving common api code into cinder.api

This is progress for beginning to have separate versions of the
cinder api. Common code that would be shared by v1, v2 etc will use
these modules, so we'll just move them to a common place. Test directory
structure has also been updated.

progress on blueprint apiv2

Change-Id: I99fd95fc3bb5d4f4fc3d9ef5b76b6372a1f6033d
moving all middleware code in cinder.api.middleware

This includes auth, sizelimit, and faultwrapper middleware. Test
directory struture has been adjusted to match.

progress on blueprint apiv2

Change-Id: I62eecb208553abfee8dc8d2679264884b4cec153
Switching api to use base extension manager

progress on blueprint apiv2

Change-Id: I68640a88c7c2b7ee4c6661fa26a4f82d9c63b00f
Moving api v1 implementation into v1 directory

Adjusts paste to use composite factory for routing properly to v1 and
future api versions. Tests have been adjusted to match directory
structure.

progress on blueprint apiv2

Change-Id: I2cd3908705d224872b2d615cabe210fb1c453232
Moving contrib to cinder.api

This moves over all contrib to a common place for all api versions to
use. Test directory structure has been adjusted to match.

progress on apiv2

Change-Id: If1a24fd3c4d15db559674a021f6928613966e3a1