Issue brctl/delif only if the bridge exists

Add a check for existence of the bridge before we try cleaning
up as we see a lot of spurious exceptions in the logs especially
when rebuild_instance is in progress and terminate_instance is
issued

Closes-Bug: #1243488

Change-Id: Ib0e2e4d9506e3a8f63201d28a3fc2c910c77d3bd
Add test for class InsertFromSelect

InsertFromSelect is used to generate SQL statement like
"INSERT INTO table1 SELECt * FROM table2".

Change-Id: I0fec93463be1e9930b24862724b7a6d1c8cc52af
Check return code of command instead of checking stderr

Command "ip link show" return a no 0 return code when passing
a no existing ip interface so we should use the return code
instead of checking stderr because stderr can contain messages
from the system even though the command succeeded.

Change-Id: Ic43e72dab3c5b6e266240b7ff7309ca3b44f8ed5
Closes-Bug: #1248699
libvirt: Allow delete to complete when a volume disconnect fails

If an instance which was booted from a volume fails to spawn, the
instance is left in an ERROR state.  If the failure is in the networking
stage Nova will not have attached the volume via the Cinder driver,
and so the volume remains in an available state.  In this state the
volume may be deleted or assigned to another instance.
During the subsequent delete an exception may be thrown from
the cinder driver which prevents the instance from completing the
deletion process leaving the instance stuck in Error and unable to
be deleted.

Volume exceptions should be logged and ignored when the instance
is being deleted.

Closes-Bug #1222979

Change-Id: Icb3796b0ddba25cf344953a649b2e762fab6d782
Fixes RequestContext initialization failure.

RequestContext initialization failed in nova because of the following
error:
"TypeError: 'in <string>' requires string as left operand, not NoneType"

It must traverses in tuple not in string when find the "volume" service_catalog.

Change-Id: Ie0de50fcafbeabf4698696add610d4e6804f45eb
Closes-Bug: #1248424
Merge "libvirt: Allow delete to complete when a volume disconnect fails"
Merge "Fixes RequestContext initialization failure."
Merge "Issue brctl/delif only if the bridge exists"
Merge "Add test for class InsertFromSelect"
Merge "Check return code of command instead of checking stderr"