[ONOS-8093] Purge Meter API

Change-Id: I8e5a6826793b9f17d7115e241a12e3a2972b38a9
(cherry picked from commit 4e4084cd6ded060616a5afa7d3af427715cfc2d0)
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 7bfd6b9..868566c 100644
--- a/cli/src/main/java/org/onosproject/cli/net/WipeOutCommand.java
+++ b/cli/src/main/java/org/onosproject/cli/net/WipeOutCommand.java
@@ -35,6 +35,7 @@
 import org.onosproject.net.intent.IntentService;
 import org.onosproject.net.intent.Key;
 import org.onosproject.net.link.LinkAdminService;
+import org.onosproject.net.meter.MeterService;
 import org.onosproject.net.region.RegionAdminService;
 import org.onosproject.ui.UiExtensionService;
 import org.onosproject.ui.UiTopoLayoutService;
@@ -71,6 +72,7 @@
         wipeOutHosts();
         wipeOutFlows();
         wipeOutGroups();
+        wipeOutMeters();
         wipeOutDevices();
         wipeOutLinks();
         wipeOutNetworkConfig();
@@ -132,6 +134,15 @@
         }
     }
 
+    private void wipeOutMeters() {
+        print("Wiping meters");
+        MeterService meterService = get(MeterService.class);
+        DeviceAdminService deviceAdminService = get(DeviceAdminService.class);
+        for (Device device : deviceAdminService.getDevices()) {
+            meterService.purgeMeters(device.id());
+        }
+    }
+
     private void wipeOutHosts() {
         print("Wiping hosts");
         HostAdminService hostAdminService = get(HostAdminService.class);