use of org.onosproject.odtn.utils.tapi.TapiConnection in project onos by opennetworkinglab.
the class DcsBasedTapiConnectionManager method createConnection.
@Override
public TapiConnectionHandler createConnection(TapiNepPair neps) {
// Calculate route
TapiConnection connection = connectionController.pathCompute(neps);
log.debug("Calculated path: {}", connection);
createConnectionRecursively(connection);
/*
* RCAS Create Intent: Assume that if the result of the pathCompute is flat
* and there are no lower connections, it has to be mapped to an intent
* It is a connection between line ports (OCh) with an OpticalConnectivity
* Intent.
*/
if (connection.getLowerConnections().isEmpty()) {
TapiNepRef left = neps.left();
TapiNepRef right = neps.right();
ConnectPoint leftConnectPoint = left.getConnectPoint();
ConnectPoint rightConnectPoint = right.getConnectPoint();
log.debug("Creating Intent from {} to {} {}", leftConnectPoint, rightConnectPoint, connectionHandler.getId());
notifyTapiConnectivityChange(connectionHandler.getId().toString(), leftConnectPoint, rightConnectPoint, true);
}
return connectionHandler;
}
use of org.onosproject.odtn.utils.tapi.TapiConnection in project onos by opennetworkinglab.
the class DefaultTapiPathComputer method mockPathCompute.
/**
* Mock to create path computation result.
*
* neps.left connection neps.right
* ■----------------------------------------------------■
* \ /
* \ /
* \ leftLowerConnection / rightLowerConnection
* \ /
* \ /
* ■ ■
* leftLineNep rightLineNep
*/
private TapiConnection mockPathCompute(TapiNepPair neps) {
TapiNepRef leftLineNep = mockGetTransponderLinePort(neps.left());
TapiNepRef rightLineNep = mockGetTransponderLinePort(neps.right());
TapiConnection leftLowerConnection = TapiConnection.create(TapiCepRef.create(neps.left(), neps.left().getCepIds().get(0)), TapiCepRef.create(leftLineNep, leftLineNep.getCepIds().get(0)));
TapiConnection rightLowerConnection = TapiConnection.create(TapiCepRef.create(neps.right(), neps.right().getCepIds().get(0)), TapiCepRef.create(rightLineNep, rightLineNep.getCepIds().get(0)));
TapiConnection connection = TapiConnection.create(TapiCepRef.create(neps.left(), neps.left().getCepIds().get(0)), TapiCepRef.create(neps.right(), neps.right().getCepIds().get(0)));
connection.addLowerConnection(leftLowerConnection).addLowerConnection(rightLowerConnection);
return connection;
}
use of org.onosproject.odtn.utils.tapi.TapiConnection in project onos by opennetworkinglab.
the class DefaultTapiPathComputer method pathComputeDetail.
/**
* Compute and decide multi-hop route/path from e2e intent.
* <p>
* FIXME this can work only for Phase1.0, we need some features to:
* - define Route and select media channel
* - with pre-defined topology and forwarding constraint of each devices or domains
* - get all ConnectionEndPoint in the defined route and return them
* as list of Cep pair for each connection to be created
*/
private TapiConnection pathComputeDetail(TapiNepPair neps) {
log.debug("TapiNepPair {}", neps);
log.debug("Nep0 {}", neps.left());
log.debug("Nep1 {}", neps.right());
/*
* RCAS: 20190117 - We assume that if port type is LINE, it relies on intents.
* We construct just a single top-most connection object.
*/
if (neps.left().getPortType() == LINE) {
log.info("Connection between line ports");
TapiConnection connection = TapiConnection.create(TapiCepRef.create(neps.left(), neps.left().getCepIds().get(0)), TapiCepRef.create(neps.right(), neps.right().getCepIds().get(0)));
return connection;
} else {
return mockPathCompute(neps);
}
}
Aggregations