Implement network creation in compute API

Implements blueprint os-api-network-create

The ability to create new networks is currently only exposed by the
nova-manage CLI. Here we add support for network creation in the
os-networks API extension.

With the exception of num_networks and network_size, all the parameters
supported by 'nova-manage network create' are supported. Only a single
network may be created by each API call.

To avoid code duplication, the nova-manage code is refactored and moved
into NetworkManager so that it can be re-used by the API.

DocImpact
Change-Id: I682d498ab35ea43b553b64e13e677fe9eeb8e08b
XCP-XAPI version fix

Fixes bug 1033933.

On an Kronos installation (Ubuntu + XCP-XAPI), the reported
software_version dictionary did not contain both product_version and
product_brand. This caused a KeyError. With this fix, the session's
product_version and product_brand will default to None in such cases.
The resize operation's name in these cases will default to VDI.resize.

Change-Id: Ic0db4128a7b27c08c24461562423bcecd1373e58
Add two prereq pkgs to nova devref env guide

fixes bug 1024903

As noted in the bug report, without libxml2-dev and libxslt-dev
installed on ubuntu 12.04, the virtualenv creation will fail.

This fix simply adds the packages to the first
"Install the prerequisite packages." line

Change-Id: I588ce14f63fa75d54405562f83d202d05c8a05c6
Check association when removing floating ip.

Fixes bug 1032558 and returns 404 when trying to delete a floating ip
from an instance to which it is not associated.

Change-Id: I30b4d8a318597d38c7afc01ee6d2e6842b999157
Return actual availability zones

Report on real availability zones, not a hard coded "nova" zone in
the output of ec2 DescribeAvailabilityZones when the output is
verbose. Resolves bug 1032890.

Change-Id: Ie85cfa1c3638fc490f52f48c8238b3162732647d
Don't include hostname and IP in generated sample conf

Avoid including the hostname and IP address of the machine generating
the sample config file.

Change-Id: Idf791efef8b0bf760c4c95f6f5f53d20bdf5ee7a
Ensure log formats are quoted in sample conf

Fixes bug #1040583

This ensures the sample conf has:

  # instance_format="[instance: %(uuid)s] "

rather than:

  # instance_format=[instance: %(uuid)s]

Fix suggested by Vish.

Change-Id: If20aa7276d6868a6885abc85f046733adc40331f
DocImpact: update nova.conf docs
Remove test_instance_update_with_instance_id test

test_instance_update_with_instance_id is identical to
test_instance_update_with_instance_uuid due to uuid conversion.
Remove it for simpilcity.

Change-Id: Ib348522900a62d6f7340357cac5f4a03c6163016
Merge "Implement network creation in compute API"
Adding indexes to frequently joined database columns.

Fixes bug 1006624

Change-Id: I0f1f6903a29cb8d3573987b88f62cd895a11c100
Merge "XCP-XAPI version fix"
Merge "Add two prereq pkgs to nova devref env guide"
Merge "Don't include hostname and IP in generated sample conf"
Merge "Ensure log formats are quoted in sample conf"
Merge "Remove test_instance_update_with_instance_id test"
Merge "Check association when removing floating ip."
Merge "Return actual availability zones"
Merge "Adding indexes to frequently joined database columns."