]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commit
virInterface: Expose link state & speed
authorMichal Privoznik <mprivozn@redhat.com>
Wed, 7 May 2014 12:21:35 +0000 (14:21 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 11 Jun 2014 07:13:32 +0000 (09:13 +0200)
commit3db89662c263d4707b02999aa12eb3b48d14fad3
treec39f58551fadc9ffaeea518cf50cc37306815af1
parent10c10f4380aaf7c0e01cd5430bfe623d79883498
virInterface: Expose link state & speed

Currently it is not possible to determine the speed of an interface
and whether a link is actually detected from the API. Orchestrating
platforms want to be able to determine when the link has failed and
where multiple speeds may be available which one the interface is
actually connected at. This commit introduces an extension to our
interface XML (without implementation to interface driver backends):

  <interface type='ethernet' name='eth0'>
    <start mode='none'/>
    <mac address='aa:bb:cc:dd:ee:ff'/>
    <link speed='1000' state='up'/>
    <mtu size='1492'/>
    ...
  </interface>

Where @speed is negotiated link speed in Mbits per second, and state
is the current NIC state (can be one of the following:  "unknown",
"notpresent", "down", "lowerlayerdown","testing", "dormant", "up").

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
docs/schemas/basictypes.rng
docs/schemas/interface.rng
src/conf/device_conf.c
src/conf/device_conf.h
src/conf/interface_conf.c
src/conf/interface_conf.h
src/libvirt_private.syms
tests/interfaceschemadata/bridge-no-address.xml
tests/interfaceschemadata/bridge.xml
tests/interfaceschemadata/ethernet-dhcp.xml