Search in sources :

Example 1 with NodeHighlight

use of org.onosproject.ui.topo.NodeHighlight in project onos by opennetworkinglab.

the class ProtectedIntentMonitor method ensureNodePresent.

// TODO duplicate and can be brought in abstract upper class.
private void ensureNodePresent(Highlights highlights, ElementId eid) {
    String id = eid.toString();
    NodeHighlight nh = highlights.getNode(id);
    if (nh == null) {
        if (eid instanceof DeviceId) {
            nh = new DeviceHighlight(id);
            highlights.add((DeviceHighlight) nh);
        } else if (eid instanceof HostId) {
            nh = new HostHighlight(id);
            highlights.add((HostHighlight) nh);
        }
    }
}
Also used : DeviceHighlight(org.onosproject.ui.topo.DeviceHighlight) DeviceId(org.onosproject.net.DeviceId) HostHighlight(org.onosproject.ui.topo.HostHighlight) NodeHighlight(org.onosproject.ui.topo.NodeHighlight) HostId(org.onosproject.net.HostId)

Example 2 with NodeHighlight

use of org.onosproject.ui.topo.NodeHighlight in project onos by opennetworkinglab.

the class TrafficMonitorBase method ensureNodePresent.

protected void ensureNodePresent(Highlights highlights, ElementId eid) {
    String id = eid.toString();
    NodeHighlight nh = highlights.getNode(id);
    if (nh == null) {
        if (eid instanceof DeviceId) {
            nh = new DeviceHighlight(id);
            highlights.add((DeviceHighlight) nh);
        } else if (eid instanceof HostId) {
            nh = new HostHighlight(id);
            highlights.add((HostHighlight) nh);
        }
    }
}
Also used : DeviceHighlight(org.onosproject.ui.topo.DeviceHighlight) DeviceId(org.onosproject.net.DeviceId) HostHighlight(org.onosproject.ui.topo.HostHighlight) NodeHighlight(org.onosproject.ui.topo.NodeHighlight) HostId(org.onosproject.net.HostId)

Aggregations

DeviceId (org.onosproject.net.DeviceId)2 HostId (org.onosproject.net.HostId)2 DeviceHighlight (org.onosproject.ui.topo.DeviceHighlight)2 HostHighlight (org.onosproject.ui.topo.HostHighlight)2 NodeHighlight (org.onosproject.ui.topo.NodeHighlight)2