use of org.openkilda.northbound.dto.v2.links.BfdPropertiesByEndpoint in project open-kilda by telstra.
the class LinkMapper method mapResponse.
/**
* Convert {@link BfdPropertiesResponse} into {@link BfdPropertiesPayload}.
*/
@Mapping(target = "intervalMs", source = "properties.interval")
@Mapping(target = "multiplier", source = "properties.multiplier")
public BfdPropertiesPayload mapResponse(BfdPropertiesResponse response) {
org.openkilda.northbound.dto.v2.links.BfdProperties properties = map(response.getGoal());
BfdPropertiesByEndpoint effectiveSource = new BfdPropertiesByEndpoint(response.getSource(), map(response.getEffectiveSource()), map(response.getEffectiveSource().getStatus()));
BfdPropertiesByEndpoint effectiveDestination = new BfdPropertiesByEndpoint(response.getDestination(), map(response.getEffectiveDestination()), map(response.getEffectiveDestination().getStatus()));
return new BfdPropertiesPayload(properties, effectiveSource, effectiveDestination);
}
Aggregations