The are no longer supported in LIO kernel code. Signed-off-by: Andy Grover <agrover@xxxxxxxxxx> --- targetcli/ui_backstore.py | 45 +------------------------------------ targetcli/ui_backstore_legacy.py | 39 +------------------------------- 2 files changed, 4 insertions(+), 80 deletions(-) diff --git a/targetcli/ui_backstore.py b/targetcli/ui_backstore.py index 2febf9f..664171f 100644 --- a/targetcli/ui_backstore.py +++ b/targetcli/ui_backstore.py @@ -20,9 +20,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. from ui_node import UINode, UIRTSLibNode from rtslib import RTSRoot from rtslib import FileIOBackstore, IBlockBackstore -from rtslib import PSCSIBackstore, RDDRBackstore, RDMCPBackstore +from rtslib import PSCSIBackstore, RDMCPBackstore from rtslib import FileIOStorageObject, IBlockStorageObject -from rtslib import PSCSIStorageObject, RDDRStorageObject, RDMCPStorageObject +from rtslib import PSCSIStorageObject, RDMCPStorageObject from rtslib.utils import get_block_type, is_disk_partition from configshell import ExecutionError @@ -52,7 +52,6 @@ class UIBackstores(UINode): def refresh(self): self._children = set([]) UIPSCSIBackstore(self) - UIRDDRBackstore(self) UIRDMCPBackstore(self) UIFileIOBackstore(self) UIIBlockBackstore(self) @@ -205,46 +204,6 @@ class UIPSCSIBackstore(UIBackstore): return self.new_node(ui_so) -class UIRDDRBackstore(UIBackstore): - ''' - RDDR backstore UI. - ''' - def __init__(self, parent): - UIBackstore.__init__(self, 'rd_dr', parent) - - def ui_command_create(self, name, size, generate_wwn=None): - ''' - Creates an RDDR storage object. I{size} is the size of the ramdisk, and - the optional I{generate_wwn} parameter is a boolean specifying whether - or not we should generate a T10 wwn serial for the unit (by default, - yes). - - SIZE SYNTAX - =========== - - If size is an int, it represents a number of bytes. - - If size is a string, the following units can be used: - - B{B} or no unit present for bytes - - B{k}, B{K}, B{kB}, B{KB} for kB (kilobytes) - - B{m}, B{M}, B{mB}, B{MB} for MB (megabytes) - - B{g}, B{G}, B{gB}, B{GB} for GB (gigabytes) - - B{t}, B{T}, B{tB}, B{TB} for TB (terabytes) - ''' - self.assert_root() - self.assert_available_so_name(name) - backstore = RDDRBackstore(self.next_hba_index(), mode='create') - try: - so = RDDRStorageObject(backstore, name, size, - self.prm_gen_wwn(generate_wwn)) - - except Exception, exception: - backstore.delete() - raise exception - ui_so = UIStorageObject(so, self) - self.shell.log.info("Created rd_dr ramdisk %s with size %s." - % (name, size)) - return self.new_node(ui_so) - - class UIRDMCPBackstore(UIBackstore): ''' RDMCP backstore UI. diff --git a/targetcli/ui_backstore_legacy.py b/targetcli/ui_backstore_legacy.py index 7b91b28..f9ef9f7 100644 --- a/targetcli/ui_backstore_legacy.py +++ b/targetcli/ui_backstore_legacy.py @@ -10,9 +10,9 @@ Implements the targetcli backstores related UI. from ui_node import UINode, UIRTSLibNode from rtslib import RTSRoot from rtslib import FileIOBackstore, IBlockBackstore -from rtslib import PSCSIBackstore, RDDRBackstore, RDMCPBackstore +from rtslib import PSCSIBackstore, RDMCPBackstore from rtslib import FileIOStorageObject, IBlockStorageObject -from rtslib import PSCSIStorageObject, RDDRStorageObject, RDMCPStorageObject +from rtslib import PSCSIStorageObject, RDMCPStorageObject from rtslib.utils import get_block_type, is_disk_partition class UIBackstoresLegacy(UINode): @@ -30,8 +30,6 @@ class UIBackstoresLegacy(UINode): backstore_plugin = backstore.plugin if backstore_plugin == 'pscsi': UIPSCSIBackstoreLegacy(backstore, self) - elif backstore_plugin == 'rd_dr': - UIRDDRBackstoreLegacy(backstore, self) elif backstore_plugin == 'rd_mcp': UIRDMCPBackstoreLegacy(backstore, self) elif backstore_plugin == 'fileio': @@ -124,9 +122,6 @@ class UIBackstoresLegacy(UINode): if backstore_plugin == 'pscsi': backstore = PSCSIBackstore(backstore_index, mode='create') return self.new_node(UIPSCSIBackstoreLegacy(backstore, self)) - elif backstore_plugin == 'rd_dr': - backstore = RDDRBackstore(backstore_index, mode='create') - return self.new_node(UIRDDRBackstoreLegacy(backstore, self)) elif backstore_plugin == 'rd_mcp': backstore = RDMCPBackstore(backstore_index, mode='create') return self.new_node(UIRDMCPBackstoreLegacy(backstore, self)) @@ -330,36 +325,6 @@ class UIPSCSIBackstoreLegacy(UIBackstoreLegacy): return self.new_node(ui_so) -class UIRDDRBackstoreLegacy(UIBackstoreLegacy): - ''' - RDDR backstore UI. - ''' - def ui_command_create(self, name, size, generate_wwn=None): - ''' - Creates an RDDR storage object. I{size} is the size of the ramdisk, and - the optional I{generate_wwn} parameter is a boolean specifying whether - or not we should generate a T10 wwn serial for the unit (by default, - yes). - - SIZE SYNTAX - =========== - - If size is an int, it represents a number of bytes. - - If size is a string, the following units can be used: - - B{B} or no unit present for bytes - - B{k}, B{K}, B{kB}, B{KB} for kB (kilobytes) - - B{m}, B{M}, B{mB}, B{MB} for MB (megabytes) - - B{g}, B{G}, B{gB}, B{GB} for GB (gigabytes) - - B{t}, B{T}, B{tB}, B{TB} for TB (terabytes) - ''' - self.assert_root() - so = RDDRStorageObject(self.rtsnode, name, size, - self.prm_gen_wwn(generate_wwn)) - ui_so = UIStorageObjectLegacy(so, self) - self.shell.log.info("Created rd_dr ramdisk %s with size %s." - % (name, size)) - return self.new_node(ui_so) - - class UIRDMCPBackstoreLegacy(UIBackstoreLegacy): ''' RDMCP backstore UI. -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe target-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html