ONOS-4326: Working on topology topo2start processing.
- Added getPeers() to UiTopoLayoutService.
- Fixed wipe-out command to leave the default layout alone.
- Fixed handling of null-region (associated with default layout).
- Added refresh() method to model cache.
- Fixed regions-topo-2 device IDs
Change-Id: Iee49b47ff6702bed9751be7b63392577422d4763
diff --git a/core/api/src/main/java/org/onosproject/ui/model/topo/UiTopoLayoutId.java b/core/api/src/main/java/org/onosproject/ui/model/topo/UiTopoLayoutId.java
index 289cacd..3dea4bb 100644
--- a/core/api/src/main/java/org/onosproject/ui/model/topo/UiTopoLayoutId.java
+++ b/core/api/src/main/java/org/onosproject/ui/model/topo/UiTopoLayoutId.java
@@ -23,10 +23,13 @@
*/
public final class UiTopoLayoutId extends Identifier<String> {
+ private static final String DEFAULT_STR = "_default_";
+
/**
* Default topology layout identifier.
*/
- public static final UiTopoLayoutId DEFAULT_ID = UiTopoLayoutId.layoutId("_default_");
+ public static final UiTopoLayoutId DEFAULT_ID =
+ UiTopoLayoutId.layoutId(DEFAULT_STR);
// For serialization
private UiTopoLayoutId() {
@@ -45,4 +48,13 @@
public static UiTopoLayoutId layoutId(String value) {
return new UiTopoLayoutId(value);
}
+
+ /**
+ * Returns true if this is the identifier for the default layout.
+ *
+ * @return true if this is the default layout identifier
+ */
+ public boolean isDefault() {
+ return DEFAULT_STR.equals(identifier);
+ }
}