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
This commit is contained in:
Tim Burke 2021-10-25 22:32:05 -07:00
parent 067d227426
commit 4c5dc672d9
1 changed files with 9 additions and 0 deletions

View File

@ -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)