Example #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
Example #2
0
    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
Example #3
0
 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
Example #4
0
 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
Example #5
0
 def collectData(self, equipment, proxy):
     # On Cisco, ifName is more revelant than ifDescr, especially
     # on Catalyst switches. This is absolutely not the case for a CSS.
     t = {}
     trunk = CiscoTrunkCollector(equipment, proxy, t)
     if self.css:
         ports = PortCollector(equipment, proxy, trunk=t)
     else:
         ports = PortCollector(equipment,
                               proxy,
                               trunk=t,
                               names="ifDescr",
                               descrs="ifName")
         ports.ifDescr = ports.ifAlias
     fdb = CiscoFdbCollector(equipment, proxy, self.config)
     arp = ArpCollector(equipment, proxy, self.config)
     cdp = CdpCollector(equipment, proxy)
     lldp = LldpCollector(equipment, proxy)
     vlan = CiscoVlanCollector(equipment, proxy, ports)
     d = trunk.collectData()
     d.addCallback(lambda x: ports.collectData())
     d.addCallback(lambda x: arp.collectData())
     d.addCallback(lambda x: fdb.collectData())
     d.addCallback(lambda x: cdp.collectData())
     d.addCallback(lambda x: lldp.collectData())
     d.addCallback(lambda x: vlan.collectData())
     return d
Example #6
0
    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
Example #7
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
Example #8
0
 def collectData(self, equipment, proxy):
     name = NameCollector(equipment, proxy)
     ports = PortCollector(equipment, proxy)
     arp = ArpCollector(equipment, proxy, self.config)
     d = name.collectData()
     d.addCallback(lambda x: ports.collectData())
     d.addCallback(lambda x: arp.collectData())
     return d
Example #9
0
 def collectData(self, equipment, proxy):
     name = NameCollector(equipment, proxy)
     ports = PortCollector(equipment, proxy)
     arp = ArpCollector(equipment, proxy, self.config)
     d = name.collectData()
     d.addCallback(lambda x: ports.collectData())
     d.addCallback(lambda x: arp.collectData())
     return d
Example #10
0
 def collectData(self, equipment, proxy):
     proxy.version = 1  # Use SNMPv1
     ports = PortCollector(equipment, proxy, self.normPortName)
     fdb = SuperStackFdbCollector(equipment, proxy, self.config)
     arp = ArpCollector(equipment, proxy, self.config)
     vlan = SuperStackVlanCollector(equipment, proxy)
     d = ports.collectData()
     d.addCallback(lambda x: fdb.collectData())
     d.addCallback(lambda x: arp.collectData())
     d.addCallback(lambda x: vlan.collectData())
     return d
Example #11
0
 def collectData(self, equipment, proxy):
     proxy.version = 1       # Use SNMPv1
     ports = PortCollector(equipment, proxy, self.normPortName)
     fdb = SuperStackFdbCollector(equipment, proxy, self.config)
     arp = ArpCollector(equipment, proxy, self.config)
     vlan = SuperStackVlanCollector(equipment, proxy)
     d = ports.collectData()
     d.addCallback(lambda x: fdb.collectData())
     d.addCallback(lambda x: arp.collectData())
     d.addCallback(lambda x: vlan.collectData())
     return d
Example #12
0
 def collectData(self, equipment, proxy):
     ports = PortCollector(equipment, proxy)
     arp = ArpCollector(equipment, proxy, self.config)
     lldp = LldpCollector(equipment, proxy)
     speed = LldpSpeedCollector(equipment, proxy)
     d = ports.collectData()
     d.addCallback(lambda x: arp.collectData())
     d.addCallback(lambda x: lldp.collectData())
     d.addCallback(lambda x: speed.collectData())
     d.addCallback(lambda x: lldp.cleanPorts())
     return d
Example #13
0
 def collectData(self, equipment, proxy):
     ports = PortCollector(equipment, proxy)
     arp = ArpCollector(equipment, proxy, self.config)
     lldp = LldpCollector(equipment, proxy)
     speed = LldpSpeedCollector(equipment, proxy)
     d = ports.collectData()
     d.addCallback(lambda x: arp.collectData())
     d.addCallback(lambda x: lldp.collectData())
     d.addCallback(lambda x: speed.collectData())
     d.addCallback(lambda x: lldp.cleanPorts())
     return d
Example #14
0
 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
Example #15
0
 def collectData(self, equipment, proxy):
     ports = PortCollector(equipment, proxy,
                           names="ifDescr", descrs="ifName")
     vlan = ExtremeVlanCollector(equipment, proxy)
     fdb = ExtremeFdbCollector(vlan, equipment, proxy, self.config)
     arp = ArpCollector(equipment, proxy, self.config)
     edp = EdpCollector(equipment, proxy)
     # LLDP disabled due to unstability
     # lldp = LldpCollector(equipment, proxy)
     d = ports.collectData()
     d.addCallback(lambda x: vlan.collectData())
     d.addCallback(lambda x: fdb.collectData())
     d.addCallback(lambda x: arp.collectData())
     d.addCallback(lambda x: edp.collectData())
     # d.addCallback(lambda x: lldp.collectData())
     return d
Example #16
0
 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
Example #17
0
 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
Example #18
0
 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
Example #19
0
 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
Example #20
0
 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
Example #21
0
 def collectData(self, equipment, proxy):
     ports = PortCollector(equipment,
                           proxy,
                           names="ifDescr",
                           descrs="ifName")
     vlan = ExtremeVlanCollector(equipment, proxy)
     fdb = ExtremeFdbCollector(vlan, equipment, proxy, self.config)
     arp = ArpCollector(equipment, proxy, self.config)
     edp = EdpCollector(equipment, proxy)
     # LLDP disabled due to unstability
     # lldp = LldpCollector(equipment, proxy)
     d = ports.collectData()
     d.addCallback(lambda x: vlan.collectData())
     d.addCallback(lambda x: fdb.collectData())
     d.addCallback(lambda x: arp.collectData())
     d.addCallback(lambda x: edp.collectData())
     # d.addCallback(lambda x: lldp.collectData())
     return d
Example #22
0
 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
Example #23
0
 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
Example #24
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
Example #25
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
Example #26
0
 def collectData(self, equipment, proxy):
     # On Cisco, ifName is more revelant than ifDescr, especially
     # on Catalyst switches. This is absolutely not the case for a CSS.
     t = {}
     trunk = CiscoTrunkCollector(equipment, proxy, t)
     if self.css:
         ports = PortCollector(equipment, proxy, trunk=t)
     else:
         ports = PortCollector(equipment, proxy, trunk=t,
                               names="ifDescr", descrs="ifName")
         ports.ifDescr = ports.ifAlias
     fdb = CiscoFdbCollector(equipment, proxy, self.config)
     arp = ArpCollector(equipment, proxy, self.config)
     cdp = CdpCollector(equipment, proxy)
     vlan = CiscoVlanCollector(equipment, proxy, ports)
     d = trunk.collectData()
     d.addCallback(lambda x: ports.collectData())
     d.addCallback(lambda x: arp.collectData())
     d.addCallback(lambda x: fdb.collectData())
     d.addCallback(lambda x: cdp.collectData())
     d.addCallback(lambda x: vlan.collectData())
     return d
Example #27
0
 def collectData(self, equipment, proxy):
     ports = PortCollector(equipment, proxy, self.normPortName)
     arp = ArpCollector(equipment, proxy, self.config)
     d = ports.collectData()
     d.addCallback(lambda x: arp.collectData())
     return d