16 package org.openkilda.messaging.command.flow;
22 import com.fasterxml.jackson.annotation.JsonCreator;
23 import com.fasterxml.jackson.annotation.JsonInclude;
24 import com.fasterxml.jackson.annotation.JsonProperty;
25 import com.fasterxml.jackson.databind.annotation.JsonSerialize;
28 import java.util.UUID;
32 @JsonInclude(JsonInclude.Include.NON_NULL)
34 @JsonProperty(
"packet_id")
35 private final UUID packetId;
37 @JsonProperty(
"timeout")
40 @JsonProperty(
"flow_id")
41 private String flowId;
43 @JsonProperty(
"direction")
46 @JsonProperty(
"source_switch")
49 @JsonProperty(
"source_port")
50 private int sourcePort;
52 @JsonProperty(
"dest_switch")
60 @JsonProperty(
"packet_id") UUID packetId,
61 @JsonProperty(
"timeout")
int timeout,
62 @JsonProperty(
"flow_id") String flowId,
64 @JsonProperty(
"source_switch")
SwitchId sourceSwitchId,
65 @JsonProperty(
"source_port")
int sourcePort,
66 @JsonProperty(
"dest_switch")
SwitchId destSwitchId,
67 @JsonProperty(
"vlan")
int vlanId) {
68 if (packetId == null) {
69 packetId = UUID.randomUUID();
71 this.packetId = packetId;
72 this.timeout = timeout;
75 this.direction = direction;
76 this.sourceSwitchId = sourceSwitchId;
77 this.sourcePort = sourcePort;
78 this.destSwitchId = destSwitchId;
88 flow.getSourceSwitch(), flow.getSourcePort(),
89 flow.getDestinationSwitch(),
90 flow.getSourceVlan());
UniFlowVerificationRequest(FlowVerificationRequest request, Flow flow, FlowDirection direction)
UniFlowVerificationRequest( @JsonProperty("packet_id") UUID packetId, @JsonProperty("timeout") int timeout, @JsonProperty("flow_id") String flowId, @JsonProperty("direction") FlowDirection direction, @JsonProperty("source_switch") SwitchId sourceSwitchId, @JsonProperty("source_port") int sourcePort, @JsonProperty("dest_switch") SwitchId destSwitchId, @JsonProperty("vlan") int vlanId)