Search in sources :

Example 11 with UiLinkId

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

the class ModelCache method addOrUpdateDeviceLink.

// invoked from UiSharedTopologyModel link listener
void addOrUpdateDeviceLink(Link link) {
    UiLinkId id = uiLinkId(link);
    String memo = MEMO_UPDATED;
    UiDeviceLink uiDeviceLink = uiTopology.findDeviceLink(id);
    if (uiDeviceLink == null) {
        uiDeviceLink = addNewDeviceLink(id);
        memo = MEMO_ADDED;
    }
    updateDeviceLink(uiDeviceLink, link);
    postEvent(LINK_ADDED_OR_UPDATED, uiDeviceLink, memo);
}
Also used : UiDeviceLink(org.onosproject.ui.model.topo.UiDeviceLink) UiLinkId(org.onosproject.ui.model.topo.UiLinkId)

Aggregations

UiLinkId (org.onosproject.ui.model.topo.UiLinkId)11 UiDeviceLink (org.onosproject.ui.model.topo.UiDeviceLink)4 HashSet (java.util.HashSet)3 Test (org.junit.Test)3 DefaultEdgeLink.createEdgeLink (org.onosproject.net.DefaultEdgeLink.createEdgeLink)3 EdgeLink (org.onosproject.net.EdgeLink)3 UiEdgeLink (org.onosproject.ui.model.topo.UiEdgeLink)3 UiSynthLink (org.onosproject.ui.model.topo.UiSynthLink)3 ArrayNode (com.fasterxml.jackson.databind.node.ArrayNode)2 HashMap (java.util.HashMap)2 Link (org.onosproject.net.Link)2 UiHost (org.onosproject.ui.model.topo.UiHost)2 JsonNode (com.fasterxml.jackson.databind.JsonNode)1 ObjectNode (com.fasterxml.jackson.databind.node.ObjectNode)1 Set (java.util.Set)1 ConcurrentHashMap (java.util.concurrent.ConcurrentHashMap)1 Host (org.onosproject.net.Host)1 HostLocation (org.onosproject.net.HostLocation)1 AbstractUiImplTest (org.onosproject.ui.impl.AbstractUiImplTest)1 TrafficLink (org.onosproject.ui.impl.topo.util.TrafficLink)1