ONOS-4971: Synthetic Link Data -- WIP
- Breaking out UiLink to subclasses for device links, host links, region links, region-device links,
- (soon, also peer links).
- Augmenting UiLinkId to include regions as endpoints.
- Introduced UiSynthLink to encapsulate synthetic links bound to regions.
- Model Cache now computes synthetic links from the underlying link data.
- Added endPointA/B() and type() methods to UiLink.
- Updated topo2CurrentRegion response to include synth-links for the region.
Change-Id: Ifa62a15fbe0a58b134d92278b201fa7a72cbfa83
diff --git a/web/gui/src/main/java/org/onosproject/ui/impl/topo/UiTopoSession.java b/web/gui/src/main/java/org/onosproject/ui/impl/topo/UiTopoSession.java
index 7127ec1..44ea910 100644
--- a/web/gui/src/main/java/org/onosproject/ui/impl/topo/UiTopoSession.java
+++ b/web/gui/src/main/java/org/onosproject/ui/impl/topo/UiTopoSession.java
@@ -25,6 +25,7 @@
import org.onosproject.ui.model.topo.UiClusterMember;
import org.onosproject.ui.model.topo.UiNode;
import org.onosproject.ui.model.topo.UiRegion;
+import org.onosproject.ui.model.topo.UiSynthLink;
import org.onosproject.ui.model.topo.UiTopoLayout;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -214,6 +215,16 @@
}
/**
+ * Returns the (synthetic) links of the region in the specified layout.
+ *
+ * @param layout the layout being viewed
+ * @return all links that are contained by this layout's region
+ */
+ public List<UiSynthLink> getLinks(UiTopoLayout layout) {
+ return sharedModel.getSynthLinks(layout.regionId());
+ }
+
+ /**
* Refreshes the model's internal state.
*/
public void refreshModel() {