use of org.opendaylight.yang.gen.v1.http.openconfig.net.yang.routing.policy.rev151009.routing.policy.top.routing.policy.policy.definitions.policy.definition.Statements in project bgpcep by opendaylight.
the class BGPRibPolicyImpl method loadStatements.
private List<Statement> loadStatements(final String key) throws ExecutionException, InterruptedException {
final ReadOnlyTransaction tr = this.databroker.newReadOnlyTransaction();
final com.google.common.base.Optional<Statements> result = tr.read(LogicalDatastoreType.CONFIGURATION, ROUTING_POLICY_IID.child(PolicyDefinitions.class).child(PolicyDefinition.class, new PolicyDefinitionKey(key)).child(Statements.class)).get();
if (!result.isPresent()) {
return Collections.emptyList();
}
return result.get().getStatement();
}
Aggregations