diff --git a/simplyblock_cli/cli-reference.yaml b/simplyblock_cli/cli-reference.yaml index 1f90b9f49..2397c6f21 100644 --- a/simplyblock_cli/cli-reference.yaml +++ b/simplyblock_cli/cli-reference.yaml @@ -2,7 +2,7 @@ # yaml-language-server: $schema=./cli-reference-schema.yaml commands: - name: "storage-node" - help: "Storage node commands." + help: "Storage Node Commands" aliases: - sn weight: 100 @@ -132,7 +132,7 @@ commands: scratch-deployment of cluster software. - name: clean-devices - help: "Clean devices stored in /etc/simplyblock/sn_config_file (local run)." + help: "Clean devices stored in /etc/simplyblock/sn_config_file (local run)" description: > Run locally on storage nodes to clean nvme devices and free them. arguments: @@ -159,9 +159,8 @@ commands: dest: ifname type: str - name: "--journal-partition" - help: | - **Deprecated:** use `--enable-journal-device` instead. - + help: >- + **Deprecated:** use `--enable-journal-device` instead.

1: Auto-create small partitions for journal on nvme devices. 0: use a separate (the smallest) nvme device of the node for journal. The journal needs a maximum of 3 percent of total available raw disk space. Default: `1`. dest: partitions type: int @@ -272,7 +271,7 @@ commands: completer: _completer_get_sn_list type: str - name: "--force" - help: "Force delete storage node from DB...Hopefully you know what you do." + help: "Force delete storage node from DB. Ensure you know what you're doing." dest: force_remove type: bool action: store_true @@ -805,7 +804,7 @@ commands: dest: node_id type: str - name: "cluster" - help: "Cluster commands." + help: "Cluster Commands" weight: 200 subcommands: - name: create @@ -1505,7 +1504,7 @@ commands: dest: target_pool type: str - name: "volume" - help: "Logical volume commands." + help: "Logical Volume Commands" aliases: - lvol weight: 300 @@ -1616,12 +1615,11 @@ commands: - name: "--pvc-name" aliases: - "--pvc_name" - help: "Set logical volume PVC name for k8s clients." - description: | + help: "Set logical volume PVC name for k8s clients" + description: >- Set the logical volume persistent volume claim name for Kubernetes clients.

