ONOS-4971: Synthetic Link Data -- WIP
- Enhancing UiRegion to capture the hierarchical (parent/child) relationships captured in the UiTopoLayouts.
Change-Id: I152e0d52d4580b14b679f3387402077f16f61e6a
diff --git a/core/api/src/main/java/org/onosproject/ui/model/topo/UiTopology.java b/core/api/src/main/java/org/onosproject/ui/model/topo/UiTopology.java
index 585e658..708fd18 100644
--- a/core/api/src/main/java/org/onosproject/ui/model/topo/UiTopology.java
+++ b/core/api/src/main/java/org/onosproject/ui/model/topo/UiTopology.java
@@ -151,7 +151,8 @@
/**
- * Returns all regions in the model.
+ * Returns all regions in the model (except the
+ * {@link #nullRegion() null region}).
*
* @return all regions
*/
@@ -177,7 +178,7 @@
* @return corresponding UI region
*/
public UiRegion findRegion(RegionId id) {
- return regionLookup.get(id);
+ return UiRegion.NULL_ID.equals(id) ? nullRegion() : regionLookup.get(id);
}
/**