• M
    node_device: Expose link state & speed · 0311ef3d
    Michal Privoznik 提交于
    While exposing the info under <interface/> in previous patch works, it
    may work only in cases where interface is configured on the host.
    However, orchestrating application may want to know the link state and
    speed even in that case. That's why we ought to expose this in nodedev
    XML too:
    
    virsh # nodedev-dumpxml net_eth0_f0_de_f1_2b_1b_f3
    <device>
      <name>net_eth0_f0_de_f1_2b_1b_f3</name>
      <path>/sys/devices/pci0000:00/0000:00:19.0/net/eth0</path>
      <parent>pci_0000_00_19_0</parent>
      <capability type='net'>
        <interface>eth0</interface>
        <address>f0:de:f1:2b:1b:f3</address>
        <link speed='1000' state='up'/>
        <capability type='80203'/>
      </capability>
    </device>
    Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
    0311ef3d
formatnode.html.in 13.7 KB