Python library for configuring the Linux kernel-based multiprotocol SCSI target (LIO)

A Python object API for managing the Linux LIO kernel target

rtslib-fb is an object-based Python library for configuring the LIO generic SCSI target, present in 3.x Linux kernel versions.

It supports both Python 2 and Python 3, thanks to the python-six library.

FB 的 "Free branch"

  rtslib-fb is a fork of the "rtslib" code written by RisingTide Systems. The "-fb" differentiates between the original and this version. Please ensure to use either all "fb" versions of the targetcli components -- targetcli, rtslib, and configshell, or stick with all non-fb versions, since they are no longer strictly compatible.

rpm 版本:

  rtslib-fb-2.1.51-1.noarch

命令:

  /usr/bin/targetctl

 syntax: /usr/bin/targetctl save [file_to_save_to]
/usr/bin/targetctl restore [file_to_restore_from]
/usr/bin/targetctl clear
default file is: /etc/target/saveconfig.json

源码:

  6个模块文件: 'fabric', 'node', 'root', 'target', 'tcm', 'utils'

  /usr/lib/python2.6/site-packages/rtslib/__init__.py
  /usr/lib/python2.6/site-packages/rtslib/fabric.py
  /usr/lib/python2.6/site-packages/rtslib/node.py
  /usr/lib/python2.6/site-packages/rtslib/root.py
  /usr/lib/python2.6/site-packages/rtslib/target.py
  /usr/lib/python2.6/site-packages/rtslib/tcm.py
  /usr/lib/python2.6/site-packages/rtslib/utils.py

 fabric_modules = {
"srpt": SRPTFabricModule,
"iscsi": ISCSIFabricModule,
"loopback": LoopbackFabricModule,
"qla2xxx": Qla2xxxFabricModule,
"sbp": SBPFabricModule,
"tcm_fc": FCoEFabricModule,
# "usb_gadget": USBGadgetFabricModule, # very rare, don't show
"vhost": VhostFabricModule,
}

  17个类对象:

  'BlockStorageObject', 'FabricModule', 'FileIOStorageObject', 'LUN', 'MappedLUN', 'NetworkPortal', 'NodeACL', 'PSCSIStorageObject', 'RDMCPStorageObject', 'RTSLibBrokenLink', 'RTSLibError', 'RTSLibNotInCFS', 'RTSRoot', 'StorageObjectFactory', 'TPG', 'Target', 'UserBackedStorageObject'

附录:

  源码:https://github.com/agrover/rtslib-fb

  

python-rtslib 模块的更多相关文章

  1. Python标准模块--threading

    1 模块简介 threading模块在Python1.5.2中首次引入,是低级thread模块的一个增强版.threading模块让线程使用起来更加容易,允许程序同一时间运行多个操作. 不过请注意,P ...

  2. Python的模块引用和查找路径

    模块间相互独立相互引用是任何一种编程语言的基础能力.对于“模块”这个词在各种编程语言中或许是不同的,但我们可以简单认为一个程序文件是一个模块,文件里包含了类或者方法的定义.对于编译型的语言,比如C#中 ...

  3. Python Logging模块的简单使用

    前言 日志是非常重要的,最近有接触到这个,所以系统的看一下Python这个模块的用法.本文即为Logging模块的用法简介,主要参考文章为Python官方文档,链接见参考列表. 另外,Python的H ...

  4. Python标准模块--logging

    1 logging模块简介 logging模块是Python内置的标准模块,主要用于输出运行日志,可以设置输出日志的等级.日志保存路径.日志文件回滚等:相比print,具备如下优点: 可以通过设置不同 ...

  5. python基础-模块

    一.模块介绍                                                                                              ...

  6. python 安装模块

    python安装模块的方法很多,在此仅介绍一种,不需要安装其他附带的pip等,python安装完之后,配置环境变量,我由于中英文分号原因,环境变量始终没能配置成功汗. 1:下载模块的压缩文件解压到任意 ...

  7. python Queue模块

    先看一个很简单的例子 #coding:utf8 import Queue #queue是队列的意思 q=Queue.Queue(maxsize=10) #创建一个queue对象 for i in ra ...

  8. python logging模块可能会令人困惑的地方

    python logging模块主要是python提供的通用日志系统,使用的方法其实挺简单的,这块就不多介绍.下面主要会讲到在使用python logging模块的时候,涉及到多个python文件的调 ...

  9. Python引用模块和查找模块路径

    模块间相互独立相互引用是任何一种编程语言的基础能力.对于"模块"这个词在各种编程语言中或许是不同的,但我们可以简单认为一个程序文件是一个模块,文件里包含了类或者方法的定义.对于编译 ...

  10. Python Paramiko模块与MySQL数据库操作

    Paramiko模块批量管理:通过调用ssh协议进行远程机器的批量命令执行. 要使用paramiko模块那就必须先安装这个第三方模块,仅需要在本地上安装相应的软件(python以及PyCrypto), ...

随机推荐

  1. POJ:2492-Bug's Life(二分图的判定)

    Bug's Life Time Limit: 10000MS Memory Limit: 65536K Description Background Professor Hopper is resea ...

  2. [BZOJ3625][CF438E]小朋友和二叉树

    题面 Description 我们的小朋友很喜欢计算机科学,而且尤其喜欢二叉树. 考虑一个含有\(n\)个互异正整数的序列\(c_1,c_2,\ldots,c_n\).如果一棵带点权的有根二叉树满足其 ...

  3. 线段树[To be continued]

    目录 数据结构--线段树 一.定义 二.性质 三.基本操作 0.结构体 1.建树 2.单点查询 3.单点修改 4.区间修改 5.区间查询 四.题目 单点修改.区域查询模板 五.鸣谢 学姐的Blog 百 ...

  4. [netty4][netty-transpot]Channel体系分析

    Channel体系分析 接口与类结构体系 -- [I]AttributeMap, ChannelOutboundInvoker, Comparable -- [I]AttributeMap ---- ...

  5. apizza导出为html后,从中提取api_name/api_path/api_method,保存到本地,方便根据接口名称得到接口路径与请求方法

    import re import os def open_file(file='c:/newcrm.html'): f=open(file,'r',encoding='utf-8') return f ...

  6. Linux内核使用毫秒延时函数

    毫秒延时函数:mdelay() 微妙延时函数:ndelay() #ifndef mdelay #define mdelay(n) (/ (__builtin_constant_p(n) &&a ...

  7. java第五次课堂笔记

  8. PHP简单登录退出代码

    PHP简单登录退出代码 登录页面login.html 负责收集用户填写的登录信息.  <html> <head> <title></title> < ...

  9. IE IE8 iframe的onload方法分析 IE浏览器onload事件失效

    判断iframe是否加载完成的完美方法 IE 支持 iframe 的 onload 事件,不过是隐形的,需要通过 attachEvent 来注册. 第二种方法比第一种方法更完美(采用readystat ...

  10. maven国内镜像

    <?xml version="1.0" encoding="UTF-8"?> <!--Licensed to the Apache Softw ...