EC2-API: Fix ambiguous ipAddress/dnsName issue

Currently, the public ipAddress and dnsName take in either the
fixed or floating IP address as a value. The current fix ensures
that the public dnsName and the public ipAddress both get only
the floating ip address. A look into Amazon's EC2 API Reference
tells us that if there is no public IP associated with an instance,
an empty value is returned for <dnsName> and the key <ipAddress>
itself is never returned. This was tested with euca2ools.
Also, the key <publicDnsName> has been removed since it is
the same as <dnsName>

Fixes: bug #1096468

Change-Id: I3b3e3b3f815df41d1976444d33604363e64a7709
Make nbd reservation thread-safe

Avoid the situation where two local threads choose the same nbd number
for injecting files into the instance. If this happened quickly enough
nova was left with one qemu-nbd hanging and blocking the device forever.

Fixes bug 1207422

Change-Id: I18864b19ebd30669534e45ca7a50e12f61207302
Enable no_parent and file_only security

The websockify package was recently upgraded to version 0.5.1, which added two
parameters that provide additional security:
* no_parent - returns 403 response if contents out of the web root are
requested. Required to disable directory traversal.
* file_only - returns 404 response if non-file contents are requested. Required
to disable directory listing.
This version is available in PyPi.

Nova should upgrade it's required version for websockify, and set these
parameters while creating and starting the NovaWebSocketProxy to ensure
better security.

DocImpact
Fixes bug #1195700

Change-Id: I9c4b28eb1b384048f10d365ed204b916afd371bb
libvirt: allow passing 'os_type' property to glance

Currently, libvirt driver doesn't pass the 'os_type' property to
glance. Thus all snapshots created don't have this property. Other
feature depend on 'os_type'(such as mkfs for ephemeral devices)
doesn't work.

This patch fixes this by passing the 'os_type' attribute to glance
as image properties. None value in metadata properties would not be
passed to glance, thus this patch has no side effect on situation
when instance has no 'os_type' attribute set.

Bug 1214372

Change-Id: I2bab617f6c1e8866650ca7dc5178b640738c9ae6
VMware: provide a coherent message to user when viewing console log

The vCenter and ESX returns a PNG format. Currently there is no way
to display a text based format. This at least provides the user with
a message that is informative.

Fixes bug: 1199754

Change-Id: I382219ca89a1574ca233b0f25a89af63af71a22f
Remove deprecated legacy network info model in Hypervisor drivers

This patch removes legacy network info wihch is unused in any Hypervisor
drivers, clean up related tests and Also removes legacy method from
nova.network.model.

Partly implement blueprint nova-network-legacy

Change-Id: Ia3f11b1a162878817445619575b35187110dafb5
Fix migrations index

`deleted` column in `migrations`.`migrations_by_host_nodes_and_status_idx`
index had been dropped after some migration.

This patch fixes this.

bp: db-sync-models-with-migrations

Change-Id: Ifd2e567b5beeeb027a72d5d35d8cb3405a5a1942
Libvirt: fix KeyError in set_vif_bandwidth_config

The set_vif_bandwidth_config function must be able to get a parameter that has
no 'extra_specs' field and not fail.

This fixes bug 1214363.

Change-Id: I576fb087c7bcda9f6662c4df5b480668b1f23454
Stylistic improvement of compute.api.API.update()

The previous implementation of compute.api.API.update() method included
a line of code where the '_' identifier was used to hold a throw-away
variable. Such a usage of underscores is generally not a good style and,
more importantly, it can possibly lead to a name conflict with the '_'
function imported as 'from nova.openstack.common.gettextutils import _'
in several modules of the system.

The present patch fixes the above, as well as some indent issues in the code.

Change-Id: I7a904109f4809fd677ded06b7eea3205c38a369b
Pass the destination file name to download modules

Currently an open file like object is passed into the image service
and thus into the download modules.  This is a limiting for certain
optimization (system calls to copy, hard links, external services,
out of order protocols like bittorrent, etc).  This patch passes the
file name into the image service when used by the nova.virt.images.
The previous means of passing in a data stream is still supported
but cannot be used with download modules.

Change-Id: Id17d426faab8d63dcffca22b300ebac3f15c104a
blueprint: image-multiple-location
Removes V3 API images and image_metadata extensions

Removes V3 API images and image_metadata extensions as the
same functionality can be accessed directly through glance. Also
removes the associated testcases. There is a discussion about
the decision here:

http://lists.openstack.org/pipermail/openstack-dev/2013-August/012958.html

Fixes the image bookmark links in server information requests
so they point to glance

Partially implements blueprint nova-v3-api

Change-Id: Id32be0c0794b0f4dd220a928345ddf0133e9ffca
Merge "Pass the destination file name to download modules"
Merge "Fix migrations index"
Merge "Enable no_parent and file_only security"
Merge "libvirt: allow passing 'os_type' property to glance"
Merge "Libvirt: fix KeyError in set_vif_bandwidth_config"
Merge "Remove deprecated legacy network info model in Hypervisor drivers"
Fix v3 extensions inherit from wrong controller

Extensions keypairs and config_drive's controller should
inherit from nova.api.openstack.wsgi.Controller. Inherit
from wrong controller may cause strange errors.

Partially implements bp v3-api-extension-versioning

Change-Id: I5e2a588960bf6b1c0afafb89ecaab255dbd2a1f4
Merge "Removes V3 API images and image_metadata extensions"
Move live-migration control flow from scheduler to conductor

This builds on previous patches that moved code to
the conductor and adding the conductor into the control path.

We take care to ensure this works with a local conductor, but
running the code in a greenlet thread, but this will work best
when conductor is run as a standalone service.

The next steps are to move more logic from the compute manager
into the conductor, then to start supporting dealing with
tasks that get stopped half way though execution.

Part of blueprint live-migration-to-conductor
Change-Id: I4120156db1499dfd3ed22095e528787eb73d33a6