From 3125b13aa26248b1b98f15ad9eb3d8d0648ab10e Mon Sep 17 00:00:00 2001 From: jonct <2807816+jonct@users.noreply.github.com> Date: Mon, 15 Jul 2024 03:57:47 -0400 Subject: [PATCH] Rename dataset utils --- src/jlmkr/actions/create.py | 6 +++--- src/jlmkr/actions/edit.py | 4 ++-- src/jlmkr/actions/list.py | 2 +- src/jlmkr/actions/remove.py | 4 ++-- src/jlmkr/actions/start.py | 4 ++-- src/jlmkr/actions/stop.py | 2 +- src/jlmkr/donor/jlmkr.py | 12 ++++++------ src/jlmkr/utils/{jail_dataset.py => dataset.py} | 0 src/jlmkr/utils/gpu.py | 2 +- 9 files changed, 18 insertions(+), 18 deletions(-) rename src/jlmkr/utils/{jail_dataset.py => dataset.py} (100%) diff --git a/src/jlmkr/actions/create.py b/src/jlmkr/actions/create.py index b91fe6a..5109d2b 100644 --- a/src/jlmkr/actions/create.py +++ b/src/jlmkr/actions/create.py @@ -15,9 +15,9 @@ from utils.config_parser import KeyValueParser, DEFAULT_CONFIG from utils.console import YELLOW, BOLD, NORMAL, eprint from utils.download import run_lxc_download_script from utils.files import stat_chmod, get_mount_point -from utils.jail_dataset import check_jail_name_valid, check_jail_name_available -from utils.jail_dataset import get_jail_config_path, get_jail_rootfs_path -from utils.jail_dataset import get_jail_path, get_zfs_dataset, create_zfs_dataset, cleanup +from utils.dataset import check_jail_name_valid, check_jail_name_available +from utils.dataset import get_jail_config_path, get_jail_rootfs_path +from utils.dataset import get_jail_path, get_zfs_dataset, create_zfs_dataset, cleanup from utils.paths import COMMAND_NAME, JAILS_DIR_PATH, SCRIPT_NAME, SCRIPT_DIR_PATH diff --git a/src/jlmkr/actions/edit.py b/src/jlmkr/actions/edit.py index fd5f03c..aecd040 100644 --- a/src/jlmkr/actions/edit.py +++ b/src/jlmkr/actions/edit.py @@ -7,8 +7,8 @@ import subprocess from utils.console import eprint from utils.editor import get_text_editor -from utils.jail_dataset import check_jail_name_valid, check_jail_name_available -from utils.jail_dataset import get_jail_config_path, jail_is_running +from utils.dataset import check_jail_name_valid, check_jail_name_available +from utils.dataset import get_jail_config_path, jail_is_running def edit_jail(jail_name): diff --git a/src/jlmkr/actions/list.py b/src/jlmkr/actions/list.py index a0b9fad..c444cc6 100644 --- a/src/jlmkr/actions/list.py +++ b/src/jlmkr/actions/list.py @@ -8,7 +8,7 @@ import subprocess from collections import defaultdict from utils.console import NORMAL, UNDERLINE from utils.config_parser import parse_config_file -from utils.jail_dataset import get_all_jail_names, get_jail_config_path, get_jail_rootfs_path, parse_os_release +from utils.dataset import get_all_jail_names, get_jail_config_path, get_jail_rootfs_path, parse_os_release def list_jails(): diff --git a/src/jlmkr/actions/remove.py b/src/jlmkr/actions/remove.py index 0cf2673..28588f9 100644 --- a/src/jlmkr/actions/remove.py +++ b/src/jlmkr/actions/remove.py @@ -3,8 +3,8 @@ # SPDX-License-Identifier: LGPL-3.0-only from actions.stop import stop_jail -from utils.jail_dataset import check_jail_name_valid, check_jail_name_available -from utils.jail_dataset import get_jail_path, cleanup +from utils.dataset import check_jail_name_valid, check_jail_name_available +from utils.dataset import get_jail_path, cleanup from utils.console import eprint diff --git a/src/jlmkr/actions/start.py b/src/jlmkr/actions/start.py index abe50d9..790f5c2 100644 --- a/src/jlmkr/actions/start.py +++ b/src/jlmkr/actions/start.py @@ -13,8 +13,8 @@ from utils.config_parser import parse_config_file from utils.console import eprint from utils.files import stat_chmod from utils.gpu import passthrough_intel, passthrough_nvidia -from utils.jail_dataset import get_jail_path, jail_is_running -from utils.jail_dataset import get_jail_config_path, get_jail_rootfs_path +from utils.dataset import get_jail_path, jail_is_running +from utils.dataset import get_jail_config_path, get_jail_rootfs_path from utils.paths import SHORTNAME, JAIL_ROOTFS_NAME diff --git a/src/jlmkr/actions/stop.py b/src/jlmkr/actions/stop.py index 9babdb4..71e3d87 100644 --- a/src/jlmkr/actions/stop.py +++ b/src/jlmkr/actions/stop.py @@ -6,7 +6,7 @@ import subprocess import time from utils.console import eprint -from utils.jail_dataset import jail_is_running +from utils.dataset import jail_is_running def stop_jail(jail_name): diff --git a/src/jlmkr/donor/jlmkr.py b/src/jlmkr/donor/jlmkr.py index 3a839b2..8fa2a5f 100755 --- a/src/jlmkr/donor/jlmkr.py +++ b/src/jlmkr/donor/jlmkr.py @@ -69,8 +69,8 @@ class CustomSubParser(argparse.ArgumentParser): from utils.chroot import Chroot from utils.console import eprint, fail -from utils.jail_dataset import check_jail_name_valid, check_jail_name_available -from utils.jail_dataset import get_jail_path, get_jail_config_path, get_jail_rootfs_path +from utils.dataset import check_jail_name_valid, check_jail_name_available +from utils.dataset import get_jail_path, get_jail_config_path, get_jail_rootfs_path from actions.exec import exec_jail from actions.status import status_jail @@ -80,20 +80,20 @@ from actions.start import start_jail from actions.restart import restart_jail from actions.images import run_lxc_download_script -from utils.jail_dataset import cleanup, check_jail_name_valid, check_jail_name_available +from utils.dataset import cleanup, check_jail_name_valid, check_jail_name_available from utils.download import run_lxc_download_script from utils.files import stat_chmod -from utils.jail_dataset import get_zfs_dataset, create_zfs_dataset, remove_zfs_dataset +from utils.dataset import get_zfs_dataset, create_zfs_dataset, remove_zfs_dataset from actions.create import create_jail from utils.editor import get_text_editor -from utils.jail_dataset import jail_is_running +from utils.dataset import jail_is_running from actions.edit import edit_jail from actions.stop import stop_jail from actions.remove import remove_jail -from utils.jail_dataset import get_all_jail_names, parse_os_release +from utils.dataset import get_all_jail_names, parse_os_release from actions.list import list_jails diff --git a/src/jlmkr/utils/jail_dataset.py b/src/jlmkr/utils/dataset.py similarity index 100% rename from src/jlmkr/utils/jail_dataset.py rename to src/jlmkr/utils/dataset.py diff --git a/src/jlmkr/utils/gpu.py b/src/jlmkr/utils/gpu.py index b71c3ae..8ff1151 100644 --- a/src/jlmkr/utils/gpu.py +++ b/src/jlmkr/utils/gpu.py @@ -8,7 +8,7 @@ import subprocess from pathlib import Path from textwrap import dedent from utils.console import eprint -from utils.jail_dataset import get_jail_rootfs_path +from utils.dataset import get_jail_rootfs_path from utils.paths import SHORTNAME