summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaurizio Lombardi <mlombard@redhat.com>2019-11-04 11:19:22 +0100
committerGitHub <noreply@github.com>2019-11-04 11:19:22 +0100
commit536b14629b28079391a2bde6dd7d36d50f13bbf2 (patch)
tree84cb32eedf996120c5b9e19b9016910eec9c816b
parent67f75e6d7c7639cdc8fa9b5f4f6f41adcb90ed61 (diff)
parent7fd26260bd0ea277085a1a9a316b3ea0e3383a56 (diff)
downloadtargetcli-536b14629b28079391a2bde6dd7d36d50f13bbf2.tar.gz
Merge pull request #141 from cvubrugier/remove-epydoc
Remove Epydoc markup from command messages
-rw-r--r--targetcli/ui_backstore.py74
-rw-r--r--targetcli/ui_node.py2
-rw-r--r--targetcli/ui_root.py17
-rw-r--r--targetcli/ui_target.py101
4 files changed, 97 insertions, 97 deletions
diff --git a/targetcli/ui_backstore.py b/targetcli/ui_backstore.py
index a42d1bd..8692f22 100644
--- a/targetcli/ui_backstore.py
+++ b/targetcli/ui_backstore.py
@@ -59,14 +59,14 @@ def human_to_bytes(hsize, kilo=1024):
'''
This function converts human-readable amounts of bytes to bytes.
It understands the following units :
- - I{B} or no unit present for Bytes
- - I{k}, I{K}, I{kB}, I{KB} for kB (kilobytes)
- - I{m}, I{M}, I{mB}, I{MB} for MB (megabytes)
- - I{g}, I{G}, I{gB}, I{GB} for GB (gigabytes)
- - I{t}, I{T}, I{tB}, I{TB} for TB (terabytes)
-
- Note: The definition of I{kilo} defaults to 1kB = 1024Bytes.
- Strictly speaking, those should not be called I{kB} but I{kiB}.
+ - B or no unit present for Bytes
+ - k, K, kB, KB for kB (kilobytes)
+ - m, M, mB, MB for MB (megabytes)
+ - g, G, gB, GB for GB (gigabytes)
+ - t, T, tB, TB for TB (terabytes)
+
+ Note: The definition of kilo defaults to 1kB = 1024Bytes.
+ Strictly speaking, those should not be called "kB" but "kiB".
You can override that with the optional kilo parameter.
@param hsize: The human-readable version of the Bytes amount to convert
@@ -286,13 +286,13 @@ class UIBackstore(UINode):
def ui_command_delete(self, name, save=None):
'''
- Recursively deletes the storage object having the specified I{name}. If
+ Recursively deletes the storage object having the specified name. If
there are LUNs using this storage object, they will be deleted too.
EXAMPLE
=======
- B{delete mystorage}
- -------------------
+ delete mystorage
+ ----------------
Deletes the storage object named mystorage, and all associated LUNs.
'''
self.assert_root()
@@ -354,7 +354,7 @@ class UIPSCSIBackstore(UIBackstore):
def ui_command_create(self, name, dev):
'''
Creates a PSCSI storage object, with supplied name and SCSI device. The
- SCSI device I{dev} can either be a path name to the device, in which
+ SCSI device "dev" can either be a path name to the device, in which
case it is recommended to use the /dev/disk/by-id hierarchy to have
consistent naming should your physical SCSI system be modified, or an
SCSI device ID in the H:C:T:L format, which is not recommended as SCSI
@@ -383,17 +383,17 @@ class UIRDMCPBackstore(UIBackstore):
def ui_command_create(self, name, size, nullio=None, wwn=None):
'''
- Creates an RDMCP storage object. I{size} is the size of the ramdisk.
+ Creates an RDMCP storage object. "size" is the size of the ramdisk.
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)
+ - B or no unit present for bytes
+ - k, K, kB, KB for kB (kilobytes)
+ - m, M, mB, MB for MB (megabytes)
+ - g, G, gB, GB for GB (gigabytes)
+ - t, T, tB, TB for TB (terabytes)
'''
self.assert_root()
@@ -445,14 +445,14 @@ class UIFileIOBackstore(UIBackstore):
def ui_command_create(self, name, file_or_dev, size=None, write_back=None,
sparse=None, wwn=None):
'''
- Creates a FileIO storage object. If I{file_or_dev} is a path
- to a regular file to be used as backend, then the I{size}
- parameter is mandatory. Else, if I{file_or_dev} is a path to a
- block device, the size parameter B{must} be ommited. If
- present, I{size} is the size of the file to be used, I{file}
- the path to the file or I{dev} the path to a block device. The
- I{write_back} parameter is a boolean controlling write
- caching. It is enabled by default. The I{sparse} parameter is
+ Creates a FileIO storage object. If "file_or_dev" is a path
+ to a regular file to be used as backend, then the "size"
+ parameter is mandatory. Else, if "file_or_dev" is a path to a
+ block device, the size parameter must be omitted. If
+ present, "size" is the size of the file to be used, "file"
+ the path to the file or "dev" the path to a block device. The
+ "write_back" parameter is a boolean controlling write
+ caching. It is enabled by default. The "sparse" parameter is
only applicable when creating a new backing file. It is a
boolean stating if the created file should be created as a
sparse file (the default), or fully initialized.
@@ -461,11 +461,11 @@ class UIFileIOBackstore(UIBackstore):
===========
- 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)
+ - B or no unit present for bytes
+ - k, K, kB, KB for kB (kilobytes)
+ - m, M, mB, MB for MB (megabytes)
+ - g, G, gB, GB for GB (gigabytes)
+ - t, T, tB, TB for TB (terabytes)
'''
self.assert_root()
@@ -557,7 +557,7 @@ class UIBlockBackstore(UIBackstore):
def ui_command_create(self, name, dev, readonly=None, wwn=None):
'''
- Creates an Block Storage object. I{dev} is the path to the TYPE_DISK
+ Creates an Block Storage object. "dev" is the path to the TYPE_DISK
block device to use.
'''
self.assert_root()
@@ -628,11 +628,11 @@ class UIUserBackedBackstore(UIBackstore):
===========
- 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)
+ - B or no unit present for bytes
+ - k, K, kB, KB for kB (kilobytes)
+ - m, M, mB, MB for MB (megabytes)
+ - g, G, gB, GB for GB (gigabytes)
+ - t, T, tB, TB for TB (terabytes)
'''
size = human_to_bytes(size)
diff --git a/targetcli/ui_node.py b/targetcli/ui_node.py
index 4cb09ed..58a70c6 100644
--- a/targetcli/ui_node.py
+++ b/targetcli/ui_node.py
@@ -98,7 +98,7 @@ class UINode(ConfigNode):
SEE ALSO
========
- B{ls}
+ ls
'''
description, is_healthy = self.summary()
self.shell.log.info("Status for %s: %s" % (self.path, description))
diff --git a/targetcli/ui_root.py b/targetcli/ui_root.py
index dab8612..26815bd 100644
--- a/targetcli/ui_root.py
+++ b/targetcli/ui_root.py
@@ -240,15 +240,15 @@ class UIRoot(UINode):
PARAMETERS
==========
- I{action}
- ---------
- The I{action} is one of:
- - B{list} gives a short session list
- - B{detail} gives a detailed list
-
- I{sid}
+ action
------
- You can specify an I{sid} to only list this one,
+ The action is one of:
+ - `list`` gives a short session list
+ - `detail` gives a detailed list
+
+ sid
+ ---
+ You can specify an "sid" to only list this one,
with or without details.
SEE ALSO
@@ -321,4 +321,3 @@ class UIRoot(UINode):
indent_print("(no open sessions)", base_steps)
else:
raise ExecutionError("no session found with sid %i" % int(sid))
-
diff --git a/targetcli/ui_target.py b/targetcli/ui_target.py
index 16ccae7..e8ba6c6 100644
--- a/targetcli/ui_target.py
+++ b/targetcli/ui_target.py
@@ -172,18 +172,18 @@ class UIFabricModule(UIRTSLibNode):
def ui_command_create(self, wwn=None):
'''
- Creates a new target. The I{wwn} format depends on the transport(s)
- supported by the fabric module. If the I{wwn} is ommited, then a
+ Creates a new target. The "wwn" format depends on the transport(s)
+ supported by the fabric module. If "wwn" is omitted, then a
target will be created using either a randomly generated WWN of the
proper type, or the first unused WWN in the list of possible WWNs if
one is available. If WWNs are constrained to a list (i.e. for hardware
targets addresses) and all WWNs are in use, the target creation will
- fail. Use the B{info} command to get more information abour WWN type
+ fail. Use the `info` command to get more information abour WWN type
and possible values.
SEE ALSO
========
- B{info}
+ info
'''
self.assert_root()
@@ -228,12 +228,12 @@ class UIFabricModule(UIRTSLibNode):
def ui_command_delete(self, wwn):
'''
- Recursively deletes the target with the specified I{wwn}, and all
+ Recursively deletes the target with the specified wwn, and all
objects hanging under it.
SEE ALSO
========
- B{create}
+ create
'''
self.assert_root()
target = Target(self.rtsnode, wwn, mode='lookup')
@@ -267,7 +267,7 @@ class UIFabricModule(UIRTSLibNode):
def ui_command_info(self):
'''
Displays information about the fabric module, notably the supported
- transports(s) and accepted B{wwn} format(s), as long as supported
+ transports(s) and accepted wwn format(s), along with supported
features.
'''
fabric = self.rtsnode
@@ -313,13 +313,13 @@ class UIMultiTPGTarget(UIRTSLibNode):
def ui_command_create(self, tag=None):
'''
Creates a new Target Portal Group within the target. The
- I{tag} must be a positive integer value, optionally prefaced
+ tag must be a positive integer value, optionally prefaced
by 'tpg'. If omitted, the next available Target Portal Group
Tag (TPGT) will be used.
SEE ALSO
========
- B{delete}
+ delete
'''
self.assert_root()
@@ -356,12 +356,12 @@ class UIMultiTPGTarget(UIRTSLibNode):
def ui_command_delete(self, tag):
'''
- Deletes the Target Portal Group with TPGT I{tag} from the target. The
- I{tag} must be a positive integer matching an existing TPGT.
+ Deletes the Target Portal Group with TPGT "tag" from the target. The
+ tag must be a positive integer matching an existing TPGT.
SEE ALSO
========
- B{create}
+ create
'''
self.assert_root()
if tag.startswith("tpg"):
@@ -520,7 +520,7 @@ class UITPG(UIRTSLibNode):
SEE ALSO
========
- B{disable status}
+ disable status
'''
self.assert_root()
if self.rtsnode.enable:
@@ -538,7 +538,7 @@ class UITPG(UIRTSLibNode):
SEE ALSO
========
- B{enable status}
+ enable status
'''
self.assert_root()
if self.rtsnode.enable:
@@ -587,18 +587,19 @@ class UINodeACLs(UINode):
def ui_command_create(self, wwn, add_mapped_luns=None):
'''
- Creates a Node ACL for the initiator node with the specified I{wwn}.
- The node's I{wwn} must match the expected WWN Type of the target's
+ Creates a Node ACL for the initiator node with the specified wwn.
+ The node's wwn must match the expected WWN Type of the target's
fabric module.
- If I{add_mapped_luns} is omitted, the global parameter
- B{auto_add_mapped_luns} will be used, else B{true} or B{false} are
- accepted. If B{true}, then after creating the ACL, mapped LUNs will be
- automatically created for all existing LUNs.
+ "add_mapped_luns" can be "true" of "false". If true, then
+ after creating the ACL, mapped LUNs will be automatically
+ created for all existing LUNs. If the parameter is omitted,
+ the global parameter "auto_add_mapped_luns" is used.
SEE ALSO
========
- B{delete}
+ delete
+
'''
self.assert_root()
@@ -619,11 +620,11 @@ class UINodeACLs(UINode):
def ui_command_delete(self, wwn):
'''
- Deletes the Node ACL with the specified I{wwn}.
+ Deletes the Node ACL with the specified wwn.
SEE ALSO
========
- B{create}
+ create
'''
self.assert_root()
node_acl = NodeACL(self.tpg, wwn, mode='lookup')
@@ -875,14 +876,14 @@ class UINodeACL(UIRTSLibNode):
def ui_command_create(self, mapped_lun, tpg_lun_or_backstore, write_protect=None):
'''
Creates a mapping to one of the TPG LUNs for the initiator referenced
- by the ACL. The provided I{tpg_lun_or_backstore} will appear to that
- initiator as LUN I{mapped_lun}. If the I{write_protect} flag is set to
- B{1}, the initiator will not have write access to the Mapped LUN.
+ by the ACL. The provided "tpg_lun_or_backstore" will appear to that
+ initiator as LUN "mapped_lun". If the "write_protect" flag is set to
+ 1, the initiator will not have write access to the mapped LUN.
- A storage object may also be given for the I{tpg_lun_or_backstore} parameter,
+ A storage object may also be given for the "tpg_lun_or_backstore" parameter,
in which case the TPG LUN will be created for that backstore before
mapping the LUN to the initiator. If a TPG LUN for the backstore already
- exists, the Mapped LUN will map to that TPG LUN.
+ exists, the mapped LUN will map to that TPG LUN.
Finally, a path to an existing block device or file can be given. If so,
a storage object of the appropriate type is created with default parameters,
@@ -890,7 +891,7 @@ class UINodeACL(UIRTSLibNode):
SEE ALSO
========
- B{delete}
+ delete
'''
self.assert_root()
try:
@@ -968,11 +969,11 @@ class UINodeACL(UIRTSLibNode):
def ui_command_delete(self, mapped_lun):
'''
- Deletes the specified I{mapped_lun}.
+ Deletes the specified mapped LUN.
SEE ALSO
========
- B{create}
+ create
'''
self.assert_root()
for na in self.rtsnodes:
@@ -1091,25 +1092,25 @@ class UILUNs(UINode):
add_mapped_luns=None):
'''
Creates a new LUN in the Target Portal Group, attached to a storage
- object. If the I{lun} parameter is omitted, the first available LUN in
+ object. If the "lun" parameter is omitted, the first available LUN in
the TPG will be used. If present, it must be a number greater than 0.
- Alternatively, the syntax I{lunX} where I{X} is a positive number is
+ Alternatively, the syntax "lunX" where "X" is a positive number is
also accepted.
- The I{storage_object} may be the path of an existing storage object,
- i.e. B{/backstore/pscsi0/mydisk} to reference the B{mydisk} storage
- object of the virtual HBA B{pscsi0}. It also may be the path to an
+ The "storage_object" may be the path of an existing storage object,
+ i.e. "/backstore/pscsi0/mydisk" to reference the "mydisk" storage
+ object of the virtual HBA "pscsi0". It also may be the path to an
existing block device or image file, in which case a storage object
will be created for it first, with default parameters.
- If I{add_mapped_luns} is omitted, the global parameter
- B{auto_add_mapped_luns} will be used, else B{true} or B{false} are
- accepted. If B{true}, then after creating the LUN, mapped LUNs will be
- automatically created for all existing node ACLs, mapping the new LUN.
+ "add_mapped_luns" can be "true" of "false". If true, then
+ after creating the ACL, mapped LUNs will be automatically
+ created for all existing LUNs. If the parameter is omitted,
+ the global parameter "auto_add_mapped_luns" is used.
SEE ALSO
========
- B{delete}
+ delete
'''
self.assert_root()
@@ -1193,15 +1194,15 @@ class UILUNs(UINode):
def ui_command_delete(self, lun):
'''
- Deletes the supplied LUN from the Target Portal Group. The I{lun} must
+ Deletes the supplied LUN from the Target Portal Group. "lun" must
be a positive number matching an existing LUN.
- Alternatively, the syntax I{lunX} where I{X} is a positive number is
+ Alternatively, the syntax "lunX" where "X" is a positive number is
also accepted.
SEE ALSO
========
- B{create}
+ create
'''
self.assert_root()
if lun.lower().startswith("lun"):
@@ -1308,9 +1309,9 @@ class UIPortals(UINode):
def ui_command_create(self, ip_address=None, ip_port=None):
'''
- Creates a Network Portal with specified I{ip_address} and
- I{ip_port}. If I{ip_port} is omitted, the default port for
- the target fabric will be used. If I{ip_address} is omitted,
+ Creates a Network Portal with the specified IP address and
+ port. If the port is omitted, the default port for
+ the target fabric will be used. If the IP address is omitted,
INADDR_ANY (0.0.0.0) will be used.
Choosing IN6ADDR_ANY (::0) will listen on all IPv6 interfaces
@@ -1322,7 +1323,7 @@ class UIPortals(UINode):
SEE ALSO
========
- B{delete}
+ delete
'''
self.assert_root()
@@ -1384,11 +1385,11 @@ class UIPortals(UINode):
def ui_command_delete(self, ip_address, ip_port):
'''
- Deletes the Network Portal with specified I{ip_address} and I{ip_port}.
+ Deletes the Network Portal with the specified IP address and port.
SEE ALSO
========
- B{create}
+ create
'''
self.assert_root()
portal = NetworkPortal(self.tpg, self._canonicalize_ip(ip_address),