Provide better error message for aggregate-create

For an InvalidAggregateAction exception:
Before: 'ERROR: There was a conflict when trying to complete your request (HTTP 409)'
After: 'ERROR: Cannot perform action 'create_aggregate' on aggregate 'N/A'. Reason: invalid zone. (HTTP 400)'

docImpact

Fix bug 1083353

Change-Id: I26e30059fe5bbc30eecc52cccec4eba2a57d00db
(cherry picked from commit 4e43747037058522087e6eb71ef3bcce266d55cc)
Fix errors in used_limits extension

Fixes bug #1062049

There was a typo mapping the security groups resource to floating IPs.

Key pairs don't work with the extension because of bug #1089877.

(cherry picked from commit 6c9d9ab)

Change-Id: Ifd694b21fef1dc95e67c07dcef0cd6ea3daa8d53
Add an iptables mangle rule per-bridge for DHCP.

When vhost-net is present on a host, and DHCP services are
run on the same system as guests (multi_host), an iptables
rule is needed to fill packet checksums.  This adds a rule
per-bridge for multi_host networks when vhost-net is present,
similar to how newer versions of libvirt handle the issue for
bridges/networks that it manages.

Fixes LP: #1029430

EDIT: Updated tests and pep8.

(Backported from commit 901a3dacb6f2d36cbe8d23707dba75452e91df33)

Change-Id: I1a51c1d808fa47a77e713dbfe384ffad183d6031
Limit formatting routes when adding resources

By default, routes.mapper.Mapper.resource adds a bunch of formatted
routes that accept anything after a '.'. Our spec says only .xml
and .json are accepted so limit the formatting to those valuse.

This allows identifiers with a '.' in urls. A few tests were added
to the extensions test to prove that .xml and .json are stripped
but other values are not.

Fixes bug 1027788

Change-Id: Ic888aa5d75050d6b14763c2a787ac8c8d5ab1f69
(cherry picked from commit 8935c3bde9e9635f65522488c1aca5df5b03050d)
Fix typo in resource tracker audit message

Resolves bug 1092418.

Change-Id: Ia51f1ee78bc612743095759fef6067c93fbcd222
Fix addition of CPU features when running against legacy libvirt

When running against an libvirt < 0.9.10 which lacks support for the
'host-model' CPU type, we must fake it by copying the host CPU
model and features. Unfortunately the code was forgetting to
append the new features to the CPU object feature list

Bug: 1099527
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
(cherry picked from commit 82b55c97d10a55e6a825261397816f6a7ad00fd7)

Change-Id: Ib5e6a173f1ae7d421435af45bf327f5b36c94dd0
Merge "Fix errors in used_limits extension" into stable/folsom
Call plug_vifs() for all instances in init_host

Remove the assumption that we are using the "flat" networking model
and there is a single bridge interface for all instances on a given
compute node.  Instead simply call plug_vifs() for each instance in
init_host.

Fixes bug 1083784

Change-Id: I4b367deb6851c06c80a4bdf0bd806cf5e867bb0a
(cherry picked from commit 77e38b7cfc2206ef4ac528d3c9faaa09adbf7f58)
Merge "Limit formatting routes when adding resources" into stable/folsom
Merge "Provide better error message for aggregate-create" into stable/folsom
Add NFS to the libvirt volume driver list

Fixes bug 1087252

Change-Id: I01511d4ef7763cbe622b10ee340342eb692afcdd
(cherry picked from commit f6c394cce473f58da704bc1c5230c57ca80f299d)
Merge "Fix addition of CPU features when running against legacy libvirt" into stable/folsom
Merge "Fix typo in resource tracker audit message" into stable/folsom
Merge "Call plug_vifs() for all instances in init_host" into stable/folsom
Merge "Add NFS to the libvirt volume driver list" into stable/folsom