Search in sources :

Example 41 with Event

use of org.onosproject.event.Event in project onos by opennetworkinglab.

the class ControlMessageManagerTest method validateEvents.

/**
 * Validates whether the manager receives the right events.
 *
 * @param types a set of types of control message event
 */
protected void validateEvents(Enum... types) {
    int i = 0;
    assertEquals("wrong events received", types.length, listener.events.size());
    for (Event event : listener.events) {
        assertEquals("incorrect event type", types[i], event.type());
        i++;
    }
    listener.events.clear();
}
Also used : ControlMessageEvent(org.onosproject.cpman.message.ControlMessageEvent) Event(org.onosproject.event.Event)

Example 42 with Event

use of org.onosproject.event.Event in project onos by opennetworkinglab.

the class K8sEndpointsManagerTest 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();
}
Also used : K8sEndpointsEvent(org.onosproject.k8snetworking.api.K8sEndpointsEvent) Event(org.onosproject.event.Event)

Example 43 with Event

use of org.onosproject.event.Event in project onos by opennetworkinglab.

the class K8sNetworkPolicyManagerTest 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();
}
Also used : K8sNetworkPolicyEvent(org.onosproject.k8snetworking.api.K8sNetworkPolicyEvent) Event(org.onosproject.event.Event)

Example 44 with Event

use of org.onosproject.event.Event in project onos by opennetworkinglab.

the class K8sPodManagerTest 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();
}
Also used : K8sPodEvent(org.onosproject.k8snetworking.api.K8sPodEvent) Event(org.onosproject.event.Event)

Example 45 with Event

use of org.onosproject.event.Event in project onos by opennetworkinglab.

the class K8sApiConfigManagerTest 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();
}
Also used : K8sApiConfigEvent(org.onosproject.k8snode.api.K8sApiConfigEvent) Event(org.onosproject.event.Event) K8sNodeUtil.endpoint(org.onosproject.k8snode.util.K8sNodeUtil.endpoint)

Aggregations

Event (org.onosproject.event.Event)47 TopologyEvent (org.onosproject.net.topology.TopologyEvent)9 DeviceEvent (org.onosproject.net.device.DeviceEvent)7 LinkEvent (org.onosproject.net.link.LinkEvent)6 ConnectPoint (org.onosproject.net.ConnectPoint)5 ArrayNode (com.fasterxml.jackson.databind.node.ArrayNode)3 ArrayList (java.util.ArrayList)3 List (java.util.List)3 HostEvent (org.onosproject.net.host.HostEvent)3 ObjectNode (com.fasterxml.jackson.databind.node.ObjectNode)2 Map (java.util.Map)2 Set (java.util.Set)2 CompletableFuture (java.util.concurrent.CompletableFuture)2 ExecutorService (java.util.concurrent.ExecutorService)2 ScheduledExecutorService (java.util.concurrent.ScheduledExecutorService)2 Collectors (java.util.stream.Collectors)2 ClusterEvent (org.onosproject.cluster.ClusterEvent)2 MastershipEvent (org.onosproject.mastership.MastershipEvent)2 Link (org.onosproject.net.Link)2 IntentEvent (org.onosproject.net.intent.IntentEvent)2