use of org.opendaylight.protocol.bgp.openconfig.routing.policy.spi.registry.RouteAttributeContainer in project bgpcep by opendaylight.
the class ExportDefaultStatementTest method testFromInternalToInternal.
@Test
public void testFromInternalToInternal() {
final Statement statement = getStatementAndSetToRole("from-internal-to-internal", PeerRole.Ibgp);
final RouteAttributeContainer attributeContainer = routeAttributeContainerFalse(createClusterInput());
assertApplyExportStatement(statement, PeerRole.Ibgp, attributeContainer, null);
}
use of org.opendaylight.protocol.bgp.openconfig.routing.policy.spi.registry.RouteAttributeContainer in project bgpcep by opendaylight.
the class ExportDefaultStatementTest method testFromExternalToRRClient.
@Test
public void testFromExternalToRRClient() {
final Statement statement = getStatementAndSetToRole("from-external-to-route-reflector", PeerRole.RrClient);
final RouteAttributeContainer attributeContainer = routeAttributeContainerFalse(createClusterInput());
assertApplyExportStatement(statement, PeerRole.Ebgp, attributeContainer, attributeContainer.getAttributes());
}
use of org.opendaylight.protocol.bgp.openconfig.routing.policy.spi.registry.RouteAttributeContainer in project bgpcep by opendaylight.
the class ExportDefaultStatementTest method testOdlInternal.
@Test
public void testOdlInternal() {
final Statement statement = getStatementAndSetToRole("to-odl-internal", PeerRole.Internal);
final RouteAttributeContainer attributeContainer = routeAttributeContainerFalse(createClusterInput());
assertApplyExportStatement(statement, PeerRole.Ebgp, attributeContainer, null);
assertApplyExportStatement(statement, PeerRole.Ibgp, attributeContainer, null);
assertApplyExportStatement(statement, PeerRole.Internal, attributeContainer, null);
assertApplyExportStatement(statement, PeerRole.RrClient, attributeContainer, null);
}
use of org.opendaylight.protocol.bgp.openconfig.routing.policy.spi.registry.RouteAttributeContainer in project bgpcep by opendaylight.
the class ExportDefaultStatementTest method testToEbgp.
@Test
public void testToEbgp() {
final Statement statement = getStatementAndSetToRole("to-external", PeerRole.Ebgp);
final Attributes expectedOutput = createPathInputWithAs();
final RouteAttributeContainer attributeContainer = routeAttributeContainerFalse(createPathInput(null));
assertApplyExportStatement(statement, PeerRole.Ebgp, attributeContainer, expectedOutput);
assertApplyExportStatement(statement, PeerRole.Ibgp, attributeContainer, expectedOutput);
assertApplyExportStatement(statement, PeerRole.Internal, attributeContainer, expectedOutput);
assertApplyExportStatement(statement, PeerRole.RrClient, attributeContainer, expectedOutput);
}
use of org.opendaylight.protocol.bgp.openconfig.routing.policy.spi.registry.RouteAttributeContainer in project bgpcep by opendaylight.
the class ImportDefaultStatementTest method assertApplyImportStatement.
private void assertApplyImportStatement(final Statement statement, final PeerRole fromPeerRole, final RouteAttributeContainer attInput, final Attributes attExpected) {
doReturn(fromPeerRole).when(this.importParameters).getFromPeerRole();
RouteAttributeContainer result = this.statementRegistry.applyImportStatement(this.baseAttributes, this.importParameters, attInput, statement);
assertEquals(attExpected, result.getAttributes());
}
Aggregations