Adding marker, pagination, sort key and sort direction to v2 api

Taking a cue from quantum, use glance's pagination function.

bp api-pagination

Change-Id: Ida7ade8d9332c88679849f7c640651df7e855abb
Adds synchronization to attach volume.

This patch adds the following changes:
1. Move db update for volume status during attach to volume.manager
2. Add lock synchronization to volume attach operation
3. Related unit tests

Fixes Bug 1087253
Change-Id: I15242766bf4cfa4da67789c485fdf6886983eb45
Add pyflakes

Add tox option to use pyflakes.

Change-Id: Ic77ec3f54cb89341d5b01feb3417e07f43d20c9c
Signed-off-by: Chuck Short <chuck.short@canonical.com>
use deleted = False, not 0 for update

Fixes bug #1095401

When running tempest on cinder on postgresql we get a number
of errors because this call was trying to set deleted = 0.
On mysql 0 == False, but on postgresql this is a type error.

Change-Id: Ice85550e8138e0656c93a8a800afdbc5935e4bcc
Merge "Adds synchronization to attach volume."
Merge "Add pyflakes"
Merge "Adding marker, pagination, sort key and sort direction to v2 api"
Add missing library

According to pyflakes:

cinder/api/common.py:246: undefined name 'minidom'
cinder/api/common.py:254: undefined name 'minidom'
cinder/api/common.py:272: undefined name 'minidom'
cinder/api/common.py:284: undefined name 'minidom'

Add from xml.dom import minidom

Change-Id: Iadb1586ac15c29bb1f2154324e529976f82c19f0
Signed-off-by: Chuck Short <chuck.short@canonical.com>
Fix cmds clearing in TargetAdminTestCase.

clear_cmds() should reference self.cmds rather than cmds.

Change-Id: I1d191aee6a713cf9f2b08c46bf47c1959235cc15
Snapshot support for XenAPINFS

Related to blueprint xenapi-storage-manager-nfs

Add support for snapshots, by implementing it with deep copies. Each
snapshot is a copy of the volume. Snapshot object has a new,
provider_location key, to store volume parameters.

Change-Id: Iea06246319ce82d5fcfe417419156ec83ef0a895
Format code - eliminate long lines
Add cinder specific bits

Change-Id: I56a9d3e4bcc8833a37bbdbe51ed60c511a35a230
fix bad hacks

Change-Id: Ie79db5e0379ae535594ad79973a80ced348cd72b
Rename migration script

Change-Id: I7ac77249b1f37238e01bcfee7bd0393621827e59
Added tests

Change-Id: I15ed441d58043a3b6e2024209f5b566eeab637fe
Remove non-used imports, variables

Change-Id: I8cff795db0336676c818b960b7ac58459aa83639
Add relation and foreign key so snapshot can reference to its volume

Change-Id: I9d4393897feabacdedaf74f81019317baf1e4897