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. CodeForces 651B

    #include <cstdio> #include <algorithm> using namespace std; int a[1005], n, temp, maxk; ...

  2. Python9-IO模型-day41

    # 进程:启动多个进程,进程之间是由操作系统负责调用# 线程:启动多个线程,真正由被cpu执行的最小单位实际是线程# 开启一个线程,创建一个线程,寄存器.堆栈# 关闭一个线程# 协程# 本质上是一个线 ...

  3. Codeforces Round #464 (Div. 2) B. Hamster Farm

    B. Hamster Farm time limit per test2 seconds memory limit per test256 megabytes Problem Description ...

  4. “帮你APP”团队冲刺4

    1.整个项目预期的任务量 (任务量 = 所有工作的预期时间)和 目前已经花的时间 (所有记录的 ‘已经花费的时间’),还剩余的时间(所有工作的 ‘剩余时间’) : 所有工作的预期时间:88h 目前已经 ...

  5. Thread和Runnable的子类调用

    实现线程的两种方式: 继承Thread类. 实现Runnable接口. 下面是一个小案例: public class Thread和Runnable { public static void main ...

  6. tomcat内存泄漏存入dump文件

    很多tomcat进程退出(或者进程假死),都是由于频繁的抛出OutOfMemeoryError导致的. 为了让tomcat退出前或者发生OutOfMemeoryError时自动dump堆栈信息,方便事 ...

  7. ogre3D学习基础16 -- 手动创建实体(ManualObject)

    这一节练习一下手动创建实体,用到了对象(ManualObject) 第一,依然是模板 #include "ExampleApplication.h" class Example1 ...

  8. _cdecl _stdcall

    __cdecl程序的压栈方式为C风格__stdcall为PASCAL风格 举个例子:(1)   C函数  Fun1(a,b,c)   函数调用时,参数压栈顺序为 c , b , a(2)   PASC ...

  9. [译]为什么pandas有些命令用括号结尾,有些则没有?

    文章来源:https://nbviewer.jupyter.org/github/justmarkham/pandas-videos/blob/master/pandas.ipynb 方法:用括号调用 ...

  10. LFTP下载远程文件

    拓展阅读: https://linux.cn/article-5460-1.html