Clean up unused variables

This just removes a few variables that were unused and makes my linter
happy.

Change-Id: I0bc9fc1474e15801e4df84f78636c96ea1f916ff
Libvirt:Instance resize confirm issue against NFS

when I test resize-confirm on NFS (KVM) using at least two
compute nodes, OSError will occur when try to cleanup the
backup instance directory and will make instance status
"Error".

One way to cleanup resize is using delay_on_retry and
maximum attempts setting. Replace rmtree() because
execute() have more parameters choices.

Closes-Bug: #1248019

Change-Id: Ifb9a500bbba805af0317307c2e7d6903dcd02ad1
xenapi: stop hang during glance download

It seems there are cases when the server gets stuck in a building state
because the download from glance fails, but the nova-compute doesn't
find out.

After some code inspect, a likely cause seems to related to having no
socket timeout inside urllib2 when we download the image from glance. A
workaround for this issue is to configure the default socket timeout as
described here:
http://docs.python.org/3.1/howto/urllib2.html#sockets-and-layers

Fixes bug 1251650
Change-Id: I8b34d95d3524f3825b28e61cbbb59290653d3711
Fix UnboundLocalError in libvirt.driver._close_callback

If for whatever reason _wrapped_conn is None or not equal to the conn
parameter passed to the _close_callback method, the local _error
variable won't be set when calling set_host_enabled and result in an
UnboundLocalError.

Partial-Bug: #1257644

Change-Id: I40855f22d5449f3b3646c90fe2d9a71560eb86c4
Sync middleware audit, base, and notifier from oslo

Pull in middleware modules required to support CADF auditing
reports from Nova.  audit.py requires notify.py, and
notify.py requires base.py.  This is why those 3 files are
being synced, and not others in the
openstack/common/middleware directory from oslo.

The following 3 change IDs included in this sync provide
the main parts of the CADF functions being synced:

Ie67cf4a7 Add audit middleware
Iead2431a Middleware: add notifier
I05ff58   Move wsgi module to deprecated package

The following change IDs additionally included in this sync
provide minor updates to the files that were made after the
main parts of the CADF functions were merged in oslo:

I032616   Changed header from LLC to Foundation based on
          trademark policies
I840c43bf add support to ignore certain request
I2099e1ee Enable hacking H404 test
I04b0cf   middleware: code cleanup

blueprint support-standard-audit-formats

Change-Id: Id15f95a0c354270ba2d5aecb12c4f910905e8c20
baremetal: volume driver refactoring and tests

Refactor the LibVirtVolumeDriver to test each step of
attaching and detaching a volume. And add tests.

Closes-Bug: 1240470
Change-Id: I51906bec6ba5d6af71997df277bb368cff81b3b3
Merge "xenapi: stop hang during glance download"
Remove the largely obsolete basepath helper

Now that there is a static method for calculating the path to the
config drive, there was only one user left for basepath, and it was
a special case "no filename" user. So, remove it.

Change-Id: I8f4efe19da41d159e929853a5e757e0e168885d7
Merge "Fix UnboundLocalError in libvirt.driver._close_callback"
Merge "Clean up unused variables"
Raise better exception if duplicate security groups

Previously a 500 error was raised if one was trying to launch an instance
with a security group that shared the same name as another security group.
With this patch a more clear error message is raised.

Closes-bug: #1161472

Change-Id: I285bedbb2e0b3f4cd24cfa3a9b17131ad0200afa
Merge "Remove the largely obsolete basepath helper"
Merge "Raise better exception if duplicate security groups"
Merge "Libvirt:Instance resize confirm issue against NFS"
Merge "Sync middleware audit, base, and notifier from oslo"
Merge "baremetal: volume driver refactoring and tests"