use of org.openkilda.messaging.model.NetworkEndpoint in project open-kilda by telstra.
the class LinkPropsMapper method toLinkMaxBandwidth.
/**
* Converts {@link LinkPropsDto} to {@link LinkMaxBandwidthDto}.
*/
default LinkMaxBandwidthDto toLinkMaxBandwidth(LinkPropsDto input) {
NetworkEndpoint source = input.getSource();
NetworkEndpoint dest = input.getDest();
Long maxBandwidth = Long.valueOf(input.getProps().get(LinkProps.MAX_BANDWIDTH_PROP_NAME));
return new LinkMaxBandwidthDto(source.getDatapath().toString(), source.getPortNumber(), dest.getDatapath().toString(), dest.getPortNumber(), maxBandwidth);
}
use of org.openkilda.messaging.model.NetworkEndpoint in project open-kilda by telstra.
the class BfdPropertyApplyException method formatErrorMessage.
private static String formatErrorMessage(BfdPropertiesResponse properties) {
NetworkEndpoint source = properties.getSource();
NetworkEndpoint destination = properties.getDestination();
return String.format("Unable to apply BFD properties %s on %s_%s <===> %s_%s " + "(effective source: %s, effective destination: %s", properties.getGoal(), source.getDatapath(), source.getPortNumber(), destination.getDatapath(), destination.getPortNumber(), properties.getEffectiveSource(), properties.getEffectiveDestination());
}
Aggregations