CP-2190 for PR-1221: SR alerts for hosts can be configured on the SR now.

To reduce the effort of configuration, whereas previously it was
necessary to configure throughput alerts for an SR on each host
individually, now it is possible to set up a per-host SR throughput
alert for each host connected to an SR by writing to the SR's
other-config:perfmon key.
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>
CA-89303: A slave without master cannot bring up its management interface.

It should not try to query the DB, since the master is not accessible.

This commit fixes the problem introduces by the fix for CA-87787,
commit: 8d0adadf54911e7b6a645ca1ca2fdb241f65ad3e

Signed-off-by: Jerome Maloberti <jerome.maloberti@citrix.com>
Whitespace: xapi_vm.ml

$ camlp4o -printer o -no_comments ocaml/xapi/xapi_vm.ml | md5sum
46e5866dd5fcb2d8ebac427aa1889aad  -
$ git checkout HEAD^
$ camlp4o -printer o -no_comments ocaml/xapi/xapi_vm.ml | md5sum
46e5866dd5fcb2d8ebac427aa1889aad  -

Signed-off-by: John Else <john.else@citrix.com>
CA-99726: Don't make VM.provisions wait in line

VM.provision will run after a template has been copied or cloned, so we
don't need it to wait in line behind other VM.copy or VM.checkpoint
tasks.

Signed-off-by: John Else <john.else@citrix.com>
CA-99728: Spelling errors.

Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@citrix.com>
Merge pull request #1024 from thomassa/clearwater-pr1221

CP-2190 for PR-1221: SR alerts for hosts can be configured on the SR now.
CP-4320: Remove host-license-add from the CLI

Signed-off-by: John Else <john.else@citrix.com>
CP-4320: Update API lifecycle for Host.license_apply

Signed-off-by: John Else <john.else@citrix.com>
CP-4320: Remove implementation of Host.license_apply

Raise MESSAGE_REMOVED instead.

Signed-off-by: John Else <john.else@citrix.com>
CA-98936: Stop xapi from creating files in /tmp every time it gets an update from xenopsd

Signed-off-by: John Else <john.else@citrix.com>
CA-96893: Remove metadata from xenopsd after a suspend.

Previously metadata was only removed after a shutdown.

Signed-off-by: John Else <john.else@citrix.com>
CA-96893: VM.remove now also removes the VmExtra persistent data.

Signed-off-by: John Else <john.else@citrix.com>
CA-98535: Fix VDI.create

The other_config, shareable, tags and xenstore_data fields are now set
to their correct values when creating a VDI.

Signed-off-by: John Else <john.else@citrix.com>
Merge pull request #1055 from johnelse/cp-4102-clearwater

CLEARWATER: CP-4320: Remove Host.license_apply
Merge pull request #1040 from jeromemaloberti/CA-99726-clearwater

CLEARWATER: CA-99726: Don't make VM.provisions wait in line
Merge pull request #1029 from mcclurmc/clearwater-CA-95645

CA-95645: fix Python 2.6 type error comparing DateTime
CA-94335: Dom0 should be managed in xenopsd before the record is created.

Signed-off-by: Jerome Maloberti <jerome.maloberti@citrix.com>
CA-92553: Thoroughly clear PCI attachments for stopped VMs

This should not be necessary if many-to-many relations in the DB
work properly. People have reported issues that may indicate that this is
not the case, but we have not yet found the root cause. Therefore, this
code is added "just to be sure".

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
CA-96950: Fix HIMN bridge name if needed

Previously, the bridge name used for the Host Internal Management Network
(HIMN) was usually xapi0, i.e. a normal name in the xapi* range. Now, the HIMN
has a special bridge name ("xenapi").

This commit ensures that the new name is used on existing HIMNs.

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>