Merge "sriov: Determine path to the bind-tool"
[vswitchperf.git] / vswitches / vswitch.py
index 73e0a0c..efa3a34 100644 (file)
@@ -20,6 +20,14 @@ class IVSwitch(object):
 
     Other methods are called only between start() and stop()
     """
+    def get_version(self):
+        """Return version of vSwitch and DPDK (if used by vSwitch)
+           This method should be implemented in case, that version
+           of vswitch or DPDK can be read only during vSwitch runtime.
+           Otherwise it can be implemented inside tools/systeminfo.py.
+        """
+        raise NotImplementedError()
+
     def start(self):
         """Start the vSwitch
 
@@ -28,6 +36,13 @@ class IVSwitch(object):
         """
         raise NotImplementedError()
 
+    def restart(self):
+        """Retart the vSwitch
+
+        Restart of vSwitch is required for failover testcases.
+        """
+        raise NotImplementedError()
+
     def stop(self):
         """Stop the vSwitch
 
@@ -130,6 +145,39 @@ class IVSwitch(object):
         """
         raise NotImplementedError()
 
+    def add_connection(self, switch_name, port1, port2, bidir=False):
+        """Creates connection between given ports.
+
+        :param switch_name: switch on which to operate
+        :param port1: port to be used in connection
+        :param port2: port to be used in connection
+        :param bidir: switch between uni and bidirectional traffic
+
+        :raises: RuntimeError
+        """
+        raise NotImplementedError()
+
+    def del_connection(self, switch_name, port1, port2, bidir=False):
+        """Remove connection between two interfaces.
+
+        :param switch_name: switch on which to operate
+        :param port1: port to be used in connection
+        :param port2: port to be used in connection
+        :param bidir: switch between uni and bidirectional traffic
+
+        :raises: RuntimeError
+        """
+        raise NotImplementedError()
+
+    def dump_connections(self, switch_name):
+        """Dump connections between interfaces.
+
+        :param switch_name: switch on which to operate
+
+        :raises: RuntimeError
+        """
+        raise NotImplementedError()
+
     def dump_flows(self, switch_name):
         """Dump flows from the logical switch