'verify consistency between mininet and ovs ports'

@unittest.skipIf((OVSSwitch.setup() or OVSSwitch.isOldOVS()), 'old    version    of    OVS')
def testConsistency(self):

    p = pexpect.spawn('python    -m    mininet.examples.numberedports')
    opts = ['Validating    that    s1-eth\\d    is    actually    on    port    \\d    ...    Validated.', 'Validating    that    s1-eth\\d    is    actually    on    port    \\d    ...    WARNING', pexpect.EOF]
    correct_ports = True
    count = 0
    while True:
        index = p.expect(opts)
        if (index == 0):
            count += 1
        elif (index == 1):
            correct_ports = False
        elif (index == 2):
            self.assertNotEqual(0, count)
            break
    self.assertTrue(correct_ports)
