change service
This commit is contained in:
parent
2a400b9f4d
commit
360e1d68d0
1 changed files with 9 additions and 6 deletions
|
|
@ -107,11 +107,14 @@ class Service(object):
|
|||
|
||||
def _execute(self):
|
||||
self.pre_execute()
|
||||
executionResult = self.execute()
|
||||
parseResult = self.parse_result(executionResult)
|
||||
result = {}
|
||||
for host in self.get_hostgroup().get_hosts():
|
||||
result[host] = self.execute(host)
|
||||
|
||||
parseResult = self.parse_result(result)
|
||||
self.handle_result(parseResult)
|
||||
|
||||
def execute(self):
|
||||
def execute(self, host):
|
||||
pass
|
||||
|
||||
def pre_execute(self):
|
||||
|
|
@ -120,7 +123,7 @@ class Service(object):
|
|||
def parse_result(self, executionResult):
|
||||
result = []
|
||||
for parser in self.get_parser():
|
||||
result.append(self._parser._parse(executionResult))
|
||||
result.append(parser.parse(executionResult))
|
||||
|
||||
def handle_result(self, parseResult):
|
||||
pass
|
||||
Loading…
Add table
Add a link
Reference in a new issue