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/cli/src/main/java/org/onosproject/cli/net/WipeOutCommand.java b/cli/src/main/java/org/onosproject/cli/net/WipeOutCommand.java
index ddd9970..61ea43d 100644
--- a/cli/src/main/java/org/onosproject/cli/net/WipeOutCommand.java
+++ b/cli/src/main/java/org/onosproject/cli/net/WipeOutCommand.java
@@ -115,7 +115,12 @@
private void wipeOutLayouts() {
print("Wiping UI layouts");
UiTopoLayoutService service = get(UiTopoLayoutService.class);
- service.getLayouts().forEach(service::removeLayout);
+ // wipe out all layouts except the default, which should always be there
+ service.getLayouts().forEach(l -> {
+ if (!l.id().isDefault()) {
+ service.removeLayout(l);
+ }
+ });
}
private void wipeOutRegions() {