xenopsd: Support driver domains for PV guests

The case of HVM guests with emulated QEMU networks devices is not yet
handled.

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
Allow setting the VIF backend for a network

If, on a network, other_config:backend_vm is set to the UUID of a VM, this VM is
used for the VIF backends (netback) of any VIFs on the network.

This is useful for internal networks (only), since the key is set on a network
rather than on a PIF.

Signed-off-by: Rob Hoes <rob.hoes@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>
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-95669: VNCTerm to listen on just 127.0.0.1

Signed-off-by: Siddharth Vinothkumar <siddharth.vinothkumar@citrix.com>
Refactor unit tests for consistency

Signed-off-by: John Else <john.else@citrix.com>
Make sure that stunnel listens on the right addresses

This may be "all IP addresses" or only localhost, and IPv4 or IPv6.

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

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
XOP-261: Make the himn_address persistent across reboot.

Signed-off-by: Jerome Maloberti <jerome.maloberti@citrix.com>
XOP-261: Restart stunnel only if conf file changed.

Signed-off-by: Jerome Maloberti <jerome.maloberti@citrix.com>
XOP-261: Fix xapissl to initially start stunnel.

Signed-off-by: Jerome Maloberti <jerome.maloberti@citrix.com>
CA-100704: Fix xenguest

From http://ocamlunix.forge.ocamlcore.org/ocamlunix.html

The flag list must contain exactly one of the following flags:
O_RDONLY	Open in read-only mode.
O_WRONLY	Open in write-only mode.
O_RDWR		Open in read and write mode.

So I've added exactly one of those flags!

Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>
Merge pull request #1065 from jonludlam/CA-100704

CA-100704: Fix xenguest
Merge pull request #1064 from jeromemaloberti/XOP-261-dev

CA-96936/XOP-261: Reinstate the server on 127.0.0.1 when no management interface is defined
CA-100561: Fix bash completion with grep color

Signed-off-by: Harrie Pieters <harrie.pieters@citrix.com>
CA-46110 Tab completion on xe-switch-network-backend
Revert "XOP-261: Fix xapissl to initially start stunnel."

This reverts commit 0e1953118e86b813e4b9548f5c2328f45ca82619.

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
Revert "XOP-261: Restart stunnel only if conf file changed."

This reverts commit ef89d6f3d86e4d5598a74a89d33ae38d4e0f2bf7.

The original patch is not the right thing to do: the expectation
is that the restart function always restarts the service.

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
Revert "XOP-261: Make the himn_address persistent across reboot."

This reverts commit 59e987594ffebb66758293e48e7d7c8da779f306.

The original patch was not necessary.

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