VMware: fix bug with booting from volumes

When booting from a volume without an image reference would cause
an exception.

Change-Id: Ib0302197b8d4f5e054a8c4426cb0dde7cb82842e
Closes-bug: #1235022
Fix status code of server's action confirm_resize for v3

The status code of confirm_resize should be 202, but it
returns 204 now. That because it returns HTTPNoContent
that overwrites the status code of decorator 'wsgi.response(202)'

And adds API samples for confirm_resize that used to test
the status code of confirm_resize.

Partially implements blueprint v3-api-unittests
Closes-bug: #1233561

Change-Id: I50a3046866af0a1efdb5c41ded40f973b02843e8
catch exception in start and stop server api

this catches exception.InstanceIsLocked in start and stop
server api.

Closes-Bug: #1233026

Change-Id: Ibb882178ab0770837702d503ef88c6510072e33f
baremetal: Use network API to get fixed IPs

Previously baremetal volume driver used DB API to get fixed ips and
DBNotAllowed was raised.

Change-Id: Ie2281311af1b60f55b5b719a2e2df6316bbaa9f6
Partial-Bug: #1208707
Uses oslo.imageutils

Commit 035668 had the QemuImgInfo class moved to Oslo.
This class was copied from Nova to Cinder and diverged since then.
The two projects will be able to use identical classes by importing imageutils.

Change-Id: If1962680906b3736d3f16f306b077483b122f878
Validate parameters of agent API

The agent API has some parameters, but they are not validated.
Each parameter is stored to the table "agent_builds", and each column
is defined as varchar(255).

mysql> desc agent_builds;
+--------------+--------------+------+-----+---------+----------------+
| Field        | Type         | Null | Key | Default | Extra          |
+--------------+--------------+------+-----+---------+----------------+
| created_at   | datetime     | YES  |     | NULL    |                |
| updated_at   | datetime     | YES  |     | NULL    |                |
| deleted_at   | datetime     | YES  |     | NULL    |                |
| id           | int(11)      | NO   | PRI | NULL    | auto_increment |
| hypervisor   | varchar(255) | YES  | MUL | NULL    |                |
| os           | varchar(255) | YES  |     | NULL    |                |
| architecture | varchar(255) | YES  |     | NULL    |                |
| version      | varchar(255) | YES  |     | NULL    |                |
| url          | varchar(255) | YES  |     | NULL    |                |
| md5hash      | varchar(255) | YES  |     | NULL    |                |
| deleted      | int(11)      | YES  |     | NULL    |                |
+--------------+--------------+------+-----+---------+----------------+

This patch adds the validation with the type and the length.

Closes-Bug: 1240458

Change-Id: Id06235ebde62f7b96c55b0bd2be5d941bfd2e999
Add V2 rpc api for consoleauth

Add support for the 2.0 consoleauth rpc API.  This commit retains
compatibility with the older 1.X API to allow continuous deployment
without any downtime.

UpgradeImpact - Deployments doing continuous deployment should follow
this process to upgrade without any downtime with the consoleauth
service:

    1) Sync all consoleauth services to this commit, so that they handle
       both new and old messages.

    2) Upgrade everything else to this commit so that all clients start
       sending the new messages.

    3) Upgrade past this, where support for the old messages will be
       dropped.

Part of blueprint rpc-major-version-updates-icehouse

Change-Id: Iad71d3c2801f9355968e69bce3308b84f922b239
Adds V3 API samples for console output

Adds api sample tests and api samples for console output

Partially implements blueprint v3-api-unittests
Partially implements blueprint v3-api-specification

Change-Id: I76664a1b0355011c7b42e8571eaf732faed44933
Fixes Invalid tag name error when using k:v tagname

This patch fixes the invalid tag name error when k:v type
tagname appears in response of api during xml serialization,
the tagname which contains colon couldn't be supported by
default since it is reserved by xml namespace, this patch
solve it by adding the k of k:v tagname into namespace.

Fixes bug: #1213927

Change-Id: Ib20efb378425cbe5deef45fbac561955cbe0f7bc
xenapi: ephemeral disk partition should fill disk

The current code looks to specify the expected start and finish values
for the partition. A unit miss match between what nova and parted count
as a GB seem to cause the difference.

As we just want to fill the whole disk, we can pass "-0" as the end
value, to tell parted to extend the partition to the end of the disk.

Fixes bug 1241734
Change-Id: Ie4753d9de1e20561b8f96360e879075498a5ef58
Merging two mkfs commands.

nova.disk.api.mkfs will use nova.utils.mkfs,
unless an arbitrary mkfs command has been provided by the user.
Preserving the default filesystem to be used for each os_type.

Also, adding run_as_root parameter to utils.mkfs, to allow it
handle block devices.

Change-Id: I3ca21e0ee80caa7e1152ebae56d73ed3c14844c0
Expose additional status in baremetal API extension

Add fields: uuid, task_state, updated_at, and pxe_config_path
to aid system admins in troubleshooting issues.

Fixes bug 1184449

Change-Id: Ia4c03cb228b3efe602455bf05883ddf03b7f18da
Remove deprecated libvirt VIF driver code

Libvirt vif specific driver classes have been replaced by a generic
driver LibvirtGenericVIFDriver and are deprecated in Havana, so we
can remove them safely.

DocImpact

Change-Id: Icecb3c9aa4282c511364107d87f8aba517a5ae14
Closes-Bug: 1235036
Make cells info_cache updates more tolerant

Allow lists or network models to be passed in for
instance['info_cache']['network_info'] in cells updates.  Ultimately
these messages will become more consistent when fully converted to objects.

Change-Id: Ifd46a3060418b3e2e4073c3b232937a18a225f99
Closes-bug: 1240730
Merge "Fix status code of server's action confirm_resize for v3"
Merge "Uses oslo.imageutils"
Merge "Validate parameters of agent API"
Merge "Expose additional status in baremetal API extension"
Merge "baremetal: Use network API to get fixed IPs"
Merge "VMware: fix bug with booting from volumes"