Adding commands for managing layouts.

Adding support for wiping out regions and layouts.
Refactored UI layout manager to allow public knowledge of default layout id.
Enhanced test topo for layout hierarchy.

Change-Id: I254fd494175e753f542f12a664618c1a83f72127
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 f64a304..ddd9970 100644
--- a/cli/src/main/java/org/onosproject/cli/net/WipeOutCommand.java
+++ b/cli/src/main/java/org/onosproject/cli/net/WipeOutCommand.java
@@ -26,6 +26,8 @@
 import org.onosproject.net.intent.IntentService;
 import org.onosproject.net.intent.IntentState;
 import org.onosproject.net.link.LinkAdminService;
+import org.onosproject.net.region.RegionAdminService;
+import org.onosproject.ui.UiTopoLayoutService;
 
 /**
  * Wipes-out the entire network information base, i.e. devices, links, hosts, intents.
@@ -51,6 +53,9 @@
         wipeOutHosts();
         wipeOutDevices();
         wipeOutLinks();
+
+        wipeOutLayouts();
+        wipeOutRegions();
     }
 
     private void wipeOutIntents() {
@@ -106,4 +111,16 @@
             }
         }
     }
+
+    private void wipeOutLayouts() {
+        print("Wiping UI layouts");
+        UiTopoLayoutService service = get(UiTopoLayoutService.class);
+        service.getLayouts().forEach(service::removeLayout);
+    }
+
+    private void wipeOutRegions() {
+        print("Wiping regions");
+        RegionAdminService service = get(RegionAdminService.class);
+        service.getRegions().forEach(r -> service.removeRegion(r.id()));
+    }
 }