Return a NetworkInfo object instead of a list

This return a NetworkInfo object instead of a list when there are no
configured networks available.

Fixes bug #1222781

Change-Id: I59c88944253ed5ff8b567d79046c3065fdfed9ab
Add flag to make baremetal.pxe file injection optional

File injection is slow and risky, So make it optional. File injection
was used for getting networking configuration into the baremetal nodes,
but neutron can do this now. File injection is also used for general
file injection and password injection, but those should be optional as
well.

Change-Id: If59641952255e5aaf3767524e2b3c566eefe2b74
Related-Bug: #1178103
Adds v3 API samples for hide server addresses and keypairs

Adds the v3 API samples for the hide server addresses and
keypairs extensions. Bundled together to reduce review load

Partially implements blueprint v3-api-specification

+DocImpact

Change-Id: If331d79a878af7543c8792ab4d675fc996c3cd04
Move call to _default_block_device_names() inside try block

During instance builds, a call to _default_block_device_names() is
made which contains a db call to update the instance. In case the
instance is gone it will throw an unhandled InstanceNotFound exception.

To properly handle this, move the call to _default_block_device_names()
inside the existing try block next to it that handles this exception.

Change-Id: I3503029f02669e6ae31441653096fa69cba76d45
Closes-Bug: #1224677
Fix HTTP response for PortNotFound during boot (v3 API)

If a non-existent Neutron port is passed as a network parameter during create
instance, Nova API should return a 404 error. This was fixed for the V2
API in commit 4721408ea861a66af1ad1df5a45c42addcd8a95f (though with a 400).
This applies the corresponding fix to the V3 API.

Fixes bug 1212137

Change-Id: I27dfba636635eb8ac257785b833b240bc439f9ff
Fix V3 API flavor returning empty string for attributes

Fixes cases where in the V3 API the ephemeral, swap and vcpus
attributes for flavors were returned as the empty string
when they had a value of 0. Also removes default setting for
the disabled attribute as it is always set in the db.

Fixes up some associated testcase data as it was using data which
could not exist in the db.

Change-Id: I90f48956411f792037b1cd744c4fa8d287f9e752
Closes-Bug: #1216929
Adds V3 API samples for srvcs, tenant usage, server_diagnostics

Adds V3 API samples for the services, simple tenant usage and
server_diagnostics extensions. Bundling them together to save
on review load

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

Change-Id: I91edc6500acbe92221427383b4bcd3d00a8faadd
baremetal: Fix misuse of "instance" parameter of attach/detach_volume

Some parts of baremetal driver treat "instance" parameter as if it is
the name of an instance, but actually it is the instance itself (dict).

Closes-Bug: #1221244
Change-Id: I01a296a6ac0bbf7c5fec3434ddf1197828b849b6
Update allowvssprovider in xenstore_data

My previous commit was missing the vm-data part so the original
bug was still present.

The command line fix:
xe vm-param-set uuid={UUID} xenstore-data:vm-data/allowvssprovider=false

This commit adds vm-data to the xenstore message and will properly
disallow vss.

Fixes: bug #1112673

Change-Id: I85ef25a9b61795c98c12549f77cd7ca7305861d2
Merge "Update allowvssprovider in xenstore_data"
Merge "Return a NetworkInfo object instead of a list"
Merge "Fix HTTP response for PortNotFound during boot (v3 API)"
Merge "baremetal: Fix misuse of "instance" parameter of attach/detach_volume"
Merge "Move call to _default_block_device_names() inside try block"
Merge "Adds V3 API samples for srvcs, tenant usage, server_diagnostics"
Merge "Adds v3 API samples for hide server addresses and keypairs"
Merge "Fix V3 API flavor returning empty string for attributes"
Merge "Add flag to make baremetal.pxe file injection optional"