Ejemplo n.º 1
0
    def testMirroring(self):
        tc.setPortMirroring(self._bridge0.devName, self._bridge1.devName)
        self.assertTrue(self._sendPing(), "Bridge received no mirrored ping "
                        "requests.")

        tc.unsetPortMirroring(self._bridge0.devName, self._bridge1.devName)
        self.assertFalse(self._sendPing(), "Bridge received mirrored ping "
                         "requests, but mirroring is unset.")
Ejemplo n.º 2
0
    def testMirroring(self):
        tc.setPortMirroring(self._bridge0.devName, self._bridge1.devName)
        self.assertTrue(self._sendPing(), "Bridge received no mirrored ping "
                        "requests.")

        tc.unsetPortMirroring(self._bridge0.devName, self._bridge1.devName)
        self.assertFalse(
            self._sendPing(), "Bridge received mirrored ping "
            "requests, but mirroring is unset.")
Ejemplo n.º 3
0
    def setPortMirroring(self, networkName, ifaceName):
        '''
        Copy networkName traffic of a bridge to an interface

        :param networkName: networkName bridge name to capture the traffic from
        :type networkName: string

        :param ifaceName: ifaceName to copy (mirror) the traffic to
        :type ifaceName: string

        this commands mirror all 'networkName' traffic to 'ifaceName'
        '''
        tc.setPortMirroring(networkName, ifaceName)
Ejemplo n.º 4
0
 def testMirroringWithDistraction(self):
     "setting another mirror action should not obstract the first one"
     tc.setPortMirroring(self._bridge0.devName, self._bridge2.devName)
     self.testMirroring()
     tc.unsetPortMirroring(self._bridge0.devName, self._bridge2.devName)
Ejemplo n.º 5
0
 def testMirroringWithDistraction(self):
     "setting another mirror action should not obstract the first one"
     tc.setPortMirroring(self._bridge0.devName, self._bridge2.devName)
     self.testMirroring()
     tc.unsetPortMirroring(self._bridge0.devName, self._bridge2.devName)