use of org.openkilda.model.Isl.IslBuilder in project open-kilda by telstra.
the class IslFsm method createIsl.
private Isl createIsl(Anchor source, Anchor dest, Instant timeNow) {
final Endpoint sourceEndpoint = source.getEndpoint();
final Endpoint destEndpoint = dest.getEndpoint();
IslBuilder islBuilder = Isl.builder().srcSwitch(source.getSw()).srcPort(sourceEndpoint.getPortNumber()).destSwitch(dest.getSw()).destPort(destEndpoint.getPortNumber()).underMaintenance(source.getSw().isUnderMaintenance() || dest.getSw().isUnderMaintenance());
initializeFromLinkProps(sourceEndpoint, destEndpoint, islBuilder);
Isl link = islBuilder.build();
log.info("Create new DB object (prefilled): {}", link);
islRepository.add(link);
return link;
}
Aggregations