CORD-535 Added purge and sync states CLIs

And improved result format of the existing CLIs

Change-Id: I49476ab52f77f6fadddf00dfc113c51153b300ed
diff --git a/src/main/java/org/opencord/cordvtn/cli/CordVtnPurgeStatesCommand.java b/src/main/java/org/opencord/cordvtn/cli/CordVtnPurgeStatesCommand.java
new file mode 100644
index 0000000..b26ec66
--- /dev/null
+++ b/src/main/java/org/opencord/cordvtn/cli/CordVtnPurgeStatesCommand.java
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2016-present Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.opencord.cordvtn.cli;
+
+import org.apache.karaf.shell.commands.Command;
+import org.onosproject.cli.AbstractShellCommand;
+import org.opencord.cordvtn.api.core.CordVtnAdminService;
+
+/**
+ * Purges internal network states.
+ */
+@Command(scope = "onos", name = "cordvtn-purge-states",
+        description = "Purges network states")
+public class CordVtnPurgeStatesCommand extends AbstractShellCommand {
+
+    @Override
+    protected void execute() {
+        CordVtnAdminService adminService =
+                AbstractShellCommand.get(CordVtnAdminService.class);
+        adminService.purgeStates();
+    }
+}