Search in sources :

Example 1 with ApplicationRibBuilder

use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev171207.ApplicationRibBuilder in project bgpcep by opendaylight.

the class AppPeerBenchmark method start.

public void start() {
    LOG.debug("Instantiating App Peer Benchmark : {}", this.appRibId);
    final ApplicationRib appRib = new ApplicationRibBuilder().setId(new ApplicationRibId(new ApplicationRibId(this.appRibId))).setTables(EMPTY_TABLES).build();
    final WriteTransaction wTx = this.txChain.newWriteOnlyTransaction();
    wTx.put(LogicalDatastoreType.CONFIGURATION, this.appIID, appRib);
    Futures.addCallback(wTx.submit(), new FutureCallback<Void>() {

        @Override
        public void onSuccess(final Void result) {
            LOG.info("Empty Structure created for Application Peer Benchmark {}", AppPeerBenchmark.this.appRibId);
        }

        @Override
        public void onFailure(final Throwable throwable) {
            LOG.error("Failed to create Empty Structure for Application Peer Benchmark {}", AppPeerBenchmark.this.appRibId, throwable);
        }
    }, MoreExecutors.directExecutor());
}
Also used : WriteTransaction(org.opendaylight.controller.md.sal.binding.api.WriteTransaction) ApplicationRibBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev171207.ApplicationRibBuilder) ApplicationRib(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev171207.ApplicationRib) ApplicationRibId(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev171207.ApplicationRibId)

Aggregations

WriteTransaction (org.opendaylight.controller.md.sal.binding.api.WriteTransaction)1 ApplicationRib (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev171207.ApplicationRib)1 ApplicationRibBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev171207.ApplicationRibBuilder)1 ApplicationRibId (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev171207.ApplicationRibId)1