use of org.onosproject.cpman.ControlMessage in project onos by opennetworkinglab.
the class ControlMessageEventTest method createControlMessages.
private Set<ControlMessage> createControlMessages() {
final DeviceId deviceId = DeviceId.deviceId("of:0000000000000001");
Set<ControlMessage> controlMessages = Sets.newConcurrentHashSet();
controlMessages.add(createControlMessage(INBOUND_PACKET, deviceId));
controlMessages.add(createControlMessage(OUTBOUND_PACKET, deviceId));
return controlMessages;
}
use of org.onosproject.cpman.ControlMessage in project onos by opennetworkinglab.
the class ControlMessageManagerTest method updateStatsInfo.
/**
* Tests the updateStatsInfo method.
*/
@Test
public void updateStatsInfo() {
Set<ControlMessage> cms = Sets.newHashSet();
ControlMessage.Type in = ControlMessage.Type.INBOUND_PACKET;
ControlMessage.Type out = ControlMessage.Type.OUTBOUND_PACKET;
ControlMessage.Type mod = ControlMessage.Type.FLOW_MOD_PACKET;
ControlMessage.Type rmv = ControlMessage.Type.FLOW_REMOVED_PACKET;
ControlMessage.Type req = ControlMessage.Type.REQUEST_PACKET;
ControlMessage.Type rep = ControlMessage.Type.REPLY_PACKET;
cms.add(new DefaultControlMessage(in, DID, 0, 0, 0, 0));
cms.add(new DefaultControlMessage(out, DID, 0, 0, 0, 0));
cms.add(new DefaultControlMessage(mod, DID, 0, 0, 0, 0));
cms.add(new DefaultControlMessage(rmv, DID, 0, 0, 0, 0));
cms.add(new DefaultControlMessage(req, DID, 0, 0, 0, 0));
cms.add(new DefaultControlMessage(rep, DID, 0, 0, 0, 0));
providerService.updateStatsInfo(DID, cms);
validateEvents(ControlMessageEvent.Type.STATS_UPDATE);
cms.clear();
}
Aggregations