Disallow setting /0 for network other than 0.0.0.0

If something like 15.0.0.0/0 is set as an IP address range it ends up
being identical to 0.0.0.0/0 (i.e all access) which I don't think is
the intent of the user when they make the API call.

Change-Id: I3fc05371f461112feae4f1097777fede5fc6b948
Don't call 'vif.plug' twice during VM startup

When starting a VM, the 'get_guest_config' method would end
up calling both the 'plug' and 'get_config' methods on the
VIF driver impl.  The 'plug' method was, however, already
being called by the 'create_domain_and_network' method in
libvirt/driver.py. The result was that when starting a VM,
Nova would be invoking 'plug' twice. Fortunately this does
not currently cause any serious problems, but it could well
do in the future.

Change-Id: I4b044a6d44801a27362e3bf8531962ba85e79466
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Adds API Sample tests for FloatingIPDNS extension.

Partially implements blueprint nova-api-samples
Fixes bug 1070164

Change-Id: I4c3e5d406ce43c27bb49a651facaa831de646a66
Use ServiceGroup API to show node liveness

Previously it's direct db access. Now we use the servicegroup
API to show node liveness. Note that db access is still needed
to get other service attributes such as `disabled'.

Change-Id: I65ef3a136fd90036a8d009ed97a5f48ae461d8d9
Add generic UC dropper

There is a lot of tables where we should add unique constraints
on upgrade and drop on downgrade, to avoid race conditions.
But there is a problem with SQLite. SQLite does not allow to drop unique constraints.
There is only one way to drop UC in SQLite:
1) create new table, with same columns and UC (but without UC that we want to drop)
2) copy data from old table
3) drop old table
4) create indexes in new table from old
5) rename new table to old table name

For other DB backends is used 'alter table'.

This patch add generic method for dropping UC.

blueprint db-unique-keys

Change-Id: I3e60578d3902559996943868abeb17b41153769b
Allow generic rules in context_is_admin rule in policy.

context_is_admin role is used by nova to check if
the current user is the admin. But it can only check
role rules. The fix allow generic rules in context_is_admin.

DocImpact

Fixes bug 1118142

Change-Id: Ib4823a67fe63d5356fc8c9280a2013b8855f5217
Merge "Allow generic rules in context_is_admin rule in policy."
Merge "Adds API Sample tests for FloatingIPDNS extension."
Merge "Don't call 'vif.plug' twice during VM startup"
Merge "Add generic UC dropper"
Merge "Use ServiceGroup API to show node liveness"
Merge "Disallow setting /0 for network other than 0.0.0.0"