just added some dummy code to execute shell commands

This commit is contained in:
Johannes Findeisen 2013-05-27 19:30:49 +02:00
commit 5acd46654f

View file

@ -3,6 +3,8 @@ This is what job_function needs as parameter for each job to succesfully
execute. execute.
""" """
import subprocess
class JobInfo: class JobInfo:
def __init__(self, hostgroupname, members, hosts, service, threshold, parent=None): def __init__(self, hostgroupname, members, hosts, service, threshold, parent=None):
@ -11,7 +13,7 @@ class JobInfo:
self.service = service self.service = service
self.threshold = threshold self.threshold = threshold
self.parent = parent self.parent = parent
self.name = hostgroupname + "_" + service.name self.name = hostgroupname + "_" + service.name + " " + self.service.command
def __str__(self): def __str__(self):
return self.name return self.name
@ -20,4 +22,7 @@ class JobInfo:
self.log = log self.log = log
def handleCall(self): def handleCall(self):
#p = subprocess.Popen("df -h", stdout=subprocess.PIPE, shell=True)
#(output, err) = p.communicate()
#print output
pass pass