VAT-to-PAPI: VPPCounters
[csit.git] / resources / libraries / python / Tap.py
index ffcd00c..4e04a4a 100644 (file)
@@ -34,7 +34,7 @@ class Tap(object):
         :returns: Returns a interface index.
         :rtype: int
         """
-        command = 'connect'
+        command = 'create'
         if mac is not None:
             args = 'tapname {} mac {}'.format(tap_name, mac)
         else:
@@ -120,7 +120,7 @@ class Tap(object):
         :raises RuntimeError: Specified interface was not found.
         """
         tap_if = InterfaceUtil.tap_dump(node, tap_name)
-        if len(tap_if) == 0:
+        if not tap_if:
             raise RuntimeError(
                 'Tap interface :{} does not exist'.format(tap_name))