Re: [PATCH v2 1/4] virInterface: Expose link state & speed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 11, 2014 at 06:46:25AM -0400, John Ferlan wrote:
> 
> 
> On 06/11/2014 05:19 AM, Michal Privoznik wrote:
> > On 11.06.2014 03:13, John Ferlan wrote:
> >>
> >>
> >> On 06/05/2014 11:39 AM, Michal Privoznik wrote:
> >>> 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@xxxxxxxxxx>
> >>> ---
> >>>   docs/schemas/basictypes.rng                     | 25 ++++++++++
> >>>   docs/schemas/interface.rng                      |  1 +
> >>>   src/conf/device_conf.c                          | 62 +++++++++++++++++++++++++
> >>>   src/conf/device_conf.h                          | 27 ++++++++++-
> >>>   src/conf/interface_conf.c                       | 11 ++++-
> >>>   src/conf/interface_conf.h                       |  2 +
> >>>   src/libvirt_private.syms                        |  4 ++
> >>>   tests/interfaceschemadata/bridge-no-address.xml |  1 +
> >>>   tests/interfaceschemadata/bridge.xml            |  1 +
> >>>   tests/interfaceschemadata/ethernet-dhcp.xml     |  1 +
> >>>   10 files changed, 133 insertions(+), 2 deletions(-)
> >>>
> >>
> >> Already been ACK'd, but I will point out the interface.html.in hasn't
> >> been updated - later you update the nodedev.html.in file - so probably
> >> reasonable to do so again. While at it the consistency of using "Mbits"
> >> vs. "Mb" in the comment in device_conf.h
> > 
> > The first issue has simple explanation - there's no interface.html.in 
> > yet. Yes we lack the virInterface XML documentation. The second one I'm 
> > fixing prior to push.
> > 
> 
> So - I was just too lazy/tired to look last night, but
> formatdomain.html.in has an "Network interfaces" sub-section... Perhaps
> woefully under described though...

NB the network interfaces schema for virDomain (as documented in the
formatdomain.html page) is different from the network interfaces schema
for virInterface (as not documented :-)


Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]