Add a new host parameter: guest_VCPUs_params.

It has a similar function to that defined on guests, but it is per
host. It is also limited only to be used for defining masks, and
not on a per-vcpu basis (i.e., it defines which pcpus are available
for use by a VM at all). The VM and host masks are effectively
anded together to get the final mask.

Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>
CA-94406: VDI reset only on epoch begin

This resolves a bug where VDIs were reset after migration, because the act of
plugging a VBD will reset the VDI. A corresponding change in the storage
managers moves the reset_leaf call (which resets VDIs) to the SR command
"vdi_epoch_begin", which was recently added to Xapi's SMAPIv2.

This commit just adds the plumbing necessary to call epoch_begin and epoch_end
on VDIs in the storage layer. The corresponding commit in sm.hg adds those
commands to the storage layer, and also moves the reset_leaf call into
vdi_epoch_begin.

Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
Remove erroneous extra call to VDI.epoch_end

Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
CA-52725 : Friendly error message when attempting to delete a VLAN of an unreachable host.
CA-94159: Maintain only one console of each type
Issue- Restarting XAPI creates a new RFB Console object for Dom0
Solution - In the case of multiple console objects, remove duplicates and maintain only one console of each type
CA-91416: Remove set-dom0-memory-target-from-packs.

Signed-off-by: Jerome Maloberti <jerome.maloberti@citrix.com>
Merge pull request #945 from siddharthv/CA-94159

CA-94159: Maintain only one console of each type
Merge pull request #946 from jeromemaloberti/CA-91416

CA-91416: Remove set-dom0-memory-target-from-packs.
CA-95645: fix Python 2.6 type error comparing DateTime

We compare the result of an rpc call with a constant called
_RECONNECT_AND_RETRY (which was just set to an anonymous function) to decide if
we need to retry the rpc call. When the result is a DateTime object, and we're
using python 2.6+, this comparison (using ==) throws an exception.

The fix is to use the 'is' operator instead of '==', so that we're testing
object equality, and not structural equality. We also set the
_RECONNECT_AND_RETRY constant to object(), which is more sensible than (lambda
_ : ()).

Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
Merge pull request #941 from akshayramani/CA-52725

CA-52725 : Raise a host_offline exception when attempting to destroy a VLAN on an unreachable host.
Merge pull request #925 from jonludlam/host-cpu-pinning

Add a new host parameter: guest_VCPUs_params.
Import patch api-remove-TypeToXml
Import api-autogen-use-rpc-light
Import api-task-use-rpc-light
Import patch api-server-use-rpc-light
Import patch api-autogen-refactor-to-match-the-rpc-arg-names
Whitespace
Import some of patch api-events-use-rpc-light
Merge pull request #948 from mcclurmc/ca95645-python-2.6-datetime

CA-95645: fix Python 2.6 type error comparing DateTime
CA-94616: Check SR Capabilities before suspending VM for checkpoint