clan-cli: rename to init-hardware-config

This commit is contained in:
Qubasa
2025-09-24 16:46:21 +02:00
parent ac79bfb35f
commit ed069c48d3
5 changed files with 14 additions and 14 deletions

View File

@@ -220,7 +220,7 @@
clan_cmd = [
"${self.packages.${pkgs.system}.clan-cli-full}/bin/clan",
"machines",
"update-hardware-config",
"init-hardware-config",
"--debug",
"--flake", str(flake_dir),
"--yes", "test-install-machine-without-system",

View File

@@ -260,7 +260,7 @@ const CheckHardware = () => {
try {
// TODO: Debounce
const call = client.fetch("run_machine_hardware_info_kexec", {
const call = client.fetch("run_machine_hardware_info_init", {
target_host: {
address: store.install.targetHost,
port,

View File

@@ -4,7 +4,7 @@ import argparse
from .create import register_create_parser
from .delete import register_delete_parser
from .generations import register_generations_parser
from .hardware import register_kexec_hardware_config, register_update_hardware_config
from .hardware import register_init_hardware_config, register_update_hardware_config
from .install import register_install_parser
from .list import register_list_parser
from .morph import register_morph_parser
@@ -89,8 +89,8 @@ Examples:
)
register_list_parser(list_parser)
kexec_hardware_config_parser = subparser.add_parser(
"kexec-hardware-config",
init_hardware_config_parser = subparser.add_parser(
"init-hardware-config",
help="Generate hardware specifics for a machine",
description="""
@@ -106,7 +106,7 @@ The target must be a Linux based system reachable via SSH.
"""
Examples:
$ clan machines kexec-hardware-config [MACHINE] --target-host root@<ip>
$ clan machines init-hardware-config [MACHINE] --target-host root@<ip>
Will generate the facter.json hardware report for `[TARGET_HOST]` and place the result in facter.json for the given machine `[MACHINE]`.
For more detailed information, visit: https://docs.clan.lol/guides/getting-started/configure/#machine-configuration
@@ -114,7 +114,7 @@ For more detailed information, visit: https://docs.clan.lol/guides/getting-start
"""
),
)
register_kexec_hardware_config(kexec_hardware_config_parser)
register_init_hardware_config(init_hardware_config_parser)
update_hardware_config_parser = subparser.add_parser(
"update-hardware-config",
@@ -127,7 +127,7 @@ For more detailed information, visit: https://docs.clan.lol/guides/getting-start
"""
Examples:
$ clan machines kexec-hardware-config [MACHINE] --target-host root@<ip>
$ clan machines update-hardware-config [MACHINE] --target-host root@<ip>
Will generate the facter.json hardware report for `[TARGET_HOST]` and place the result in facter.json for the given machine `[MACHINE]`.
For more detailed information, visit: https://docs.clan.lol/guides/getting-started/configure/#machine-configuration

View File

@@ -7,7 +7,7 @@ from clan_lib.flake import require_flake
from clan_lib.machines.hardware import (
HardwareConfig,
HardwareGenerateOptions,
run_machine_hardware_info_kexec,
run_machine_hardware_info_init,
run_machine_hardware_info_update,
)
from clan_lib.machines.machines import Machine
@@ -60,7 +60,7 @@ def update_hardware_config_command(args: argparse.Namespace) -> None:
run_machine_hardware_info_update(opts, target_host)
def kexec_hardware_config_command(args: argparse.Namespace) -> None:
def init_hardware_config_command(args: argparse.Namespace) -> None:
flake = require_flake(args.flake)
validate_machine_names([args.machine], flake)
machine = Machine(flake=flake, name=args.machine)
@@ -97,11 +97,11 @@ def kexec_hardware_config_command(args: argparse.Namespace) -> None:
log.info("Aborted.")
return
run_machine_hardware_info_kexec(opts, target_host)
run_machine_hardware_info_init(opts, target_host)
def register_kexec_hardware_config(parser: argparse.ArgumentParser) -> None:
parser.set_defaults(func=kexec_hardware_config_command)
def register_init_hardware_config(parser: argparse.ArgumentParser) -> None:
parser.set_defaults(func=init_hardware_config_command)
machine_parser = parser.add_argument(
"machine",
help="the name of the machine",

View File

@@ -69,7 +69,7 @@ class HardwareGenerateOptions:
@API.register
def run_machine_hardware_info_kexec(
def run_machine_hardware_info_init(
opts: HardwareGenerateOptions,
target_host: Remote,
) -> HardwareConfig: