lib/modules: rename 'list_modules' to 'list_service_modules'
This commit is contained in:
@@ -15,7 +15,7 @@ from clan_lib.nix_models.clan import (
|
||||
)
|
||||
from clan_lib.persist.inventory_store import InventoryStore
|
||||
from clan_lib.persist.util import set_value_by_path
|
||||
from clan_lib.services.modules import list_modules
|
||||
from clan_lib.services.modules import list_service_modules
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from .age_keys import KeyPair
|
||||
@@ -27,7 +27,7 @@ from clan_lib.machines.machines import Machine as MachineMachine
|
||||
@pytest.mark.with_core
|
||||
def test_list_modules(test_flake_with_core: FlakeForTest) -> None:
|
||||
base_path = test_flake_with_core.path
|
||||
modules_info = list_modules(str(base_path))
|
||||
modules_info = list_service_modules(str(base_path))
|
||||
|
||||
assert "modules" in modules_info
|
||||
|
||||
|
||||
@@ -158,7 +158,7 @@ class ModuleList(TypedDict):
|
||||
|
||||
|
||||
@API.register
|
||||
def list_modules(base_path: str) -> ModuleList:
|
||||
def list_service_modules(base_path: str) -> ModuleList:
|
||||
"""
|
||||
Show information about a module
|
||||
"""
|
||||
|
||||
@@ -31,7 +31,7 @@ from clan_lib.nix_models.clan import (
|
||||
from clan_lib.nix_models.clan import InventoryMachineDeploy as MachineDeploy
|
||||
from clan_lib.persist.inventory_store import InventoryStore
|
||||
from clan_lib.persist.util import set_value_by_path
|
||||
from clan_lib.services.modules import list_modules
|
||||
from clan_lib.services.modules import list_service_modules
|
||||
from clan_lib.ssh.remote import Remote, check_machine_ssh_login
|
||||
from clan_lib.templates.disk import hw_main_disk_options, set_machine_disk_schema
|
||||
|
||||
@@ -206,7 +206,7 @@ def test_clan_create_api(
|
||||
store = InventoryStore(clan_dir_flake)
|
||||
inventory = store.read()
|
||||
|
||||
modules = list_modules(str(clan_dir_flake.path))
|
||||
modules = list_service_modules(str(clan_dir_flake.path))
|
||||
assert (
|
||||
modules["modules"]["clan-core"]["admin"]["manifest"]["name"]
|
||||
== "clan-core/admin"
|
||||
|
||||
@@ -41,7 +41,7 @@ TOP_LEVEL_RESOURCES = {
|
||||
"secret", # sops & key operations
|
||||
"log", # log operations
|
||||
"generator", # vars generators operations
|
||||
"module", # module (clan.service) management
|
||||
"service", # clan.service management
|
||||
"system", # system operations
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user