예제 #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
예제 #5
0
 def create_result_data(self):
     """Create result data"""
     result_data = KeyValuesResult.create_result_data(self)
     return SysloggedResult.SyslogData(result_data, self._syslog_address,
                                       self._syslog_host, self._syslog_port,
                                       self._syslog_fmt_string)
예제 #6
0
파일: table.py 프로젝트: chanokin/my_jube
 def create_result_data(self, style):
     """Create result data"""
     result_data = KeyValuesResult.create_result_data(self)
     return Table.TableData(result_data,
                            style if style is not None else self._style,
                            self._separator, self._transpose)
예제 #7
0
파일: table.py 프로젝트: edf-hpc/jube
 def create_result_data(self):
     """Create result data"""
     result_data = KeyValuesResult.create_result_data(self)
     return Table.TableData(result_data, self._style, self._separator,
                            self._transpose)
예제 #8
0
파일: syslog.py 프로젝트: edf-hpc/jube
 def create_result_data(self):
     """Create result data"""
     result_data = KeyValuesResult.create_result_data(self)
     return SysloggedResult.SyslogData(result_data, self._syslog_address,
                                       self._syslog_host, self._syslog_port,
                                       self._syslog_fmt_string)