コード例 #1
0
ファイル: alteon.py プロジェクト: GennadySpb/wiremaps
 def collectData(self, equipment, proxy):
     ports = PortCollector(equipment, proxy, self.normPortName)
     ports.ifName = ports.ifDescr
     ports.ifDescr = '.1.3.6.1.2.1.2.2.1.1' # ifIndex
     speed = AlteonSpeedCollector(equipment, proxy, lambda x: x+256)
     fdb = FdbCollector(equipment, proxy, self.config)
     arp = ArpCollector(equipment, proxy, self.config)
     vlan = AlteonVlanCollector(equipment, proxy, lambda x: self.normPortIndex(x-1))
     sonmp = SonmpCollector(equipment, proxy, self.normPortIndex)
     d = ports.collectData()
     d.addCallback(lambda x: speed.collectData())
     d.addCallback(lambda x: fdb.collectData())
     d.addCallback(lambda x: arp.collectData())
     d.addCallback(lambda x: vlan.collectData())
     d.addCallback(lambda x: sonmp.collectData())
     return d
コード例 #2
0
ファイル: 5510.py プロジェクト: GennadySpb/wiremaps
 def collectData(self, equipment, proxy):
     ports = PortCollector(equipment, proxy, self.normPortName)
     speed = NortelSpeedCollector(equipment, proxy)
     fdb = FdbCollector(equipment, proxy, self.config)
     arp = ArpCollector(equipment, proxy, self.config)
     lldp = LldpCollector(equipment, proxy)
     sonmp = SonmpCollector(equipment, proxy)
     vlan = NortelVlanCollector(equipment, proxy,
                                normPort=lambda x: x-1)
     d = ports.collectData()
     d.addCallback(lambda x: speed.collectData())
     d.addCallback(lambda x: fdb.collectData())
     d.addCallback(lambda x: arp.collectData())
     d.addCallback(lambda x: lldp.collectData())
     d.addCallback(lambda x: sonmp.collectData())
     d.addCallback(lambda x: vlan.collectData())
     return d
コード例 #3
0
ファイル: passport.py プロジェクト: GennadySpb/wiremaps
 def collectData(self, equipment, proxy):
     ports = PortCollector(equipment, proxy)
     ports.ifDescr = ports.ifName
     ports.ifName = ".1.3.6.1.4.1.2272.1.4.10.1.1.35"
     speed = NortelSpeedCollector(equipment, proxy)
     mlt = MltCollector(proxy)
     fdb = PassportFdbCollector(equipment, proxy, self.config, mlt)
     arp = ArpCollector(equipment, proxy, self.config)
     sonmp = SonmpCollector(equipment, proxy, lambda x: x+63)
     vlan = NortelVlanCollector(equipment, proxy, lambda x: x-1)
     d = ports.collectData()
     d.addCallback(lambda x: speed.collectData())
     d.addCallback(lambda x: mlt.collectData())
     d.addCallback(lambda x: fdb.collectData())
     d.addCallback(lambda x: arp.collectData())
     d.addCallback(lambda x: sonmp.collectData())
     d.addCallback(lambda x: vlan.collectData())
     return d