use of org.onosproject.event.Event in project onos by opennetworkinglab.
the class TopologyEventsListCommand method json.
/**
* Produces a JSON array of topology events.
*
* @param events the topology events with the data
* @return JSON array with the topology events
*/
private JsonNode json(List<Event> events) {
ObjectMapper mapper = new ObjectMapper();
ArrayNode result = mapper.createArrayNode();
for (Event event : events) {
result.add(json(mapper, event));
}
return result;
}
use of org.onosproject.event.Event in project onos by opennetworkinglab.
the class OpenstackRouterManagerTest method validateEvents.
private void validateEvents(Enum... types) {
int i = 0;
assertEquals("Number of events did not match", types.length, testListener.events.size());
for (Event event : testListener.events) {
assertEquals("Incorrect event received", types[i], event.type());
i++;
}
testListener.events.clear();
}
use of org.onosproject.event.Event in project onos by opennetworkinglab.
the class OpenstackNodeManagerTest method validateEvents.
private void validateEvents(Enum... types) {
int i = 0;
assertEquals("Number of events did not match", types.length, testListener.events.size());
for (Event event : testListener.events) {
assertEquals("Incorrect event received", types[i], event.type());
i++;
}
testListener.events.clear();
}
use of org.onosproject.event.Event in project onos by opennetworkinglab.
the class OpenstackVtapManagerTest method validateEvents.
private void validateEvents(Enum... types) {
int i = 0;
assertEquals("Number of events did not match", types.length, testListener.events.size());
for (Event event : testListener.events) {
assertEquals("Incorrect event received", types[i], event.type());
i++;
}
testListener.events.clear();
}
use of org.onosproject.event.Event in project onos by opennetworkinglab.
the class MQEventHandlerTest method validateEvents.
protected void validateEvents(Enum... types) {
int i = 0;
for (Event event : listener.events) {
assertEquals("incorrect event type", types[i], event.type());
i++;
}
listener.events.clear();
}
Aggregations