added some testing code to the snmpget builtin and renamed service to services/
This commit is contained in:
parent
d48c7957f8
commit
4b0238c515
8 changed files with 58 additions and 0 deletions
17
lib/services/shell.py
Normal file
17
lib/services/shell.py
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
"""
|
||||
The shell service. This is for executing local shell commands and retrieve the output.
|
||||
"""
|
||||
|
||||
from service import Service
|
||||
|
||||
|
||||
class ShellService(Service):
|
||||
def __init__(self, parser, log, **kwargs):
|
||||
super(Service, self).__init__(parser)
|
||||
if "command" in kwargs:
|
||||
self.command = kwargs["command"]
|
||||
else:
|
||||
log.w("There is no command")
|
||||
|
||||
def execute(self):
|
||||
self.command.call()
|
||||
Loading…
Add table
Add a link
Reference in a new issue