Integrate claude, improve selenium and support qemu #1

Open
mathben wants to merge 224 commits from develop into master
2 changed files with 22 additions and 0 deletions
Showing only changes of commit 22dcf96853 - Show all commits

View file

@ -1434,6 +1434,7 @@ class TODO:
)
# 3) Application selon agrandir/réduire et l'état de la VM.
was_shut_down = False # la VM a-t-elle été éteinte pour l'occasion ?
if shrink:
# DANGER : qcow2 --shrink ne réduit PAS le FS invité -> perte de
# données si le FS dépasse la cible. VM éteinte obligatoire.
@ -1454,6 +1455,7 @@ class TODO:
print(t("VM is still not off; aborting."))
return
state = "shut off"
was_shut_down = True
if not self._is_yes(
input(t("Type y to confirm you understand the risk (y/N): "))
):
@ -1485,6 +1487,18 @@ class TODO:
):
self._qemu_grow_guest_fs(name)
# 5) La VM a été éteinte pour l'opération : le noter et proposer de la
# redémarrer (sinon, on ne demande rien).
if was_shut_down:
print(f"\nℹ {t('The VM was shut down for the resize.')}")
if self._is_yes(
input(t("Start the VM now? (y/N): "))
):
real = self._qemu_domname(name)
cmd = f"sudo virsh start {shlex.quote(real)}"
print(f"{t('Will execute:')} {cmd}")
self.execute.exec_command_live(cmd, source_erplibre=False)
def _qemu_grow_guest_fs(self, name):
"""Étend la partition racine + le FS invité via SSH (growpart +
resize2fs/xfs_growfs/btrfs). Détecte le device et le type de FS."""

View file

@ -1436,6 +1436,14 @@ TRANSLATIONS = {
"fr": "VM éteinte.",
"en": "VM is off.",
},
"The VM was shut down for the resize.": {
"fr": "La VM a été éteinte pour le redimensionnement.",
"en": "The VM was shut down for the resize.",
},
"Start the VM now? (y/N): ": {
"fr": "Démarrer la VM maintenant ? (o/N) : ",
"en": "Start the VM now? (y/N): ",
},
"Graceful shutdown timed out. Force off (destroy)? (y/N): ": {
"fr": "Arrêt gracieux trop long. Forcer l'arrêt (destroy) ? (o/N) : ",
"en": "Graceful shutdown timed out. Force off (destroy)? (y/N): ",