示例#1
0
 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
示例#2
0
 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
示例#3
0
 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
示例#4
0
 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