python-rtslib 模块

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

1 syntax: /usr/bin/targetctl save [file_to_save_to]
2         /usr/bin/targetctl restore [file_to_restore_from]
3         /usr/bin/targetctl clear
4   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

 1 fabric_modules = {
 2     "srpt": SRPTFabricModule,
 3     "iscsi": ISCSIFabricModule,
 4     "loopback": LoopbackFabricModule,
 5     "qla2xxx": Qla2xxxFabricModule,
 6     "sbp": SBPFabricModule,
 7     "tcm_fc": FCoEFabricModule,
 8 #    "usb_gadget": USBGadgetFabricModule, # very rare, don't show
 9     "vhost": VhostFabricModule,
10     }

 

  17个类对象:

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

 

 

 

附录:

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

  

转载于:https://www.cnblogs.com/doscho/p/6896028.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值