Fix resizes with attached file-based volumes

Bug 1190364

get_instance_disk_info() now takes an additional, optional argument
of block_device_info. When passed in, we use it to filter out
volumes, such that they are not returned. Previously, any devices
classified as "file" as parsed from the instance XML were considered
local disks. This assumption is incorrect, since some volumes are
simply files, rather than block devices.

Added a new test, based almost entirely off the existing test case
for this function, which represents an XML file with two fake
file-based (NFS-like) volumes and associated block_device_info to
claim those volumes.

Change-Id: I4809a8fd68eb0f709347aa7cad0fa85389ade41c
(cherry picked from commit e71081b856b06513cc1e56a9adb2a619967f0eae)
Add inst_type parameter

Add inst_type parameter in order to generate the bandwidth tag into
the libvirt configuration.

Change-Id: I63c1fb51ea637d461755b309c7464f4b4d49a4b2
Fixes: bug #1185030
(cherry picked from commit 08f8773b9a4fe7fea248b4501230ebd6e6ef2fde)
Fixes Hyper-V issues on versions prior to 2012

Fixes bug: #1203059

Hyper-V 2012 introduced live migration support and a WMI namespace that
can be used to handle iSCSI targets.

The Hyper-V driver was not properly recognizing versions of the os prior to
2012 causing an exception during startup due to the usage of unsupported
features.

Unit tests have been added to test the behaviour of the driver with
different os versions.

Change-Id: I88056a2e89552b94513ba1ead046dfda57567815
Config drive attached as cdrom

Some guest OSes (e.g. Windows) require config drive to be a cdrom device
to access the iso9660 filesystem on it. Option config_drive_format is
therefore set to also control the device type of config drive. If it's
set to 'iso9660', config drive will be cdrom; if it's 'vfat', config
drive will be disk.

DocImpact
Fixes: bug #1155842
Change-Id: I6c08b1b8040a1fd0db8e2b3b1fc798060733001f
(cherry picked from commit 7f4b5771633f519a54aae985ae526418114b1a29)
Use cached nwinfo for secgroup rules

This stops a potential DOS with source security groups by using the
db cached version of the network info instead of calling out to
the network api multiple times.

Fixes bug 1184041

Change-Id: Id5f24ecf0e8cce60c27a9aecbc6e606c4c44d6b6
(cherry picked from commit 85aac04704350566d6b06aa7a3b99649946c672c)
Merge "Use cached nwinfo for secgroup rules" into stable/grizzly
Merge "Fix resizes with attached file-based volumes" into stable/grizzly
Merge "Fixes Hyper-V issues on versions prior to 2012" into stable/grizzly
Merge "Add inst_type parameter" into stable/grizzly
Merge "Config drive attached as cdrom" into stable/grizzly
Merge branch 'stable/grizzly' of https://github.com/openstack/nova into grizzly/stable

Conflicts:
	nova/virt/libvirt/vif.py