Remove duplicate code in Objects create() function

Remove duplicate code updates.pop('id', None) in create() function.
Because if self.obj_attr_is_set('id'):
            raise exception.ObjectActionError(action='create',
            reason='already created')
already make sure object doesn't have 'id' values, which means that
'id' won't appear in updates.

Change-Id: I582ef8857b32c07ea8ba1eb5fc1e64516110f3ce
vmware: Refactor: fold volume_util.py into volumeops.py

volume_util.py seems to have originally been intended to be a general
repository of operations on volumes. In fact, it was an arbitrary
collection of iscsi functions which were exclusively called by
VMwareVolumeOps with VMwareVolumeOps private data as arguments.

This change moves all functions from volume_util.py into
VMwareVolumeOps in volumeops.py. This makes it simpler to read and
understand the code, as there is now only a single place to look for
iscsi functions. It also moves StorageError into volumeops.py, as that
is the only place it is used. Arguments have been updated to use
private data directly rather than having them passed in. In addition,
function names have been updated to accurately reflect their actual
purpose.

There are no functional changes. All code change is purely mechanical.

Change-Id: I17f4b71c0314e555d9f7dc1a935865865dd06c51
vmware: Reuse existing StorageError class

Change-Id: If3061b8ebc5ca50a03428b67a0b941f07a314d04
vmware: Use exc_info when logging exceptions

There were several instances where we were logging exceptions as a
string, but from the context a full stack trace was intended. This
change updates these to use exc_info, which logs the exception with a
full stack trace.

Change-Id: I93ac0208c3643ac90ffb36e50ad59f49c66ad88b
Fix exception raised when a requested console type is disabled

The get_{vnc/rdp/spice}_console calls should raise
ConsoleTypeUnavailable not ConsoleTypeInvalid when the
corresponding console is disabled (rather than supplying an
invalid subtype).

Also removes exception handling of ConsoleTypeInvalid from the
os-remote-consoles V3 API plugin as the schema validation ensures
the input passed to nova internals is valid.

Change-Id: Ia444775ff6ec1d869d810bc689914efb8cd233a4
Fix rest of compute objects usage

Change the rest of compute to use objects.<Object> vs
objects.<module>.<Object>.

Partial-Blueprint: object-subclassing

Change-Id: I1a33733144ca3ffe7b9d7c32f0113f1aa1f664cc
Fix rest of API objects usage

Change the rest of API to use objects.<Object> vs
objects.<module>.<Object>.

Partial-Blueprint: object-subclassing

Change-Id: I04db37c21547184f5aeb970e69547d6210be0c3e
make lifecycle event logs more clear

Instead of logging integers in a cryptic way, log the human
readable strings for VM event state transitions. Also use the
existing instance_uuid port of the logger instead of putting that
separately into our log message.

Change-Id: I96c39ad4494aa06a8dd5bd942c669a16836a8b9c
Merge "Remove duplicate code in Objects create() function"
Merge "Fix exception raised when a requested console type is disabled"
Merge "vmware: Refactor: fold volume_util.py into volumeops.py"
Pass instance object into _shutdown_instance()

The compute manager _shutdown_instance() method can take
instance objects so there is no need for _delete_instance() to
pass an instance dict anymore.

Related to blueprint compute-manager-objects-juno

Change-Id: I2294ea03a4e648e0427446fb7baca70f5f5fb221
Merge "vmware: Reuse existing StorageError class"
Merge "vmware: Use exc_info when logging exceptions"
Merge "make lifecycle event logs more clear"
Sync oslo lockutils to nova

The commit to be merged:

5c11c4d0 Don't import fcntl on Windows
de4adbc4 pep8: fixed multiple violations
9e88af17 fixed typos found by RETF rules

Related-bug: #1335897

Change-Id: Iec4cbb5fa7265b181a851f6ebfac9cd7c5685ed7
Merge "Pass instance object into _shutdown_instance()"
Merge "Fix rest of compute objects usage"
Merge "Fix rest of API objects usage"
Merge "Sync oslo lockutils to nova"