Ejemplo n.º 1
0
 def test_exporter_v1(self):
     import _test_lib
     log = _test_lib.trap_log_factory()
     exporter = _test_lib.trap_exporter_factory(parent=log)
     log.start()
     self.assert_comparison("tuple(self.msglog_object[:])", "==", "()")
     version='1'
     context_engine_id='bogus-id'
     context_name='bogus-context'
     address='192.168.1.1'
     sysUpTime='1 day 03:04:05.06'
     trap='Test-MIB::logTestTrap'
     trap_enterprise='Test-MIB::RZ'
     varBinds=(('Test-MIB::Payload', 0),)
     logtime=time.time()
     log.log_trap(version, context_engine_id, context_name, address,
                  sysUpTime, trap,
                  trap_enterprise,
                  varBinds,
                  logtime)
     from mpx.lib import pause
     pause(1)
     log.stop()
     self.assert_comparison("tuple(self.msglog_object[:])", "==", "()")
     return
Ejemplo n.º 2
0
 def test_exporter_v1(self):
     import _test_lib
     log = _test_lib.trap_log_factory()
     exporter = _test_lib.trap_exporter_factory(parent=log)
     log.start()
     self.assert_comparison("tuple(self.msglog_object[:])", "==", "()")
     version = '1'
     context_engine_id = 'bogus-id'
     context_name = 'bogus-context'
     address = '192.168.1.1'
     sysUpTime = '1 day 03:04:05.06'
     trap = 'Test-MIB::logTestTrap'
     trap_enterprise = 'Test-MIB::RZ'
     varBinds = (('Test-MIB::Payload', 0), )
     logtime = time.time()
     log.log_trap(version, context_engine_id, context_name, address,
                  sysUpTime, trap, trap_enterprise, varBinds, logtime)
     from mpx.lib import pause
     pause(1)
     log.stop()
     self.assert_comparison("tuple(self.msglog_object[:])", "==", "()")
     return
Ejemplo n.º 3
0
 def test_log(self):
     import _test_lib
     log = _test_lib.trap_log_factory()
     log.start()
     log.stop()
     return
Ejemplo n.º 4
0
 def test_log(self):
     import _test_lib
     log = _test_lib.trap_log_factory()
     log.start()
     log.stop()
     return