Enable the network link carrier state to be reported.

This change allows networkd to keep track of, and report, the state of
the network carrier signal. When a NIC cable is pulled, or inserted, a
DBus client is able identify the condition.

Tested:
ip link set down dev eth0  # take eth0 down
Get bmc/EthernetInterfaces/eth0 from Redfish # LinkStatus = LinkDown
                                             # InterfaceEnabled = false
ip link set up dev eth0    # bring eth0 back
Get bmc/EthernetInterfaces/eth0 from Redfish # LinkStatus = Linkup
                                             # InterfaceEnabled = true
Pull eth0 cable
Get bmc/EthernetInterfaces/eth0 from Redfish # LinkStatus = LinkDown
                                             # InterfaceEnabled = true
Insert eth0 cable
Get bmc/EthernetInterfaces/eth0 from Redfish # LinkStatus = Linkup
                                             # InterfaceEnabled = true

Change-Id: I5530cf7882cfbfdba1436dd34b3219c735047c5e
Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
2 files changed