package cn.reghao.tnb.sb.kvm;

import org.libvirt.Connect;

/**
 * @author reghao
 * @date 2020-10-29 14:29:40
 */
public class Network {
    private final String uri;

    public Network() {
        this.uri = "qemu:///system";
    }

    public void listNetwork() throws Exception {
        Connect conn = new Connect(uri, false);
        String[] networks = conn.listNetworks();
        String[] networkFilters = conn.listNetworkFilters();
        String[] definedNetworks = conn.listDefinedNetworks();
        System.out.println();
    }

    public static void main(String[] args) throws Exception {
        Network network = new Network();
        network.listNetwork();
    }
}
