clan-cli: Move Machine object to clan_lib
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
import argparse
|
||||
import logging
|
||||
|
||||
from clan_lib.machines.machines import Machine
|
||||
|
||||
from clan_cli.completions import add_dynamic_completer, complete_machines
|
||||
from clan_cli.machines.machines import Machine
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ from tempfile import TemporaryDirectory
|
||||
from clan_lib.cmd import RunOpts, run
|
||||
from clan_lib.errors import ClanError
|
||||
from clan_lib.git import commit_files
|
||||
from clan_lib.machines.machines import Machine
|
||||
from clan_lib.nix import nix_shell
|
||||
|
||||
from clan_cli.completions import (
|
||||
@@ -18,7 +19,6 @@ from clan_cli.completions import (
|
||||
complete_services_for_machine,
|
||||
)
|
||||
from clan_cli.machines.list import list_machines
|
||||
from clan_cli.machines.machines import Machine
|
||||
|
||||
from .check import check_secrets
|
||||
from .public_modules import FactStoreBase
|
||||
|
||||
@@ -2,8 +2,9 @@ import argparse
|
||||
import json
|
||||
import logging
|
||||
|
||||
from clan_lib.machines.machines import Machine
|
||||
|
||||
from clan_cli.completions import add_dynamic_completer, complete_machines
|
||||
from clan_cli.machines.machines import Machine
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ from __future__ import annotations
|
||||
from abc import ABC, abstractmethod
|
||||
from pathlib import Path
|
||||
|
||||
import clan_cli.machines.machines as machines
|
||||
import clan_lib.machines.machines as machines
|
||||
|
||||
|
||||
class FactStoreBase(ABC):
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
from pathlib import Path
|
||||
|
||||
from clan_lib.errors import ClanError
|
||||
|
||||
from clan_cli.machines.machines import Machine
|
||||
from clan_lib.machines.machines import Machine
|
||||
|
||||
from . import FactStoreBase
|
||||
|
||||
|
||||
@@ -3,8 +3,7 @@ from pathlib import Path
|
||||
|
||||
from clan_lib.dirs import vm_state_dir
|
||||
from clan_lib.errors import ClanError
|
||||
|
||||
from clan_cli.machines.machines import Machine
|
||||
from clan_lib.machines.machines import Machine
|
||||
|
||||
from . import FactStoreBase
|
||||
|
||||
|
||||
@@ -3,10 +3,9 @@ from __future__ import annotations
|
||||
from abc import ABC, abstractmethod
|
||||
from pathlib import Path
|
||||
|
||||
import clan_lib.machines.machines as machines
|
||||
from clan_lib.ssh.remote import Remote
|
||||
|
||||
import clan_cli.machines.machines as machines
|
||||
|
||||
|
||||
class SecretStoreBase(ABC):
|
||||
@abstractmethod
|
||||
|
||||
@@ -4,11 +4,11 @@ from pathlib import Path
|
||||
from typing import override
|
||||
|
||||
from clan_lib.cmd import Log, RunOpts
|
||||
from clan_lib.machines.machines import Machine
|
||||
from clan_lib.nix import nix_shell
|
||||
from clan_lib.ssh.remote import Remote
|
||||
|
||||
from clan_cli.facts.secret_modules import SecretStoreBase
|
||||
from clan_cli.machines.machines import Machine
|
||||
|
||||
|
||||
class SecretStore(SecretStoreBase):
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
from pathlib import Path
|
||||
from typing import override
|
||||
|
||||
from clan_lib.machines.machines import Machine
|
||||
from clan_lib.ssh.remote import Remote
|
||||
|
||||
from clan_cli.machines.machines import Machine
|
||||
from clan_cli.secrets.folders import sops_secrets_folder
|
||||
from clan_cli.secrets.machines import add_machine, has_machine
|
||||
from clan_cli.secrets.secrets import decrypt_secret, encrypt_secret, has_secret
|
||||
|
||||
@@ -3,8 +3,7 @@ from pathlib import Path
|
||||
from typing import override
|
||||
|
||||
from clan_lib.dirs import vm_state_dir
|
||||
|
||||
from clan_cli.machines.machines import Machine
|
||||
from clan_lib.machines.machines import Machine
|
||||
|
||||
from . import SecretStoreBase
|
||||
|
||||
|
||||
@@ -3,8 +3,9 @@ import logging
|
||||
from pathlib import Path
|
||||
from tempfile import TemporaryDirectory
|
||||
|
||||
from clan_lib.machines.machines import Machine
|
||||
|
||||
from clan_cli.completions import add_dynamic_completer, complete_machines
|
||||
from clan_cli.machines.machines import Machine
|
||||
from clan_cli.ssh.upload import upload
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
Reference in New Issue
Block a user