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-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
Whitespace: Xapi_pv_drivers_version.of_drivers_version.

$ camlp4o -printer o -no_comments ocaml/xapi/xapi_pv_driver_version.ml | md5sum
5605b59b4dae1e43796c0b158ae99dcd  -
$ git checkout HEAD^
$ camlp4o -printer o -no_comments ocaml/xapi/xapi_pv_driver_version.ml | md5sum
5605b59b4dae1e43796c0b158ae99dcd  -

Signed-off-by: John Else <john.else@citrix.com>
CA-89023: Fix PV tools OS type detection.

Using the /drivers/xenvbd xenstore key to flag that a guest is Windows
is problematic, since:

1. This key goes away after suspend/resume or migrate, so cannot be
   relied upon to mark PV tools as out of date after a rolling pool upgrade.
2. This key isn't written at all by the Tampa PV drivers.

Instead, we now check that /data/os_distro equals "windows" - this value is
hardcoded in the windows guest agent.

Signed-off-by: John Else <john.else@citrix.com>