summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Burke <tim.burke@gmail.com>2021-10-25 22:32:05 -0700
committerTim Burke <tim.burke@gmail.com>2022-04-05 12:07:37 -0700
commit4c5dc672d9ad6cbff320bdd3f5a0ae72fe295e87 (patch)
tree31258714cc71ad789841656702888d379b482871
parent067d227426c7bf51c496e77c0922838dbc06db72 (diff)
downloadpyeclib-4c5dc672d9ad6cbff320bdd3f5a0ae72fe295e87.tar.gz
Deprecate Jerasure support
It's been on its last legs ever since it got pulled from UTK and bitbucket. See also: the notice at http://web.eecs.utk.edu/~jplank/plank/www/software.html Change-Id: I28e050a52a2dcf738b1ce7edcfdc3fd78172d025
-rw-r--r--pyeclib/ec_iface.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/pyeclib/ec_iface.py b/pyeclib/ec_iface.py
index bd69861..fa50249 100644
--- a/pyeclib/ec_iface.py
+++ b/pyeclib/ec_iface.py
@@ -28,6 +28,8 @@ from .utils import create_instance
from .utils import positive_int_value
from pyeclib_c import get_liberasurecode_version
+import warnings
+
import logging
from logging.handlers import SysLogHandler
logger = logging.getLogger('pyeclib')
@@ -198,8 +200,15 @@ class ECDriver(object):
value = "flat_xor_hd"
elif value == "libphazr":
self.hd = 1
+
if PyECLib_EC_Types.has_enum(value):
self.ec_type = PyECLib_EC_Types.get_by_name(value)
+ if self.ec_type in (PyECLib_EC_Types.jerasure_rs_vand,
+ PyECLib_EC_Types.jerasure_rs_cauchy):
+ warnings.warn('Jerasure support is deprecated and '
+ 'may be removed in a future release',
+ FutureWarning, stacklevel=2)
+
else:
raise ECBackendNotSupported(
"%s is not a valid EC type for PyECLib!" % value)