nice to play with ruffs Lish! that will be more fun in the future....
This commit is contained in:
parent
4193058957
commit
9248be5ac0
1 changed files with 10 additions and 2 deletions
|
|
@ -93,12 +93,20 @@ class Exit(Cmd, object):
|
||||||
help_EOF = help_exit
|
help_EOF = help_exit
|
||||||
|
|
||||||
|
|
||||||
|
class LogCommander(Cmd, object):
|
||||||
|
def do_log(self, text):
|
||||||
|
print("executed %s" % text)
|
||||||
|
|
||||||
|
def help_log(self):
|
||||||
|
print("manage logging")
|
||||||
|
|
||||||
|
|
||||||
class ShellCommander(Cmd, object):
|
class ShellCommander(Cmd, object):
|
||||||
def do_shell(self, text):
|
def do_shell(self, text):
|
||||||
os.system(text)
|
os.system(text)
|
||||||
|
|
||||||
def help_shell(self):
|
def help_shell(self):
|
||||||
print("execute any shell command. Can also be archieved by a '!' postfix")
|
print("execute any shell command. Can also be achieved by a '!' postfix")
|
||||||
|
|
||||||
|
|
||||||
class HostgroupCommander(Exit, object):
|
class HostgroupCommander(Exit, object):
|
||||||
|
|
@ -117,7 +125,7 @@ class HostgroupCommander(Exit, object):
|
||||||
print("gives you control over a member of the hostgroup")
|
print("gives you control over a member of the hostgroup")
|
||||||
|
|
||||||
|
|
||||||
class LishCommander(Exit, ShellCommander):
|
class LishCommander(Exit, ShellCommander, LogCommander):
|
||||||
|
|
||||||
def __init__(self, kwargs):
|
def __init__(self, kwargs):
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue