Skip to content

Commit

Permalink
rename "cannolo" to "mountISO" in documentation and code
Browse files Browse the repository at this point in the history
  • Loading branch information
Al3cr1s committed Dec 11, 2024
1 parent c24ba8b commit 743e779
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 13 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
```

Expand Down
4 changes: 2 additions & 2 deletions basilico.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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)
Expand Down
3 changes: 1 addition & 2 deletions constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
}
Expand Down
2 changes: 1 addition & 1 deletion dialogs/NetworkSettings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
12 changes: 6 additions & 6 deletions pinolo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
"""

Expand Down Expand Up @@ -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
Expand All @@ -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()
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 743e779

Please sign in to comment.