Optimize 'fixed_ip_bulk_create' function

1) All single 'insert' operations were changed by
single 'multiline insert' operation

2) Explicit flush() was removed

3) Using code from oslo.db provides
getting error value from DBDuplicateEntry exception

Change-Id: Ib3d99b950bcf5e97ac5d6099d5ccfbe98906b339
Specify storage IP for iscsi connector

The virt drivers supply a connector hash to cinder volumes when
attaching. This used to basically default to CONF.my_ip. This patch
allows the host to have a separate config option in the case the block
traffic is on a separate network.

DocImpact: Adds my_block_storage_ip config option for block traffic going
over a separate network.
Closes-Bug: #1347025

Change-Id: I2bab7226376acd7da78e038a230bf65613547ba6
Limit InstanceList join to system_metadata in os-simple-tenant-usage

The simple-tenant-usage API is calling get_active_by_window_joined with
all of the default instance attribute fields when really only
system_metadata is needed (to get the related flavor). That adds
unnecessary load times on the DB query and data processing when
constructing the instance list, especially given this is a query over a
time range of instances, so as you add more instances to scale it's
going to slow down.

This simply limits the expected_attrs in the get_active_by_window_joined
call to system_metadata so we don't load the other unnecessary
attributes.

Closes-Bug: #1383469

Change-Id: Ic77d51cd45730ca664e68cfe0cb1671b5442d4a9
Enable pep8 on ./tools directory

This patch fixes the pep8 issues of the tool scripts and
configures tox to run pep8 on the tools directory.

Two hacking rules have been modified to ignore the tool directory as both
rules are checking oslo usage which is not critical in case of tools
- N310 use timeutils instead of datetime module
- N324 use jsonutils instead of json module

The tools/xenserver directory is still excluded from pep8 as it contains
scripts that are expected to run on dom0 with python2.4 therefore the
following rules cannot be meaningfully followed
- H231  Python 3.x incompatible 'except x,y:' construct
- H233  Python 3.x incompatible use of print operator

Change-Id: Icfd9e708a2ca1e421676b410e41807b2e630718f
Implement 'personality' plugin for V2.1

User can specify 'personality' attribute while server creation
& rebuild to inject files into server.

This patch implement this as separate plugin for V2.1 API.

Also define the schema and unit tests for the same.

Partially implements blueprint v2-on-v3-api

Change-Id: Ia0c527539af7fe33eba4999822476653e1b96bc6
Port floating_ips extension to v2.1

This patch ports floating_ips extension from v2 to v2.1,
and have v2 unit test cases shared between v2.1 and v2.

Partially implements blueprint v2-on-v3-api

Change-Id: Ib06c0d6c7ff123f09a99ed94f4b0009695897602
Fix v2.1 API os-simple-tenant-usage policy

Current etc/policy.json contains typos about os-simple-tenant-usage of
v2.1 API and the authorization doesn't work at all.
This patch fixes the typos.

Partially implements blueprint v2-on-v3-api

Change-Id: I2d1c3290fe336219fcc5523d26b1f8c11e35566f
objects: introduce numa objects

This work is a prerequisite to convert VirtNUMAHostTopology
and VirtNUMATopologyCellUsage to objects

Change-Id: I6cafb1954f93a185fc9f570ee6091d75769075f4
objects: move numa host and cell to objects

To continue objectification of numa, this commit move
numa host/cell related to objects.

Change-Id: I9fbc3ed6d9bd74840e42586faa9951d9672691c1
Fix URL mapping of server metadata PUT request

This patch fix the URL mapping of server metadata PUT request to
'update_all' method by adding the project_id.

Partially implements blueprint v2-on-v3-api

Change-Id: I4650d50ffc804166e13a115c5dd00bd4cc3a5209
Fix URL mapping of image metadata PUT request

This patch fix the URL mapping of image metadata PUT request to
'update_all' method by adding the project_id.

Partially implements blueprint v2-on-v3-api

Change-Id: I0d6c7475797499652ac74be503438e76905eed16
Merge "Port floating_ips extension to v2.1"
Merge "objects: introduce numa objects"
Merge "objects: move numa host and cell to objects"
Merge "Implement 'personality' plugin for V2.1"
Merge "Fix URL mapping of image metadata PUT request"
Merge "Specify storage IP for iscsi connector"
Merge "Fix URL mapping of server metadata PUT request"
Merge "Fix v2.1 API os-simple-tenant-usage policy"
Merge "Limit InstanceList join to system_metadata in os-simple-tenant-usage"