def collectData(self, equipment, proxy): proxy.version = 1 # Use SNMPv1 ports = PortCollector(equipment, proxy) fdb = FdbCollector(equipment, proxy, self.config, lambda x: self.normport(x, ports)) fdb2 = QFdbCollector(equipment, proxy, self.config, lambda x: self.normport(x, ports)) arp = ArpCollector(equipment, proxy, self.config) lldp = LldpCollector(equipment, proxy, lambda x: self.normport(x, ports)) speed = LldpSpeedCollector(equipment, proxy, lambda x: self.normport(x, ports)) vlan1 = Rfc2674VlanCollector(equipment, proxy, normPort=lambda x: self.normport(x, ports)) vlan2 = IfMibVlanCollector(equipment, proxy, normPort=lambda x: self.normport(x, ports)) d = ports.collectData() d.addCallback(lambda x: fdb.collectData()) d.addCallback(lambda x: fdb2.collectData()) d.addCallback(lambda x: arp.collectData()) d.addCallback(lambda x: lldp.collectData()) d.addCallback(lambda x: speed.collectData()) d.addCallback(lambda x: vlan1.collectData()) d.addCallback(lambda x: vlan2.collectData()) return d
def collectData(self, equipment, proxy): proxy.use_getbulk = False # Some Blade have bogus GETBULK ports = PortCollector(equipment, proxy, normPort=lambda x: x%128) if self.ifDescr is not None: ports.ifDescr = self.ifDescr speed = AlteonSpeedCollector(equipment, proxy, lambda x: x%128) speed.oidDuplex = '%s.1.3.2.1.1.3' % self.baseoid speed.oidSpeed = '%s.1.3.2.1.1.2' % self.baseoid speed.oidAutoneg = '%s.1.1.2.2.1.11'% self.baseoid fdb = FdbCollector(equipment, proxy, self.config, normport=lambda x: x%128) arp = ArpCollector(equipment, proxy, self.config) lldp = LldpCollector(equipment, proxy, normport=lambda x: x%128) vlan = AlteonVlanCollector(equipment, proxy, lambda x: x%128 - 1) vlan.oidVlanNames = '%s.2.1.1.3.1.2' % self.baseoid vlan.oidVlanPorts = '%s.2.1.1.3.1.3' % self.baseoid 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: lldp.collectData()) return d
def collectData(self, equipment, proxy): proxy.use_getbulk = False # Some Blade have bogus GETBULK ports = PortCollector(equipment, proxy, normPort=lambda x: x % 128) if self.ifDescr is not None: ports.ifDescr = self.ifDescr speed = AlteonSpeedCollector(equipment, proxy, lambda x: x % 128) speed.oidDuplex = '%s.1.3.2.1.1.3' % self.baseoid speed.oidSpeed = '%s.1.3.2.1.1.2' % self.baseoid speed.oidAutoneg = '%s.1.1.2.2.1.11' % self.baseoid fdb = FdbCollector(equipment, proxy, self.config, normport=lambda x: x % 128) arp = ArpCollector(equipment, proxy, self.config) lldp = LldpCollector(equipment, proxy, normport=lambda x: x % 128) vlan = AlteonVlanCollector(equipment, proxy, lambda x: x % 128 - 1) vlan.oidVlanNames = '%s.2.1.1.3.1.2' % self.baseoid vlan.oidVlanPorts = '%s.2.1.1.3.1.3' % self.baseoid 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: lldp.collectData()) return d
def collectData(self, equipment, proxy): proxy.version = 1 # Use SNMPv1 ports = PortCollector(equipment, proxy) fdb = FdbCollector(equipment, proxy, self.config, lambda x: self.normport(x, ports)) fdb2 = QFdbCollector(equipment, proxy, self.config, lambda x: self.normport(x, ports)) arp = ArpCollector(equipment, proxy, self.config) lldp = LldpCollector(equipment, proxy, lambda x: self.normport(x, ports)) speed = LldpSpeedCollector(equipment, proxy, lambda x: self.normport(x, ports)) vlan1 = Rfc2674VlanCollector( equipment, proxy, normPort=lambda x: self.normport(x, ports)) vlan2 = IfMibVlanCollector(equipment, proxy, normPort=lambda x: self.normport(x, ports)) d = ports.collectData() d.addCallback(lambda x: fdb.collectData()) d.addCallback(lambda x: fdb2.collectData()) d.addCallback(lambda x: arp.collectData()) d.addCallback(lambda x: lldp.collectData()) d.addCallback(lambda x: speed.collectData()) d.addCallback(lambda x: vlan1.collectData()) d.addCallback(lambda x: vlan2.collectData()) return d
def collectData(self, equipment, proxy): ports = PortCollector(equipment, proxy, names="ifAlias", descrs="ifDescr") fdb = FdbCollector(equipment, proxy, self.config) arp = ArpCollector(equipment, proxy, self.config) lldp = LldpCollector(equipment, proxy) speed = LldpSpeedCollector(equipment, proxy) vlan = Rfc2674VlanCollector(equipment, proxy) d = ports.collectData() d.addCallback(lambda x: fdb.collectData()) d.addCallback(lambda x: arp.collectData()) d.addCallback(lambda x: lldp.collectData()) d.addCallback(lambda x: speed.collectData()) d.addCallback(lambda x: vlan.collectData()) return d
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
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
def collectData(self, equipment, proxy): ports = PortCollector(equipment, proxy, names="ifDescr", descrs="ifName") fdb = FdbCollector(equipment, proxy, self.config) arp = ArpCollector(equipment, proxy, self.config) edp = EdpCollector(equipment, proxy) vlan = self.vlanFactory()(equipment, proxy) # LLDP disabled due to unstability # lldp = LldpCollector(equipment, proxy) d = ports.collectData() d.addCallback(lambda x: fdb.collectData()) d.addCallback(lambda x: arp.collectData()) d.addCallback(lambda x: edp.collectData()) d.addCallback(lambda x: vlan.collectData()) # d.addCallback(lambda x: lldp.collectData()) return d
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
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
def collectData(self, equipment, proxy): t = {} trunk = TrunkCollector(equipment, proxy, t) ports = PortCollector(equipment, proxy, trunk=t) ports.ifName = ports.ifAlias fdb = FdbCollector(equipment, proxy, self.config, lambda x: self.normport(x, ports)) arp = ArpCollector(equipment, proxy, self.config) lldp = LldpCollector(equipment, proxy) speed = LldpSpeedCollector(equipment, proxy) vlan = Rfc2674VlanCollector(equipment, proxy, normPort=lambda x: self.normport(x, ports)) d = trunk.collectData() d.addCallback(lambda x: ports.collectData()) d.addCallback(lambda x: fdb.collectData()) d.addCallback(lambda x: arp.collectData()) d.addCallback(lambda x: lldp.collectData()) d.addCallback(lambda x: speed.collectData()) d.addCallback(lambda x: vlan.collectData()) return d