CA-97297: ErrorMsg - Cannot remove parameters from read-only map
Merge pull request #1016 from johnelse/ca-98936

CA-98936: Stop xapi from creating files in /tmp every time it gets an update from xenopsd
Merge pull request #1012 from siddharthv/CA-97297

CA-97297: ErrorMsg - Cannot remove parameters from read-only map
Merge pull request #1011 from johnelse/ca-96893

CA-96893: Remove xenopsd VmExtra metadata from filesystem after suspend and migrate.
Merge pull request #1005 from johnelse/ca-74544

CA-74544: Associate a username with the sessions xapi passes to SM backends.
Simplify network module for xapi -> networkd calls

Also move it from ocaml/network to ocaml/xapi for consistency.

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
Stop using Netdev module in Nm

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
Stop using Netdev module in Xapi_pif

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
Stop using Netdev module in Create_misc

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
Stop using Netdev module in Helpers

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
Stop using Netdev module in Mtc

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
Stop using Netdev module in Dbsync_slave

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
Stop using Netdev module in Xapi_network

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
Stop using Netdev module in Xapi_pool

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
Stop using Netdev module in Monitor_master

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
networkd: setup HIMN interface in driver domain

* Rename it to "xenapi".
* Obtain an IP from DHCP.
* Listen on the IP.
* Write the IP to xenstore.

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
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>
xenopsd: Set permissive flag in pciback for PCI passthru

This is necessary for certain network drivers to function in a driver
domain. Perhaps we need to make it configurable, as I am not sure whether
this options is safe to be enabled in all cases.

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
networkd: Enable use in a driver domain

* Add {Interface,Bridge}.set_driver_domain functions to allow the
  client (xapi) to specify which VM owns the interface or bridge
  (by UUID). Networkd keeps track of this in its persistent state.
* Introduce a forwarding layer for API calls. A call is executed
  locally or sent off to a networkd instance in a driver domain
  depending on the above mentioned driver-domain state.
* When an API call is forwarded, the IP address of the driver doamin
  is obtained from xenstore.
* Functions such as Interface.get_all query all known driver domains
  to obtain the required information across the host.
* We also expose some further utility functions: Interface.{is_vif_front,
  get_pci_bus_path,rename}.

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
networkd: Obtain MAC addresses from sysfs rather than the ip command

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