Remove compute_api_class config option

This option was deprecated in Havana and can now be removed.  Its only
use was for changing out the API class if cells was in use.
Technically, it used to be possible to configure an arbitrary compute
API class.  However, that would have been an unsupported setup, and has
been completely broken since 9f902c7e17249cf5af1504f31d80c0247a02fe20
anyway.

As a part of this change, the cell_type configuration option needed a
default value.  I set it to 'compute'.  My reasoning was that you would
have more compute cells than API cells, so might as well set it to the
more common case.

Change-Id: I5ec44f84267a700da16b350e686eee886e0d1183
Check for None when cleaning PCI dev usage

The PCI manager needs to check for instance UUIDs mapped to
None when cleaning up it's internal claims/allocations maps.

Also adds a check so the claims dict doesn't map to None in
the first place.  There was already a check like this when
setting a value in the allocations dict.

Closes-Bug: #1238374

Change-Id: I7ac010f7d50ad85c145e536cfd48e07c8f4602d3
xenapi: stop agent errors stopping build

We should still report agent errors, but they should not stop a server
from building, because that server still may be ready to use.

Once this change is in place, we can look to selectively add back in
certain errors that fail the build, as we decide what makes sense on a
case by case basis.

Fixes bug 1233548
Change-Id: I32b9e8dbc6e28a045ac8ef159afe1cf74b7ac6fb
xenapi: test_driver should use NoDBTestCase

Change-Id: If75d924accb50dca3cc393c32ddcb9128604fa88
Cells: Fix instance deletes

A regression was introduced with object conversion that caused all
instances to be locally deleted in the API cell when cells is enabled.
This would happen before the child cell was told to delete the instance.

Additionally, if an instance record was created in a child cell but
failed to schedule to a host in such a way that the API cell has
no knowledge of the 'host', the instance would be deleted in the API
cell only.

Also, it appears that we would cast deletes to child cells twice due to
logic duplicated in cells_api.py that exists in api.py.

Closes-Bug: #1240247

Change-Id: I94cfddd9cef2d63b2cb31c0f2dae8e211a4418d9
Add CIDR field type

This field type provides a strong verification that a value
assigned to a CIDR field is valid. This will be used for
the SecurityGroupRuleObject to follow.

Related to blueprint compute-api-objects

Change-Id: Ib62a515eea563da3107a3aed516a51d0ff55ba35
Updated from global requirements

Change-Id: Ica7315effe308bd739e90f885849fac27a3c542b
A nicer calling convention for object instantiation

This patch makes the base object constructor take some arguments
to streamline the process of creating a new object. By taking
a context and an optional set of keyword args, we can reduce
the lines of code required to create an object from many to, often,
one.

Change-Id: Id85c70d04af500ece48e9c93ee55a8e3d579299d
Merge "Remove compute_api_class config option"
Merge "Add CIDR field type"
Merge "Cells: Fix instance deletes"
Merge "Check for None when cleaning PCI dev usage"
Merge "A nicer calling convention for object instantiation"
Merge "xenapi: test_driver should use NoDBTestCase"
Merge "Updated from global requirements"
Merge "xenapi: stop agent errors stopping build"
xenapi: post install scriptlet to rpm

A freshly installed XenServer requires some modifications in order to be
able to run OpenStack. Nova contains an rpm specification to create a
package with the dom0 plugins, however installing the rpm is not enough.
Some more actions need to be taken:
 - create /images, link to a directory within the local SR
 - setup an ssh keypair, and authenticate it with the host
This change adds a post script to the nova plugins rpm spec file, so
by installing the rpm on a XenServer, it is ready to run OpenStack, no
further manual actions needed.

Change-Id: Id57e3a3ab2782550468c6aa4c01059ceb7cc81ab