added some testing code to the snmpget builtin and renamed service to services/
This commit is contained in:
parent
71c76d665c
commit
ee687e3f68
8 changed files with 58 additions and 0 deletions
24
lib/services/service.py
Normal file
24
lib/services/service.py
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
class Service:
|
||||
def __init__(self, host, parser):
|
||||
self.host = host
|
||||
self.parser = parser
|
||||
self.errorcode = 0
|
||||
self.errormessage = "No Error!"
|
||||
|
||||
def _execute(self):
|
||||
self.pre_execute()
|
||||
executionResult = self.execute()
|
||||
parseResult = self.parse_result(executionResult)
|
||||
self.handle_result(parseResult)
|
||||
|
||||
def execute(self):
|
||||
pass
|
||||
|
||||
def pre_execute(self):
|
||||
pass
|
||||
|
||||
def parse_result(self, executionResult):
|
||||
return self.parser._parse(executionResult)
|
||||
|
||||
def handle_result(self, parseResult):
|
||||
pass
|
||||
Loading…
Add table
Add a link
Reference in a new issue