use of org.opendaylight.yang.gen.v1.http.openconfig.net.yang.routing.policy.rev151009.routing.policy.top.RoutingPolicy in project bgpcep by opendaylight.
the class OpenconfigRoutingPolicyLoader method loadConfiguration.
@Override
public void loadConfiguration(final NormalizedNode<?, ?> dto) {
final RoutingPolicy routingPolicy = (RoutingPolicy) this.bindingSerializer.fromNormalizedNode(this.routingPolicyYiid, dto).getValue();
final WriteTransaction wtx = this.dataBroker.newWriteOnlyTransaction();
wtx.merge(LogicalDatastoreType.CONFIGURATION, ROUTING_POLICY_IID, routingPolicy, WriteTransaction.CREATE_MISSING_PARENTS);
try {
wtx.submit().get();
} catch (final ExecutionException | InterruptedException e) {
LOG.warn("Failed to create Routing Policy config", e);
}
}
Aggregations