Fixes get_vm_storage_paths issue for Hyper-V V2 API

Add get_vm_storage_paths function to vmutilsv2.py

get_vm_storage_paths implementation on Hyper-V V2 API changed
compared to previous V1 API. In previous V1 APIs, using
Msvm_ResourceAllocationSettingData class can get storage
paths, but in V2 API, only using Msvm_StorageAllocationSettingData
class can get the storage paths.

Closes-Bug: #1248463

Change-Id: Ica73221524f162a6ffcd9dc64ee33c85fb5ad31d
Check Neutron port quota during validate_networks in API

Unless ports are passed into Nova it will create ports on the
requested networks as part of the network allocation in
the compute manager. However if the user exceeds their
port quota the instance will end up in an Error state, having
first been re-scheduled a number of times.

It would be much better if the quota failure was detected as
part of the network validation in the API server, so that an
error can be reported to the user and the creation failed.

A full fix would include reserving or creating the ports at
this stage, but there is no reservation mechanism in the
Neutron API, and port creation depends in some cases
on mac addresses only available on the compute manager.

Instead this change just validates the quota and adjusts the
max_count to be consistent with that quota, which doesn't
guarantee that the create will work, but does catch the
majority of cases.

Refs bug: 1172808

Change-Id: Iaaee059a6746fad68049712f94b2f8cfea6ab8dc
remove vmwareapi.vmops.get_console_output()

This code has been unused since commit
2ce3461595a490c9a02272ee4a1ab1eb55c27f60.

Change-Id: Ice72b0aba8af49b07528b30f46c012d69b712735
List NotImplementedError as a client exception for vnc

Not all drivers implement the get_vnc_console method.  In that case,
they will raise NotImplementedError.  List this exception as a client
exception so that the rpc layer does not log a traceback when this
happens.

Change-Id: Id30fd35b36cbd222b2d8787f00fa586d1ed4f11a
Catch NotImplementedError for vnc in the api

When a driver doesn't provide VNC consoles, it will raise
NotImplementedError back up to the API.  Catch this and return a 501.

Change-Id: I6b38be2b3b46dbaecfdb42ea9a139e3b691de193
Sync timeutils from oslo-incubator

Sync the following commit:

ae931a9 Avoid TypeError in is_older_than, is_newer_than

Change-Id: I963c79599fe6731dd84c90ee3f3fbfb02505e045
Partially-implements: blueprint periodic-tasks-to-slave
Related-Bug: #1259383
Fix interprocess locks when running unit-tests

When running unit-tests concurrently using testr, we might
need to use interprocess file locks (e.g. for running various
tests using the same DB in MySQL/PostgreSQL).

At the same time file locks are only usable when they are placed
to one dir, and we have a test fixture that overrides the lock_path
config value for each test case with a new temporary directory.

The solution is to create the one temprorary directory for locks
to be used by all tests before running tests and then remove it
after running tests. The corresponding helper has been already
put to openstack.common.lockutils module, we just need to reuse
it properly, i.e. change the way unit tests are run in tox.ini.

Closes-Bug: #1261728

Change-Id: I76f95a9f7fdd31c15e6cf4fd6316c7569284f780
When inject admin password, no need to generate temp file

Remove the useless steps in _inject_admin_password_into_fs function

Change-Id: I878c7d6d8c081c98e2e5eb2706bfa0d17d298f07
Fix parameter checking about quota update api

In quota_classes and quotas update API, parameters are checked
whether they are integer or not.
But when pass float values to these APIs, error doesn't occur.
Float values should be forbidden for the following reasons.
(1)If the value that user submitted and the value registered
   actually are different, user will be confused.
(2)Error messages of these APIs are "...must be integer...".
(3)In horizon, if a float is submitted, error message is displayed.

This patch fixes this problem.

Change-Id: I4c7df52ffff2d997da4e6267e25ec2ea4ab6f153
Closes-Bug: #1243037
Merge "Fix parameter checking about quota update api"
Merge "Fixes get_vm_storage_paths issue for Hyper-V V2 API"
Merge "When inject admin password, no need to generate temp file"
sync oslo service to fix SIGHUP handling

this is a sync of the oslo service code to fix a bug found in
the sighup handling. Previously it was not possible to use
devstack's unstack.sh because the service module would always
restart under a SIGHUP, not only when the process was running as
a service. SIGHUP on a non-detached process should act like
SIGTERM. This change fixes that.

Change-Id: Ib260d82519fde5c5cb24a2c0c8a7cccd0b96b84f
Related-Bug: #1263122
Merge "Fix interprocess locks when running unit-tests"
Revert recent change to ComputeNode

This reverts the object-related parts of 4c21f4a. The problems with
it are:

- It didn't bump the object version
- It introduced a JSON blob string attribute to the object,
  which is unversioned structured data, which can't be
  checked or guaranteed during upgrades.

The first one, of course, breaks live upgrade because an older
node receives fields it doesn't know about, but should based on
the version.

Offending change I75e339c2a2827875078c937e57c37e85d3ad1852

Change-Id: Ie280dc6fe27e48aea9939131c9e695c60b132414
Merge "sync oslo service to fix SIGHUP handling"
Merge "remove vmwareapi.vmops.get_console_output()"
Merge "List NotImplementedError as a client exception for vnc"
Merge "Check Neutron port quota during validate_networks in API"
Merge "Revert recent change to ComputeNode"