From 743e7798cc29cb97a5dcfdaeceb295052ea4e356 Mon Sep 17 00:00:00 2001 From: Al3cr1s <153731375+Al3cr1s@users.noreply.github.com> Date: Wed, 11 Dec 2024 10:53:04 +0100 Subject: [PATCH] rename "cannolo" to "mountISO" in documentation and code --- README.md | 4 ++-- basilico.py | 4 ++-- constants.py | 3 +-- dialogs/NetworkSettings.py | 2 +- pinolo.py | 12 ++++++------ 5 files changed, 12 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index efecb0b..19bf6e9 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Is constituted by: PESTO is a utility software that allows you to make some operations on hard disks or SSDs, like: - ERASE: Wipe all data on the selected drive. - SMART: Check SMART data of the selected drive to give an estimate of the operating status of the device. -- CANNOLO: Load an operating system image on the selected drive. +- mountISO: Load an operating system image on the selected drive. - LOAD TO TARALLO: Utility that can communicate with TARALLO, sending all the necessary data to add the selected device to the inventory. `pinolo.py` is the user interface of the software with which the user can perform all the operations on the drives. This program by itself will be useless if not coupled with the server `basilico.py`. This one is the heart of PESTO: it performs all the commands that the user send to him, constantly sending back informations to the client that shows them to the user in a more human friendly way. @@ -83,7 +83,7 @@ LOCKFILE_PATH=/var/run/basilico.pid TARALLO_URL=http://127.0.0.1:8080 # Tarallo token, default none. This is an example token. TARALLO_TOKEN=yoLeCHmEhNNseN0BlG0s3A:ksfPYziGg7ebj0goT0Zc7pbmQEIYvZpRTIkwuscAM_k -# If true, no destructive actions will be performed: no badblocks, no trimming, no cannolo. Default false. +# If true, no destructive actions will be performed: no badblocks, no trimming, no mountISO. Default false. TEST_MODE=1 ``` diff --git a/basilico.py b/basilico.py index ce6d9fb..827249d 100755 --- a/basilico.py +++ b/basilico.py @@ -330,7 +330,7 @@ def dispatch_command(self, cmd: str, args: str) -> (Optional[Callable[[str, str] "smartctl": self.get_smartctl, "queued_smartctl": self.queued_get_smartctl, "queued_badblocks": self.badblocks, - "queued_cannolo": self.cannolo, + "queued_mountISO": self.mountISO, "queued_sleep": self.sleep, "queued_umount": self.umount, "upload_to_tarallo": self.upload_to_tarallo, @@ -617,7 +617,7 @@ def _get_last_linux_partition_path_and_number_from_lsblk(lsblk_json: dict) -> tu last_linux_entry = entry["path"], (entry["partn"] if "partn" in entry else i) return last_linux_entry - def cannolo(self, _cmd: str, dev_and_iso: str): + def mountISO(self, _cmd: str, dev_and_iso: str): parts: list[Optional[str]] = dev_and_iso.split(" ", 1) while len(parts) < 2: parts.append(None) diff --git a/constants.py b/constants.py index d2ba363..493b680 100644 --- a/constants.py +++ b/constants.py @@ -13,7 +13,6 @@ "SETTINGS_UI": "/assets/qt/NetworkSettingsDialog.ui", "SMART_UI": "/assets/qt/SmartDataDialog.ui", "INFOUI": "/assets/qt/info.ui", - "CANNOLOUI": "/assets/qt/cannolo_select.ui", "ICON": "/assets/icon.png", "VAPORWAVE_AUDIO": "/assets/vaporwave_theme.mp3", "ASD": "/assets/asd/asd.gif", @@ -60,7 +59,7 @@ "queued_badblocks": "Erase", "queued_smartctl": "Smart Check", "smartctl": "Smart Check", - "queued_cannolo": "Load System", + "queued_mountISO": "Load System", "queued_sleep": "HDD Stop", "queued_upload_to_tarallo": "Upload Data", } diff --git a/dialogs/NetworkSettings.py b/dialogs/NetworkSettings.py index b8cdced..e597182 100644 --- a/dialogs/NetworkSettings.py +++ b/dialogs/NetworkSettings.py @@ -192,7 +192,7 @@ def autocomplete_port(self, completion): def find_image(self): """ This function opens a different dialog if - the user is in local or remote mode to search for a cannolo image. + the user is in local or remote mode to search for a mountISO image. """ if self.serverModeComboBox.currentText() == REMOTE_MODE: diff --git a/pinolo.py b/pinolo.py index 32c4202..13ae2a6 100644 --- a/pinolo.py +++ b/pinolo.py @@ -382,7 +382,7 @@ def standard_procedure(self): """This function send to the server a sequence of commands: - queued_badblocks - queued_smartctl - - queued_cannolo (if the cannolo flag on the dialog is checked) + - queued_mountISO (if the mountISO flag on the dialog is checked) - queued_sleep """ @@ -431,8 +431,8 @@ def smart_check(self): self.send_command(f"queued_smartctl {drive.name}") def load_system(self, standard_procedure=False): - """This function send to the server a queued_cannolo command. - If "std" is True it will skip the cannolo dialog.""" + """This function send to the server a queued_mountISO command. + If "std" is True it will skip the mountISO dialog.""" rows = self.drivesTableView.selectionModel().selectedRows() if len(rows) == 0: return @@ -452,8 +452,8 @@ def load_system(self, standard_procedure=False): return for drive in drives: - print(f"GUI: Sending cannolo to {drive.name} with {image}") - self.send_command(f"queued_cannolo {drive.name} {image}") + print(f"GUI: Mounting {image} to {drive.name}") + self.send_command(f"queued_mountISO {drive.name} {image}") def _clear_tables(self): self.drivesTableViewModel.clear() @@ -600,7 +600,7 @@ def _format_process_type(command: str): return "Erase" case "queued_smartctl": return "Smart check" - case "queued_cannolo": + case "queued_mountISO": return "Load system" case "queued_umount": return "Umount"