Included connect point port number in definition of UiLinkId.
Added dumpString() to ModelCache / UiTopology.
Added more unit tests for ModelCache.
Change-Id: I842bb418b25cc901bd12bc28c6660c836f7235bc
diff --git a/core/api/src/main/java/org/onosproject/ui/model/topo/UiRegion.java b/core/api/src/main/java/org/onosproject/ui/model/topo/UiRegion.java
index 0bcaa58..9776216 100644
--- a/core/api/src/main/java/org/onosproject/ui/model/topo/UiRegion.java
+++ b/core/api/src/main/java/org/onosproject/ui/model/topo/UiRegion.java
@@ -16,6 +16,7 @@
package org.onosproject.ui.model.topo;
+import com.google.common.collect.ImmutableSet;
import org.onosproject.net.DeviceId;
import org.onosproject.net.HostId;
import org.onosproject.net.region.Region;
@@ -117,6 +118,15 @@
}
/**
+ * Returns the set of device identifiers for this region.
+ *
+ * @return device identifiers for this region
+ */
+ public Set<DeviceId> deviceIds() {
+ return ImmutableSet.copyOf(deviceIds);
+ }
+
+ /**
* Returns the devices in this region.
*
* @return the devices in this region
@@ -126,6 +136,15 @@
}
/**
+ * Returns the set of host identifiers for this region.
+ *
+ * @return host identifiers for this region
+ */
+ public Set<HostId> hostIds() {
+ return ImmutableSet.copyOf(hostIds);
+ }
+
+ /**
* Returns the hosts in this region.
*
* @return the hosts in this region
@@ -135,6 +154,15 @@
}
/**
+ * Returns the set of link identifiers for this region.
+ *
+ * @return link identifiers for this region
+ */
+ public Set<UiLinkId> linkIds() {
+ return ImmutableSet.copyOf(uiLinkIds);
+ }
+
+ /**
* Returns the links in this region.
*
* @return the links in this region