Make use of Network_stats from xcp-idl in Network_monitor

Signed-off-by: John Else <john.else@citrix.com>
Merge pull request #5 from johnelse/use-network-stats

Make use of Network_stats from xcp-idl in Network_monitor
Use obuild to run tests

Signed-off-by: John Else <john.else@citrix.com>
Merge pull request #6 from johnelse/obuild-tests

Use obuild to run tests
Report IPv4 addresses as well as IPV6 addresses.

Original patch for xen-api by Rob Hoes.

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Merge pull request #7 from djs55/ipv4-monitor

Report IPv4 addresses as well as IPV6 addresses.
Bump version to 0.9.1.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Merge pull request #8 from djs55/master

Fix interaction with /sbin/ip and execute_command_get_output
Fix build warning

Signed-off-by: John Else <john.else@citrix.com>
Remove leftover OASIS gubbins

Signed-off-by: John Else <john.else@citrix.com>
CA-74222 : Allow the Bond.create to carry on even if the MTU size is invalid, however log the error

Imported from xen-api.git 73165a0ca4ec7ba6a8b4d38640f5b5747f9fb8fe

Signed-off-by: Akshay Ramani <akshay.ramani@citrix.com>
Imported-by: John Else <john.else@citrix.com>
CA-102927: network monitor: better represent duplex mode for NIC bonds

For bonds, "duplex" is now defined as the "minimum" duplex of all bond
members that are up, where "half duplex" < "full duplex". If all members
are down, duplex is "unknown".

Imported from xen-api.git 52cbf3321777b2ad65ef0627c69e879b5a03a1a9

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
Imported-by: John Else <john.else@citrix.com>
Use "ip link" to find the MAC address and MTU of a NIC

Previously, we used "ip address", but this does not work in newer
versions of iproute2 for NICs that don't have an IP address.

Imported from xen-api.git f917e9d94d204e171b534b42b24bcfc9e197375d

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
Imported-by: John Else <john.else@citrix.com>
Fix init script

Slightly redundant since there's a better one in xen-api-rpm-buildroot.
Maybe this should removed from this repo altogether, since it's rather
distro-specific and makes more sense as part of the packaging system?

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

Import missing changes from xen-api.git
Batch IP monitor changes for 1 second

IP address changes, e.g. as a result of DHCP, usually trigger multiple events
in the IP watcher. This change causes Xapi to be notified just once if multiple
events occur within a second.

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
Merge pull request #10 from robhoes/master

Batch IP monitor changes for 1 second
Do signal xapi when an IP address is removed

BobB pointed out that when a DHCP lease expires, the IP address may go away.
Therefore, a signal to xapi for it to update its DB makes sense.

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
Merge pull request #11 from robhoes/master

Do signal xapi when an IP address is removed
Get network stats through netlink rather than from /proc

This add a dependency to the netlink opam package, and the libnl-3
and libnl-route-3 libraries.

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