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):
|
class HttpService(Service):
|
||||||
def __init__(self, parser, log, **kwargs):
|
def __init__(self, parser, log, **kwargs):
|
||||||
super(Service, self).__init__(parser)
|
super(Service, self).__init__(parser)
|
||||||
|
|
||||||
if "string" in kwargs:
|
if "string" in kwargs:
|
||||||
self.string = kwargs["string"]
|
self.string = kwargs["string"]
|
||||||
else:
|
else:
|
||||||
log.w("There is no string set to match")
|
log.w("There is no string set to match")
|
||||||
raise
|
raise
|
||||||
|
|
||||||
if "method" in kwargs:
|
if "method" in kwargs:
|
||||||
self.method = kwargs["method"]
|
self.method = kwargs["method"]
|
||||||
else:
|
else:
|
||||||
self.method = "get"
|
self.method = "get"
|
||||||
|
|
||||||
if "params" in kwargs:
|
if "params" in kwargs:
|
||||||
self.params = kwargs["params"]
|
self.params = kwargs["params"]
|
||||||
|
|
||||||
if "path" in kwargs:
|
if "path" in kwargs:
|
||||||
self.path = kwargs["path"]
|
self.path = kwargs["path"]
|
||||||
else:
|
else:
|
||||||
self.path = "/"
|
self.path = "/"
|
||||||
|
|
||||||
if "port" in kwargs:
|
if "port" in kwargs:
|
||||||
self.port = kwargs["port"]
|
self.port = kwargs["port"]
|
||||||
else:
|
else:
|
||||||
self.port = "80"
|
self.port = "80"
|
||||||
|
|
||||||
if "protocol" in kwargs:
|
if "protocol" in kwargs:
|
||||||
self.protocol = kwargs["protocol"]
|
self.protocol = kwargs["protocol"]
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
|
|
@ -7,20 +7,18 @@ from service import Service
|
||||||
|
|
||||||
|
|
||||||
class SnmpgetService(Service):
|
class SnmpgetService(Service):
|
||||||
def __init__(self, **kwargs):
|
def __init__(self, parser, log, **kwargs):
|
||||||
|
super(Service, self).__init__(parser)
|
||||||
if "community" in kwargs:
|
if "community" in kwargs:
|
||||||
self.community = kwargs["community"]
|
self.community = kwargs["community"]
|
||||||
else:
|
else:
|
||||||
#log.w("There is no community")
|
log.w("There is no community")
|
||||||
raise
|
raise
|
||||||
|
|
||||||
if "oid" in kwargs:
|
if "oid" in kwargs:
|
||||||
self.oid = kwargs["oid"]
|
self.oid = kwargs["oid"]
|
||||||
else:
|
else:
|
||||||
#log.w("There is no oid")
|
log.w("There is no oid")
|
||||||
raise
|
raise
|
||||||
|
|
||||||
if "port" in kwargs:
|
if "port" in kwargs:
|
||||||
self.port = kwargs["port"]
|
self.port = kwargs["port"]
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@ from service import Service
|
||||||
class TcpconnectService(Service):
|
class TcpconnectService(Service):
|
||||||
def __init__(self, parser, log, **kwargs):
|
def __init__(self, parser, log, **kwargs):
|
||||||
super(Service, self).__init__(parser)
|
super(Service, self).__init__(parser)
|
||||||
|
|
||||||
if "port" in kwargs:
|
if "port" in kwargs:
|
||||||
self.port = kwargs["port"]
|
self.port = kwargs["port"]
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue