Search in sources :

Example 1 with DcgwTepList

use of org.opendaylight.yang.gen.v1.urn.ericsson.params.xml.ns.yang.ebgp.rev150901.bgp.DcgwTepList in project netvirt by opendaylight.

the class BfdCache method doExecute.

@SuppressWarnings("resource")
@Override
protected Object doExecute() throws Exception {
    PrintStream ps = session.getConsole();
    BfdConfig bfdConfig = bgpUtil.getBfdConfig();
    if (bfdConfig != null) {
        boolean bfdEnabled = bfdConfig.isBfdEnabled();
        ps.printf("%nbfd-enabled     %s%n", bfdEnabled ? "yes" : "no");
        int minrx = bfdConfig.getMinRx().intValue();
        int mintx = bfdConfig.getMinTx().intValue();
        int detectmult = bfdConfig.getDetectMult().intValue();
        boolean multihop = bfdConfig.isMultihop();
        ps.printf("%n\t%-15s  %d%n\t%-15s  %d%n\t%-15s  %d%n\t%-15s  %s%n", MINRX, minrx, MINTX, mintx, DMULT, detectmult, MLHOP, multihop ? "yes" : "no");
    } else {
        ps.printf("%nbfd-enabled     %s%n", "no");
    }
    DcgwTepList dcgwTepList = bgpUtil.getDcgwTepConfig();
    if (dcgwTepList != null) {
        dcgwTepList.getDcgwTep().values().forEach(dcgwTep -> {
            ps.printf("%n%n%-15s  %s", DCGWIP, dcgwTep.getDcGwIp());
            dcgwTep.getTepIps().forEach(tep -> {
                ps.printf("%n\t%-15s  %s", TEPIP, tep);
            });
        });
        ps.printf("%n");
    }
    return null;
}
Also used : DcgwTepList(org.opendaylight.yang.gen.v1.urn.ericsson.params.xml.ns.yang.ebgp.rev150901.bgp.DcgwTepList) PrintStream(java.io.PrintStream) BfdConfig(org.opendaylight.yang.gen.v1.urn.ericsson.params.xml.ns.yang.ebfd.rev190219.BfdConfig)

Aggregations

PrintStream (java.io.PrintStream)1 BfdConfig (org.opendaylight.yang.gen.v1.urn.ericsson.params.xml.ns.yang.ebfd.rev190219.BfdConfig)1 DcgwTepList (org.opendaylight.yang.gen.v1.urn.ericsson.params.xml.ns.yang.ebgp.rev150901.bgp.DcgwTepList)1