def collectData(self, equipment, proxy): t = {} parents = JuniperStackCollector(equipment, proxy) trunk = TrunkCollector(equipment, proxy, t) ports = PortCollector(equipment, proxy, trunk=t, normTrunk=lambda x: self.normport(x, None, parents, t), names="ifAlias", descrs="ifName") arp = ArpCollector(equipment, proxy, self.config) lldp = LldpCollector(equipment, proxy, lambda x: self.normport(x, ports, parents, t)) speed = LldpSpeedCollector(equipment, proxy, lambda x: self.normport(x, ports, parents, t)) fdb = JuniperFdbCollector(equipment, proxy, self.config, lambda x: self.normport(x, ports, parents, t)) vlan = JuniperVlanCollector(equipment, proxy, lambda x: self.normport(x, ports, parents, t)) d = trunk.collectData() d.addCallback(lambda x: parents.collectData()) d.addCallback(lambda x: ports.collectData()) d.addCallback(lambda x: vlan.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()) return d
def collectData(self, equipment, proxy): t = {} parents = JuniperStackCollector(equipment, proxy) trunk = TrunkCollector(equipment, proxy, t) ports = PortCollector( equipment, proxy, trunk=t, normTrunk=lambda x: self.normport(x, None, parents, t), names="ifAlias", descrs="ifName") arp = ArpCollector(equipment, proxy, self.config) lldp = LldpCollector(equipment, proxy, lambda x: self.normport(x, ports, parents, t)) speed = LldpSpeedCollector( equipment, proxy, lambda x: self.normport(x, ports, parents, t)) fdb = JuniperFdbCollector( equipment, proxy, self.config, lambda x: self.normport(x, ports, parents, t)) vlan = JuniperVlanCollector( equipment, proxy, lambda x: self.normport(x, ports, parents, t)) d = trunk.collectData() d.addCallback(lambda x: parents.collectData()) d.addCallback(lambda x: ports.collectData()) d.addCallback(lambda x: vlan.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()) 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