added python
This commit is contained in:
parent
5f382da83b
commit
863ea67d06
2 changed files with 11 additions and 5 deletions
|
|
@ -16,7 +16,7 @@ VERSION = "0.1"
|
||||||
class LishFrontend(Frontend):
|
class LishFrontend(Frontend):
|
||||||
def __init__(self, **kwargs):
|
def __init__(self, **kwargs):
|
||||||
|
|
||||||
print(kwargs)
|
#print(kwargs)
|
||||||
#self.jobs = kwargs["jobs"]
|
#self.jobs = kwargs["jobs"]
|
||||||
|
|
||||||
commander = LishCommander(kwargs)
|
commander = LishCommander(kwargs)
|
||||||
|
|
@ -150,6 +150,16 @@ class LishCommander(Exit, ShellCommander, LogCommander):
|
||||||
except KeyboardInterrupt, ke:
|
except KeyboardInterrupt, ke:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
def do_python(self, text):
|
||||||
|
exec text
|
||||||
|
|
||||||
|
def help_python(self):
|
||||||
|
print '''
|
||||||
|
executes python using 'exec'.
|
||||||
|
'''
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def help_hostgroup(self):
|
def help_hostgroup(self):
|
||||||
print '''
|
print '''
|
||||||
|
|
|
||||||
|
|
@ -62,8 +62,6 @@ def main():
|
||||||
scheduler.start()
|
scheduler.start()
|
||||||
jobs = []
|
jobs = []
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
for layout in linConf.get_enabled_layouts():
|
for layout in linConf.get_enabled_layouts():
|
||||||
for hostgroup in layout.get_hostgroups():
|
for hostgroup in layout.get_hostgroups():
|
||||||
for service in hostgroup.get_services():
|
for service in hostgroup.get_services():
|
||||||
|
|
@ -81,8 +79,6 @@ def main():
|
||||||
log.d("shutting down scheduler")
|
log.d("shutting down scheduler")
|
||||||
scheduler.shutdown(wait=False)
|
scheduler.shutdown(wait=False)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
elif args.action == "stop":
|
elif args.action == "stop":
|
||||||
log.i("stopping linspector is currently unsupported")
|
log.i("stopping linspector is currently unsupported")
|
||||||
elif args.action == "restart":
|
elif args.action == "restart":
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue