From 2f8b22685065f25183133431502322decede6371 Mon Sep 17 00:00:00 2001 From: Trae Santiago Date: Thu, 14 Dec 2023 05:42:48 -0600 Subject: T5827: made show system image alphabetical --- src/op_mode/image_manager.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/op_mode/image_manager.py b/src/op_mode/image_manager.py index e75485f9f..e1c788940 100755 --- a/src/op_mode/image_manager.py +++ b/src/op_mode/image_manager.py @@ -157,6 +157,8 @@ def rename_image(name_old: str, name_new: str) -> None: def list_images() -> None: """Print list of available images for CLI hints""" images_list: list[str] = grub.version_list() + image_list.sort() + for image_name in images_list: print(image_name) -- cgit v1.2.3 From d2b29be237b790bb1a258647adf30c8b96c0b526 Mon Sep 17 00:00:00 2001 From: Trae Santiago Date: Thu, 14 Dec 2023 05:46:55 -0600 Subject: T5827: made show system image alphabetical --- src/op_mode/image_manager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/op_mode/image_manager.py b/src/op_mode/image_manager.py index e1c788940..76e414239 100755 --- a/src/op_mode/image_manager.py +++ b/src/op_mode/image_manager.py @@ -157,7 +157,7 @@ def rename_image(name_old: str, name_new: str) -> None: def list_images() -> None: """Print list of available images for CLI hints""" images_list: list[str] = grub.version_list() - image_list.sort() + images_list.sort() for image_name in images_list: print(image_name) -- cgit v1.2.3 From d01aba1f5055cdaa43c8429a2c13580679ec12f7 Mon Sep 17 00:00:00 2001 From: Trae Santiago Date: Thu, 14 Dec 2023 06:07:21 -0600 Subject: T5827: moved sys image sort to grub version_list --- python/vyos/system/grub.py | 2 ++ src/op_mode/image_manager.py | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/python/vyos/system/grub.py b/python/vyos/system/grub.py index 0ac16af9a..4ebf229a0 100644 --- a/python/vyos/system/grub.py +++ b/python/vyos/system/grub.py @@ -138,6 +138,8 @@ def version_list(root_dir: str = '') -> list[str]: versions_list: list[str] = [] for file in versions_files: versions_list.append(file.stem) + versions_list.sort() + return versions_list diff --git a/src/op_mode/image_manager.py b/src/op_mode/image_manager.py index 76e414239..e75485f9f 100755 --- a/src/op_mode/image_manager.py +++ b/src/op_mode/image_manager.py @@ -157,8 +157,6 @@ def rename_image(name_old: str, name_new: str) -> None: def list_images() -> None: """Print list of available images for CLI hints""" images_list: list[str] = grub.version_list() - images_list.sort() - for image_name in images_list: print(image_name) -- cgit v1.2.3 From a30c85f14bd6c8480983d293a51423ad08ee1ed0 Mon Sep 17 00:00:00 2001 From: Trae Santiago Date: Thu, 14 Dec 2023 06:19:37 -0600 Subject: T5827: reversed version listing --- python/vyos/system/grub.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/vyos/system/grub.py b/python/vyos/system/grub.py index 4ebf229a0..2692aaea1 100644 --- a/python/vyos/system/grub.py +++ b/python/vyos/system/grub.py @@ -138,7 +138,7 @@ def version_list(root_dir: str = '') -> list[str]: versions_list: list[str] = [] for file in versions_files: versions_list.append(file.stem) - versions_list.sort() + versions_list.sort(reverse=True) return versions_list -- cgit v1.2.3