who needs newlines...?
This commit is contained in:
parent
4a4b3a5a53
commit
ebf50a2d99
3 changed files with 4 additions and 13 deletions
|
|
@ -15,31 +15,25 @@ from service import Service
|
|||
class HttpService(Service):
|
||||
def __init__(self, parser, log, **kwargs):
|
||||
super(Service, self).__init__(parser)
|
||||
|
||||
if "string" in kwargs:
|
||||
self.string = kwargs["string"]
|
||||
else:
|
||||
log.w("There is no string set to match")
|
||||
raise
|
||||
|
||||
if "method" in kwargs:
|
||||
self.method = kwargs["method"]
|
||||
else:
|
||||
self.method = "get"
|
||||
|
||||
if "params" in kwargs:
|
||||
self.params = kwargs["params"]
|
||||
|
||||
if "path" in kwargs:
|
||||
self.path = kwargs["path"]
|
||||
else:
|
||||
self.path = "/"
|
||||
|
||||
if "port" in kwargs:
|
||||
self.port = kwargs["port"]
|
||||
else:
|
||||
self.port = "80"
|
||||
|
||||
if "protocol" in kwargs:
|
||||
self.protocol = kwargs["protocol"]
|
||||
else:
|
||||
|
|
|
|||
|
|
@ -7,20 +7,18 @@ from service import Service
|
|||
|
||||
|
||||
class SnmpgetService(Service):
|
||||
def __init__(self, **kwargs):
|
||||
|
||||
def __init__(self, parser, log, **kwargs):
|
||||
super(Service, self).__init__(parser)
|
||||
if "community" in kwargs:
|
||||
self.community = kwargs["community"]
|
||||
else:
|
||||
#log.w("There is no community")
|
||||
log.w("There is no community")
|
||||
raise
|
||||
|
||||
if "oid" in kwargs:
|
||||
self.oid = kwargs["oid"]
|
||||
else:
|
||||
#log.w("There is no oid")
|
||||
log.w("There is no oid")
|
||||
raise
|
||||
|
||||
if "port" in kwargs:
|
||||
self.port = kwargs["port"]
|
||||
else:
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ from service import Service
|
|||
class TcpconnectService(Service):
|
||||
def __init__(self, parser, log, **kwargs):
|
||||
super(Service, self).__init__(parser)
|
||||
|
||||
if "port" in kwargs:
|
||||
self.port = kwargs["port"]
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue