diff --git a/TestON/drivers/common/cli/emulator/mininetclidriver.py b/TestON/drivers/common/cli/emulator/mininetclidriver.py
index 1d75ae4..1e22267 100644
--- a/TestON/drivers/common/cli/emulator/mininetclidriver.py
+++ b/TestON/drivers/common/cli/emulator/mininetclidriver.py
@@ -1235,6 +1235,29 @@
             main.exit()
         return main.TRUE
 
+    def switch( self, **switchargs ):
+        """
+           start/stop a switch
+        """
+        args = utilities.parse_args( [ "SW", "OPTION" ], **switchargs )
+        sw = args[ "SW" ] if args[ "SW" ] is not None else ""
+        option = args[ "OPTION" ] if args[ "OPTION" ] is not None else ""
+        command = "switch " + str( sw ) + " " + str( option )
+        main.log.info( command )
+        try:
+            self.handle.sendline( command )
+            self.handle.expect( "mininet>" )
+        except pexpect.TIMEOUT:
+            main.log.error( self.name + ": pexpect.TIMEOUT found" )
+            main.cleanup()
+            main.exit()
+        except pexpect.EOF:
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":     " + self.handle.before )
+            main.cleanup()
+            main.exit()
+        return main.TRUE
+
     def yank( self, **yankargs ):
         """
            yank a mininet switch interface to a host"""
diff --git a/TestON/drivers/common/cli/onosclidriver.py b/TestON/drivers/common/cli/onosclidriver.py
index a361aca..32aef33 100644
--- a/TestON/drivers/common/cli/onosclidriver.py
+++ b/TestON/drivers/common/cli/onosclidriver.py
@@ -1787,43 +1787,35 @@
             main.cleanup()
             main.exit()
 
-    def intents( self, jsonFormat=True ):
+    def intents( self, jsonFormat = True, summary = False, **intentargs):
         """
         Optional:
             * jsonFormat: enable output formatting in json
+            * summary: whether only output the intent summary
+            * type: only output a certain type of intent
+              This options is valid only when jsonFormat is true and summary is
+              true
         Description:
-            Obtain intents currently installed
+            Obtain intents
         """
         try:
             cmdStr = "intents"
+            if summary:
+                cmdStr += " -s"
             if jsonFormat:
                 cmdStr += " -j"
             handle = self.sendline( cmdStr )
-            return handle
-        except TypeError:
-            main.log.exception( self.name + ": Object not as expected" )
-            return None
-        except pexpect.EOF:
-            main.log.error( self.name + ": EOF exception found" )
-            main.log.error( self.name + ":    " + self.handle.before )
-            main.cleanup()
-            main.exit()
-        except Exception:
-            main.log.exception( self.name + ": Uncaught exception!" )
-            main.cleanup()
-            main.exit()
-
-    def m2SIntentInstalledNumber( self ):
-        """
-        Description:
-            Obtain the number of multiple point to single point intents
-            installed
-        """
-        try:
-            cmdStr = "intents -s -j"
-            handle = self.sendline( cmdStr )
-            jsonResult = json.loads( handle )
-            return jsonResult['multiPointToSinglePoint']['installed']
+            args = utilities.parse_args( [ "TYPE" ], **intentargs )
+            type = args[ "TYPE" ] if args[ "TYPE" ] is not None else ""
+            if jsonFormat and summary and ( type != "" ):
+                jsonResult = json.loads( handle )
+                if type in jsonResult.keys():
+                    return jsonResult[ type ]
+                else:
+                    main.log.error( "unknown TYPE, return all types of intents" )
+                    return handle
+            else:
+                return handle
 
         except TypeError:
             main.log.exception( self.name + ": Object not as expected" )
@@ -1838,6 +1830,7 @@
             main.cleanup()
             main.exit()
 
+
     def getIntentState(self, intentsId, intentsJson=None):
         """
             Check intent state.
