From 87cce1817d03daca8c31be82d781ec47a4560087 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 16 Mar 2019 08:50:45 +0100 Subject: Merging upstream version 1.13.0. Signed-off-by: Daniel Baumann --- .../python_modules/bases/collection.py | 61 ---------------------- 1 file changed, 61 deletions(-) (limited to 'collectors/python.d.plugin/python_modules/bases/collection.py') diff --git a/collectors/python.d.plugin/python_modules/bases/collection.py b/collectors/python.d.plugin/python_modules/bases/collection.py index 479a3b610..7a3390bc6 100644 --- a/collectors/python.d.plugin/python_modules/bases/collection.py +++ b/collectors/python.d.plugin/python_modules/bases/collection.py @@ -82,64 +82,3 @@ def read_last_line(f): break result = opened.readline() return result.decode() - - -class OldVersionCompatibility: - - def __init__(self): - self._data_stream = str() - - def begin(self, type_id, microseconds=0): - """ - :param type_id: - :param microseconds: or : must be a digit - :return: - """ - self._data_stream += CHART_BEGIN.format(type_id, microseconds) - - def set(self, dim_id, value): - """ - :param dim_id: - :param value: or : must be a digit - :return: - """ - self._data_stream += DIMENSION_SET.format(dim_id, value) - - def end(self): - self._data_stream += 'END\n' - - def chart(self, type_id, name='', title='', units='', family='', category='', chart_type='line', - priority='', update_every=''): - """ - :param type_id: - :param name: - :param title: - :param units: - :param family: - :param category: - :param chart_type: - :param priority: or - :param update_every: or - :return: - """ - self._data_stream += CHART_CREATE.format(type_id, name, title, units, - family, category, chart_type, - priority, update_every) - - def dimension(self, dim_id, name=None, algorithm="absolute", multiplier=1, divisor=1, hidden=False): - """ - :param dim_id: - :param name: or None - :param algorithm: - :param multiplier: or : must be a digit - :param divisor: or : must be a digit - :param hidden: : literally "hidden" or "" - :return: - """ - self._data_stream += DIMENSION_CREATE.format(dim_id, name or dim_id, algorithm, - multiplier, divisor, hidden or str()) - - @on_try_except_finally(on_except=(exit, 1)) - def commit(self): - print(self._data_stream) - self._data_stream = str() -- cgit v1.2.3