Catch NotFound exception in FloatingIP add/remove

Catch the FloatingIPNotFoundForAddress exception for add/remove
operations in floating ip extension for non existing floating ips.

Fixes bug 977536

Change-Id: Ied450aa56ef7a52a015c6d78a099d445ab6258b6
Fix NetAppCmodeISCSIDriver._get_lun_handle() method

bug 1055578

Change-Id: I06da6a9a59fa2320f1cae9698e5e63562e534916
libvirt: Fix _cleanup_resize

Undefine domain and unplug vifs in _cleanup_resize if the instance was
migrated to another host.

Fixes bug 1015731

Change-Id: If6eb1ada029d462777bbd6ea113c98c3b801cf5d
Fixes remove_export for IetAdm

* Corrects indentation.
* Uses specific iqn as keyword argument.

Fixes bug 1055401

Change-Id: I1267be37a7e7adcd2a18ffb719326c5f68296523
all_extensions api_samples testing for server actions

server actions sometimes return servers objects, which means
their output is different when extensions are enabled. This
adds api samples for those cases to give a more realistic view
to the user of what they might expect.

Change-Id: Iaa9a4c3a373dee41931c5dc4f1b805f09a05299f
Fix XenServer's ability to boot xen type images

Fixes bug 1055431.

As the scheduler wants to boot a vm_mode=xen type of image, the host's
"supported_instances" capability is used for finding a good candidate.
In the Xapi case, this field was not populated.

This fix modifies the xapi xenhost plugin, so the Xen host capabilities
are returned back to the compute node, as "host_capabilities".
On the compute side, the mentioned information is used, to extract the
"supported_instances" information.

Change-Id: I2da11ab81f74b5b52e2c30832a694470978e21b0
LOG.exception() should only be used in exception handler

When used outside of an exception handler it will print the message
and then 'None', which isn't useful at all.

Change-Id: I797dbb0f6f0c5012859c02689907aa286c218808
Add servers/ips api_samples tests

Change-Id: I65f8b53b4126458e1522f0bc47559dc1318a473a
Fix booting a raw image on XenServer

Fixes bug 1055413.

ImageType.from_string removed, as it was only used by its test.
Introduced ImageType.get_role, that returns the image's role within the
VM. In case of DISK_* image types, the role is always 'root'. Role
should be the key when accessing the vdis dictionary.

Change-Id: Ieb952a9246d06a8280510113a98b888237abcc65
Revert explicit usage of tgt-adm --conf option.

Fixes bug 1056246.

Reverts commit 0a09bf5faeb30b675fdb8f517c61166ef794bad3.

This ensures that we fail-fast if the tgtd configuration does
not include the directory for volume iscsi target configs,
instead of only blowing up when tgtd is restarted.

Change-Id: I3c9f0d97e411560e5c0fd058671f8c834e9bed1e
Merge "LOG.exception() should only be used in exception handler"
Zmq register opts fix in receiver

Following dprince's change to use
FLAGS, rather than cfg.CONF,
zmq_opts needs to be registered explicitly.

Change-Id: I66bc71563435088ee9224fdd603602e35f3e3bff
Collect more accurate bandwidth data for XenServer

This changes the method used to poll xenserver for bandwidth data.
The reccomended way of collecting such data from xenserver (namely the
RRD files provided by the hosts) do not seem to be reliable, they
will sometimes be correct, often will be signifigantly under (> 10%),
and occasionally will show artifacts, such as phantom 4gb bandwidth
'spikes'.

This patch changes that to use the much simpler method of simply polling the
byte counters on the VIF network devices on the host. (We have old non-nova
code that does that on xenserver, and that method is known to work).

This should also make it much easier for other hypervisors other than
xenserver to implement bandwidth polling, as polling the counters is a rather
more universal method.

Fixes bug 1055737

Change-Id: I6a280d8bbfcc74914f888b11bc09349a270a5f58
Merge "Revert explicit usage of tgt-adm --conf option."
Deleting security group does not mark rules as deleted

Adds query to also delete rules for parent_group_id

Fixes bug 1056380

Change-Id: I3d041b49703bf298a80d2ebe19c1298eecf2d98d
Fix issues with device autoassignment in xenapi

This is a workaround for two issues in xenapi. The first is that
does not set the instance default_root_device to /dev/xvda so it
defaults to /dev/sda. The proper fix for this involves setting the
default_root_device in xenapi and a db migration to set the proper
default_root_device for existing instances.

This patch works around this issue by explicitly setting the prefix
to /dev/xvd if the compute driver is xenapi.

The second issue is that xenapi never updates the instance record
to include default_swap_device and default_ephemeral device. The
fix for this involes adding the appropriate update to the instance
record and a migration that sets the proper values for all existing
instances.

This patch works around this issue by explicily checking the
instance_type and removing the devices from the list if the compute
driver is xenapi.

Fixes bug 1055715 and bug 1055712

Change-Id: I61aa15e69eb0a22430bb22ea5149b1f0735b3328
Merge "Fix NetAppCmodeISCSIDriver._get_lun_handle() method"
Merge "Fix issues with device autoassignment in xenapi"
Merge "Fixes remove_export for IetAdm"
Check that an image is active before spawning instances.

Resolves bug/1054163.

Change-Id: I4095fcac300a161e6da93bdc14eb43257d4f1aee