Make scheduler code use object with good practice

commit 6c32576b move objects definition into object folder directly,
all other modules do not need to import other objects modules.
So current code didn't use good practice of objects usage and this
patch adjusts the code to use objects better.

Change-Id: I256dc9e3a2802a5c54d4d5e38f0b11039c031e96
XENAPI add duration measure to log message

The xenapi snapshot command states when the command completes
but does not put any really useful information in the message itself.
This commit adds the duration the snapshot upload took and
which image was created to the log message.

Change-Id: I684d5152e02f31772ab69e0a8e4931b365a0267c
Remove deprecated spicehtml5 options

Now that we are in Kilo, remove options deprecated in Juno.

Options deprecated in I36c014c8b8a0796cda494f9450a1fc30104504a1

Change-Id: I2c634197229977a1d54444e5be56ad910c664231
Switch default cinder API to V2

Cinder v1 is deprecated and using v1 emits a warning (introduced in
Id8abbbb4d9b0c8c49ab51fc3d958ef0d487467f8). So update the default value
to Cinder v2.

DocImpact

Closes-Bug: #1390131

Change-Id: Ica650962c9354d741b464ec152e9e1c6d0d5fa10
xenapi plugins must target only Python 2.4 features

Add a comment documenting the restriction that our xenapi plugins must
target Python 2.4 features because of restrictions with the XenServer
dom0 userspace.

Change-Id: Ide130923b16c0555c3190cbd63ce97e18d18aae0
Merge "Switch default cinder API to V2"
Merge "Remove deprecated spicehtml5 options"
Merge "XENAPI add duration measure to log message"
Merge "Make scheduler code use object with good practice"
Drop max-complexity to 47

Now that we fixed the two worst offenders, drop the mccabe
max-complexity setting in flake8 to 47.

Add note explaining how to generate a list of functions that are too
'complex'.

Change-Id: I44000e9e95c457ae9000c428460b5825d8ad3f92
Merge "xenapi plugins must target only Python 2.4 features"
Merge "Drop max-complexity to 47"