Changeset b175d61 in nscp
- Timestamp:
- 01/20/12 07:40:51 (16 months ago)
- Branches:
- master, 0.4.0, 0.4.1, 0.4.2
- Children:
- bd1e5e5
- Parents:
- f19371a
- Files:
-
- 2 edited
-
changelog (modified) (1 diff)
-
scripts/python/test_nsca.py (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
changelog
r2ec2eb6 rb175d61 5 5 * Fixa dependonservice LanManWorkStation (old win) 6 6 * Fix RtlStringFromGUID problem on NT4 7 8 2012-01-20 MickeM 9 * Fixed a race condition in the python unit test script 7 10 8 11 2012-01-19 MickeM -
scripts/python/test_nsca.py
rf19371a rb175d61 30 30 message = None 31 31 perfdata = None 32 got_response = False 32 33 got_simple_response = False 33 34 … … 42 43 #self.uuid = unicodedata.normalize('NFKD', command).encode('ascii','ignore') 43 44 self.command = command 45 self.uuid = None 46 self.source = None 47 self.status = None 48 self.message = None 49 self.perfdata = None 50 self.got_response = False 51 self.got_simple_response = False 52 53 54 def copy_changed_attributes(self, other): 55 if other.source: 56 self.source = other.source 57 if other.command: 58 self.command = other.command 59 if other.status: 60 self.status = other.status 61 if other.message: 62 self.message = other.message 63 if other.perfdata: 64 self.perfdata = other.perfdata 65 if other.got_simple_response: 66 self.got_simple_response = True 67 44 68 def __str__(self): 45 69 return 'Message: %s (%s, %s, %s)'%(self.uuid, self.source, self.command, self.status) … … 65 89 def set_response(self, msg): 66 90 with sync: 67 self._responses[msg.uuid] = msg91 self._responses[msg.uuid].copy_changed_attributes(msg) 68 92 69 93 def del_response(self, id): … … 95 119 96 120 def simple_inbox_handler_wrapped(self, channel, source, command, status, message, perf): 97 log('Got simple message %s '%command)121 log('Got simple message %s on %s'%(command, channel)) 98 122 msg = self.get_response(command) 99 123 msg.source = source … … 106 130 107 131 def inbox_handler_wrapped(self, channel, request): 108 log_error('DISCARDING message on %s'%(channel))109 110 132 message = plugin_pb2.SubmitRequestMessage() 111 133 message.ParseFromString(request)
Note: See TracChangeset
for help on using the changeset viewer.








