示例#1
0
 def __init__(self,
              name,
              syslog_address=None,
              syslog_host=None,
              syslog_port=None,
              syslog_fmt_string=None,
              sort_names=None,
              res_filter=None):
     KeyValuesResult.__init__(self, name, sort_names, res_filter)
     if (syslog_address is None) and (syslog_host is None) and \
             (syslog_port is None):
         raise IOError("Neither a syslog address nor a hostname port " +
                       "combination specified.")
     if (syslog_host is not None) and (syslog_address is not None):
         raise IOError("Please specify a syslog address or a hostname, " +
                       "not both at the same time.")
     if (syslog_host is not None) and (syslog_port is None):
         self._syslog_port = 514
     self._syslog_address = syslog_address
     self._syslog_host = syslog_host
     self._syslog_port = syslog_port
     if syslog_fmt_string is None:
         self._syslog_fmt_string = jube2.conf.SYSLOG_FMT_STRING
     else:
         self._syslog_fmt_string = syslog_fmt_string
示例#2
0
文件: table.py 项目: edf-hpc/jube
 def __init__(self, name, style="csv",
              separator=jube2.conf.DEFAULT_SEPARATOR,
              sort_names=None,
              transpose=False):
     KeyValuesResult.__init__(self, name, sort_names)
     self._style = style
     self._separator = separator
     self._transpose = transpose
示例#3
0
文件: table.py 项目: chanokin/my_jube
 def __init__(self,
              name,
              style="csv",
              separator=jube2.conf.DEFAULT_SEPARATOR,
              sort_names=None,
              transpose=False,
              res_filter=None):
     KeyValuesResult.__init__(self, name, sort_names, res_filter)
     self._style = style
     self._separator = separator
     self._transpose = transpose
示例#4
0
文件: syslog.py 项目: edf-hpc/jube
 def __init__(self, name, syslog_address=None, syslog_host=None,
              syslog_port=None, syslog_fmt_string=None, sort_names=None):
     KeyValuesResult.__init__(self, name, sort_names)
     if (syslog_address is None) and (syslog_host is None) and \
             (syslog_port is None):
         raise IOError("Neither a syslog address nor a hostname port " +
                       "combination specified.")
     if (syslog_host is not None) and (syslog_address is not None):
         raise IOError("Please specify a syslog address or a hostname, " +
                       "not both at the same time.")
     if (syslog_host is not None) and (syslog_port is None):
         self._syslog_port = 514
     self._syslog_address = syslog_address
     self._syslog_host = syslog_host
     self._syslog_port = syslog_port
     if syslog_fmt_string is None:
         self._syslog_fmt_string = jube2.conf.SYSLOG_FMT_STRING
     else:
         self._syslog_fmt_string = syslog_fmt_string