use of org.onosproject.newoptical.OpticalConnectivity in project onos by opennetworkinglab.
the class ListOpticalConnectivityCommand method doExecute.
@Override
protected void doExecute() {
OpticalPathService opticalPathService = get(OpticalPathService.class);
Collection<OpticalConnectivity> connectivities = opticalPathService.listConnectivity();
for (OpticalConnectivity connectivity : connectivities) {
print("Optical connectivity ID: %s", connectivity.id().id());
print(" links: %s", connectivity.links().stream().map(LinkKey::linkKey).map(lk -> lk.src() + "-" + lk.dst()).collect(Collectors.joining(", ")));
print(" Bandwidth: %s, Latency: %s", connectivity.bandwidth(), connectivity.latency());
print(" Intent Keys: %s", opticalPathService.listIntents(connectivity.id()));
}
}
Aggregations