Sophie

Sophie

distrib > CentOS > 5 > i386 > media > os > by-pkgid > 363942ee44b3fc46846f4d93cf931775 > files > 25

perl-Sys-Virt-0.2.4-1.el5.i386.rpm

# -*- perl -*-
use strict;
use warnings;
use Sys::Virt;

my $addr = @ARGV ? shift @ARGV : undef;

my $con = Sys::Virt->new(address => $addr, readonly => 1);


my @devs = $con->list_node_devices("net");

print "Available NICS\n";
foreach (@devs) {
    print "NIC: ", $_->get_name(), "\n";
}