use of org.onosproject.codec.impl.MockCodecContext in project trellis-control by opennetworkinglab.
the class RedirectPolicyCodecTest method setUp.
@Before
public void setUp() throws Exception {
context = new MockCodecContext();
codec = new RedirectPolicyCodec();
List<DeviceId> deviceIds = new LinkedList<>();
deviceIds.add(DeviceId.deviceId("of:0000000000000001"));
deviceIds.add(DeviceId.deviceId("of:0000000000000002"));
deviceIds.add(DeviceId.deviceId("of:0000000000000003"));
redirectPolicy = new RedirectPolicy(Set.copyOf(deviceIds));
}
use of org.onosproject.codec.impl.MockCodecContext in project trellis-control by opennetworkinglab.
the class TrafficMatchCodecTest method setUp.
@Before
public void setUp() throws Exception {
context = new MockCodecContext();
codec = new TrafficMatchCodec();
trafficSelector = DefaultTrafficSelector.builder().matchIPProtocol((byte) 0x06).matchIPSrc(Ip4Address.valueOf("10.0.0.1").toIpPrefix()).matchIPDst(Ip4Address.valueOf("10.0.0.2").toIpPrefix()).matchTcpSrc(TpPort.tpPort(80)).matchTcpDst(TpPort.tpPort(81)).build();
policyId = PolicyId.of("DROP");
TrafficMatchPriority trafficMatchPriority = new TrafficMatchPriority(60000);
trafficMatch = new TrafficMatch(trafficSelector, policyId, trafficMatchPriority);
}
use of org.onosproject.codec.impl.MockCodecContext in project trellis-control by opennetworkinglab.
the class XconnectCodecTest method setUp.
@Before
public void setUp() throws Exception {
context = new MockCodecContext();
codec = new XconnectCodec();
}
Aggregations