- !!! warning - The old parameter name `--pvc_name` is deprecated and shouldn't be used anymore. It will eventually be - removed. Please exchange the use of `--pvc_name` with `--pvc-name`. + The old parameter name `--pvc_name` is deprecated and shouldn't be used anymore. It will eventually be + removed. Please exchange the use of `--pvc_name` with `--pvc-name`. dest: pvc_name type: str - name: "--data-chunks-per-stripe" @@ -1987,7 +1985,7 @@ commands: dest: migration_id type: str - name: "control-plane" - help: "Control plane commands." + help: "Control Plane Commands" aliases: - cp - mgmt @@ -2040,7 +2038,7 @@ commands: dest: node_id type: str - name: "storage-pool" - help: "Storage pool commands." + help: "Storage Pool Commands" aliases: - pool weight: 500 @@ -2192,7 +2190,7 @@ commands: type: int default: 20 - name: "snapshot" - help: "Snapshot commands." + help: "Snapshot Commands" weight: 600 subcommands: - name: add @@ -2309,7 +2307,7 @@ commands: dest: snapshot_id type: str - name: "backup" - help: "Backup commands." + help: "Backup Commands" weight: 650 subcommands: - name: list @@ -2471,18 +2469,18 @@ commands: dest: cluster_id type: str - name: "qos" - help: "Qos commands." + help: "QoS Commands" weight: 700 subcommands: - name: add - help: "Creates a new QOS class." + help: "Creates a new QoS class" arguments: - name: "name" - help: "The QOS class name." + help: "QoS class name" dest: name type: str - name: "weight" - help: "The QOS class weight." + help: "QoS class weight" dest: weight type: int - name: "cluster_id" @@ -2509,7 +2507,7 @@ commands: help: "Delete a class." arguments: - name: "name" - help: "The QOS class name." + help: "QoS class name" dest: name type: str - name: "cluster_id" diff --git a/simplyblock_cli/cli.py b/simplyblock_cli/cli.py index 346dd870a..d2781f7dc 100755 --- a/simplyblock_cli/cli.py +++ b/simplyblock_cli/cli.py @@ -32,7 +32,7 @@ def __init__(self): super().__init__() def init_storage_node(self): - subparser = self.add_command('storage-node', 'Storage node commands.', aliases=['sn',]) + subparser = self.add_command('storage-node', 'Storage Node Commands', aliases=['sn',]) self.init_storage_node__deploy(subparser) self.init_storage_node__configure(subparser) self.init_storage_node__configure_upgrade(subparser) @@ -114,7 +114,7 @@ def init_storage_node__deploy_cleaner(self, subparser): subcommand = self.add_sub_command(subparser, 'deploy-cleaner', 'Cleans a previous simplyblock deploy (local run).') def init_storage_node__clean_devices(self, subparser): - subcommand = self.add_sub_command(subparser, 'clean-devices', 'Clean devices stored in /etc/simplyblock/sn_config_file (local run).') + subcommand = self.add_sub_command(subparser, 'clean-devices', 'Clean devices stored in /etc/simplyblock/sn_config_file (local run)') argument = subcommand.add_argument('--config-path', help='The config path to read stored nvme devices from. Default: `/etc/simplyblock/sn_config_file`.', type=str, default='/etc/simplyblock/sn_config_file', dest='config_path', required=False) def init_storage_node__add_node(self, subparser): @@ -122,7 +122,7 @@ def init_storage_node__add_node(self, subparser): subcommand.add_argument('cluster_id', help='The cluster id.', type=str) subcommand.add_argument('node_addr', help='Address of storage node api to add, like :5000.', type=str) subcommand.add_argument('ifname', help='The management interface name.', type=str) - argument = subcommand.add_argument('--journal-partition', help='**Deprecated:** use `--enable-journal-device` instead.1: Auto-create small partitions for journal on nvme devices. 0: use a separate (the smallest) nvme device of the node for journal. The journal needs a maximum of 3 percent of total available raw disk space. Default: `1`.', type=int, dest='partitions', choices=[0,1,]) + argument = subcommand.add_argument('--journal-partition', help='**Deprecated:** use `--enable-journal-device` instead.

1: Auto-create small partitions for journal on nvme devices. 0: use a separate (the smallest) nvme device of the node for journal. The journal needs a maximum of 3 percent of total available raw disk space. Default: `1`.', type=int, dest='partitions', choices=[0,1,]) argument = subcommand.add_argument('--enable-journal-device', help='Enables the use of a separate (the smallest) NVMe device of the node for the journal. Otherwise, the journal uses a maximum of 3%% of total available raw disk space across all NVMe devices.', default=False, dest='enable_journal_device', action='store_true') argument = subcommand.add_argument('--format-4k', help='Force format nvme devices with 4K.', dest='format_4k', action='store_true') if self.developer_mode: @@ -154,7 +154,7 @@ def init_storage_node__add_node(self, subparser): def init_storage_node__delete(self, subparser): subcommand = self.add_sub_command(subparser, 'delete', 'Deletes a storage node object from the state database.') subcommand.add_argument('node_id', help='Storage node id', type=str).completer = self._completer_get_sn_list - argument = subcommand.add_argument('--force', help='Force delete storage node from DB...Hopefully you know what you do.', dest='force_remove', action='store_true') + argument = subcommand.add_argument('--force', help='Force delete storage node from DB. Ensure that you know what you do.', dest='force_remove', action='store_true') def init_storage_node__remove(self, subparser): subcommand = self.add_sub_command(subparser, 'remove', 'Removes a storage node from the cluster.') @@ -348,7 +348,7 @@ def init_storage_node__lvs_dump_tree(self, subparser): def init_cluster(self): - subparser = self.add_command('cluster', 'Cluster commands.') + subparser = self.add_command('cluster', 'Cluster Commands') self.init_cluster__create(subparser) self.init_cluster__add(subparser) self.init_cluster__activate(subparser) @@ -582,7 +582,7 @@ def init_cluster__add_replication(self, subparser): def init_volume(self): - subparser = self.add_command('volume', 'Logical volume commands.', aliases=['lvol',]) + subparser = self.add_command('volume', 'Logical Volume Commands', aliases=['lvol',]) self.init_volume__add(subparser) self.init_volume__add_host(subparser) self.init_volume__remove_host(subparser) @@ -642,7 +642,7 @@ def init_volume__add(self, subparser): argument = subcommand.add_argument('--namespace', help='Sets the NVMe namespace for the logical volume (namespace must already exist).', type=str, dest='namespace') if self.developer_mode: argument = subcommand.add_argument('--uid', help='Set logical volume id.', type=str, dest='uid') - argument = subcommand.add_argument('--pvc-name', '--pvc_name', help='Set logical volume PVC name for k8s clients.', type=str, dest='pvc_name') + argument = subcommand.add_argument('--pvc-name', '--pvc_name', help='Set logical volume PVC name for k8s clients', type=str, dest='pvc_name') argument = subcommand.add_argument('--data-chunks-per-stripe', help='The erasure coding schema parameter k (distributed raid). Default: `0`.', type=int, default=0, dest='ndcs') argument = subcommand.add_argument('--parity-chunks-per-stripe', help='The erasure coding schema parameter n (distributed raid). Default: `0`.', type=int, default=0, dest='npcs') argument = subcommand.add_argument('--replicate', help='Replicate LVol snapshot', dest='replicate', action='store_true') @@ -789,7 +789,7 @@ def init_volume__migrate_cancel(self, subparser): def init_control_plane(self): - subparser = self.add_command('control-plane', 'Control plane commands.', aliases=['cp','mgmt',]) + subparser = self.add_command('control-plane', 'Control Plane Commands', aliases=['cp','mgmt',]) self.init_control_plane__add(subparser) self.init_control_plane__list(subparser) self.init_control_plane__remove(subparser) @@ -814,7 +814,7 @@ def init_control_plane__remove(self, subparser): def init_storage_pool(self): - subparser = self.add_command('storage-pool', 'Storage pool commands.', aliases=['pool',]) + subparser = self.add_command('storage-pool', 'Storage Pool Commands', aliases=['pool',]) self.init_storage_pool__add(subparser) self.init_storage_pool__set(subparser) self.init_storage_pool__list(subparser) @@ -883,7 +883,7 @@ def init_storage_pool__get_io_stats(self, subparser): def init_snapshot(self): - subparser = self.add_command('snapshot', 'Snapshot commands.') + subparser = self.add_command('snapshot', 'Snapshot Commands') self.init_snapshot__add(subparser) self.init_snapshot__list(subparser) self.init_snapshot__delete(subparser) @@ -948,7 +948,7 @@ def init_snapshot__backup(self, subparser): def init_backup(self): - subparser = self.add_command('backup', 'Backup commands.') + subparser = self.add_command('backup', 'Backup Commands') self.init_backup__list(subparser) self.init_backup__delete(subparser) self.init_backup__restore(subparser) @@ -1029,16 +1029,16 @@ def init_backup__source_switch(self, subparser): def init_qos(self): - subparser = self.add_command('qos', 'Qos commands.') + subparser = self.add_command('qos', 'QoS Commands') self.init_qos__add(subparser) self.init_qos__list(subparser) self.init_qos__delete(subparser) def init_qos__add(self, subparser): - subcommand = self.add_sub_command(subparser, 'add', 'Creates a new QOS class.') - subcommand.add_argument('name', help='The QOS class name.', type=str) - subcommand.add_argument('weight', help='The QOS class weight.', type=int) + subcommand = self.add_sub_command(subparser, 'add', 'Creates a new QoS class') + subcommand.add_argument('name', help='QoS class name', type=str) + subcommand.add_argument('weight', help='QoS class weight', type=int) subcommand.add_argument('cluster_id', help='The cluster id.', type=str, default='') def init_qos__list(self, subparser): @@ -1048,7 +1048,7 @@ def init_qos__list(self, subparser): def init_qos__delete(self, subparser): subcommand = self.add_sub_command(subparser, 'delete', 'Delete a class.') - subcommand.add_argument('name', help='The QOS class name.', type=str) + subcommand.add_argument('name', help='QoS class name', type=str) subcommand.add_argument('cluster_id', help='The cluster id.', type=str, default='')