16 package org.openkilda.northbound.converter;
32 import org.mapstruct.Mapper;
33 import org.mapstruct.Mapping;
34 import org.mapstruct.Mappings;
36 import java.util.ArrayList;
37 import java.util.List;
39 @Mapper(componentModel =
"spring")
71 flow.getSourceSwitch(),
73 flow.getSourceVlan()),
75 flow.getDestinationSwitch(),
76 flow.getDestinationPort(),
77 flow.getDestinationVlan()),
79 flow.isIgnoreBandwidth(),
80 flow.getDescription(),
81 flow.getLastUpdated(),
82 flow.getState().getState());
93 List<PathNode>
path =
new ArrayList<>(flow.getFlowPath().getPath());
95 path.add(0,
new PathNode(flow.getSourceSwitch(), flow.getSourcePort(), 0));
96 path.add(
new PathNode(flow.getDestinationSwitch(), flow.getDestinationPort(), 0));
98 List<PathNodePayload> resultList =
new ArrayList<>();
99 for (
int i = 1;
i <
path.size();
i += 2) {
120 message =
"No ping for reasonable time";
123 message =
"Can't send ping";
126 message =
"Unable to perform flow verification due to unsupported switch (at least one)";
129 message = error.toString();
default FlowPayload toFlowPayload(Flow flow)
default List< PathNodePayload > toPathNodePayloadList(Flow flow)
default String getVerificationError(FlowVerificationErrorCode error)