def validatePort(switch, intf):
 ofport = int(switch.cmd('ovs-vsctl get Interface', intf, 'ofport'))
 if (ofport != switch.ports[intf]):
  warn('WARNING: ofport for', intf, 'is actually', ofport, '\n')
  return 0
 else:
  return 1

def validatePort ( switch , intf ) : ofport = int ( switch . cmd ( 'ovs-vsctl get Interface' , intf , 'ofport' ) ) if ( ofport != switch . ports [ intf ] ) : warn ( 'WARNING: ofport for' , intf , 'is actually' , ofport , '\n' ) return 0 else : return 1
validate intfs of port number .