just added some dummy code to execute shell commands
This commit is contained in:
parent
3bb622006f
commit
5acd46654f
1 changed files with 6 additions and 1 deletions
|
|
@ -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
|
||||||
Loading…
Add table
Add a link
Reference in a new issue