diff options
author | Christophe Vu-Brugier <cvubrugier@fastmail.fm> | 2019-08-01 22:12:00 +0200 |
---|---|---|
committer | Christophe Vu-Brugier <cvubrugier@fastmail.fm> | 2019-08-01 22:12:00 +0200 |
commit | 7fd26260bd0ea277085a1a9a316b3ea0e3383a56 (patch) | |
tree | ec384a2ec19ffb6f8e0e9163978bdf3506468829 | |
parent | 0b4fcdd0726248c5b47c8fdede331d0757a3c0b7 (diff) | |
download | targetcli-7fd26260bd0ea277085a1a9a316b3ea0e3383a56.tar.gz |
Remove Epydoc markup from command messages
Signed-off-by: Christophe Vu-Brugier <cvubrugier@fastmail.fm>
-rw-r--r-- | targetcli/ui_backstore.py | 74 | ||||
-rw-r--r-- | targetcli/ui_node.py | 2 | ||||
-rw-r--r-- | targetcli/ui_root.py | 17 | ||||
-rw-r--r-- | targetcli/ui_target.py | 101 |
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 bbdae00..39da633 100644 --- a/targetcli/ui_root.py +++ b/targetcli/ui_root.py @@ -236,15 +236,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 @@ -317,4 +317,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 0c3fe1b..36ef5f1 100644 --- a/targetcli/ui_target.py +++ b/targetcli/ui_target.py @@ -167,18 +167,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() @@ -223,12 +223,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') @@ -262,7 +262,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 @@ -308,13 +308,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() @@ -351,12 +351,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"): @@ -515,7 +515,7 @@ class UITPG(UIRTSLibNode): SEE ALSO ======== - B{disable status} + disable status ''' self.assert_root() if self.rtsnode.enable: @@ -533,7 +533,7 @@ class UITPG(UIRTSLibNode): SEE ALSO ======== - B{enable status} + enable status ''' self.assert_root() if self.rtsnode.enable: @@ -582,18 +582,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() @@ -614,11 +615,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') @@ -870,14 +871,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, @@ -885,7 +886,7 @@ class UINodeACL(UIRTSLibNode): SEE ALSO ======== - B{delete} + delete ''' self.assert_root() try: @@ -963,11 +964,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: @@ -1086,25 +1087,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() @@ -1188,15 +1189,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"): @@ -1303,9 +1304,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 @@ -1317,7 +1318,7 @@ class UIPortals(UINode): SEE ALSO ======== - B{delete} + delete ''' self.assert_root() @@ -1379,11 +1380,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), |