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
Synced jsonutils and its dependencies

The sync includes change that drastically enhances performance on Python
2.6 with fresh simplejson library installed.

The latest git commit in oslo-incubator:
- 109e325eec054aefe4fcef4b928a46a6d7247e05

List of synced commits:
* gettextutils.py:
  - de4adbc4: pep8: fixed multiple violations
* importutils.py:
  - 1173e469: Remove ValueError when accessing sys.modules
* jsonutils.py:
  - 0d7296f6: Add kwargs to jsonutils.load(s) functions
  - 18f2bc1b: Enforce unicode json output for jsonutils.load[s]()
  - 9e5a3938: jsonutils.load() accepts file pointer, not string
  - a6b2aecf: On Python <= 2.6, use simplejson if available
* strutils.py:
  - 8a0f5678: Remove str() from LOG.* and exceptions
  - fd18c288: Fix safe_encode(): return bytes on Python 3
  - 302c7c80: strutils: Allow safe_{encode,decode} to take bytes as input
* timeutils.py:
  - 250cd88c: Fixed a new pep8 error and a small typo

Change-Id: Ib3dc0b713ed90396919feba018772243b3b9c90f
Closes-Bug: 1314129
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
VMware: Fix fake raising the wrong exception in _remove_file

fake was raising exception.FileNotFound error if a file was not found.
However, an actual delete on a non-existent file raises the error
returned by vSphere, which is error_util.FileNotFoundException. This
breaks tests which exercise error paths expecting the real error to be
raised.

Fortunately this change doesn't break any existing tests. However, I'm
not sure that's a good thing.

Change-Id: I2025bffa887582eaa9e9072d0400f90ca97d1898
Add test cases for block_device

There is no test for function new_format_is_swap and
new_format_is_ephemeral in block_device, this patch add test
cases for the 2 functions.

Change-Id: I86abafca5cb48e92574aec95d5e8c914efef2a45
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
Imported Translations from Transifex

Change-Id: I2d0fc0a66fc486cec97bfc139d967741ac0c83ce
Merge "Add test cases for block_device"
Merge "Imported Translations from Transifex"
Merge "VMware: Fix fake raising the wrong exception in _remove_file"
Merge "Synced jsonutils and its dependencies"
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