CLI: Use API functions

This commit is contained in:
Qubasa
2023-10-02 15:36:02 +02:00
parent 29efda9608
commit 6640c78089
12 changed files with 259 additions and 149 deletions

View File

@@ -1,12 +1,16 @@
import argparse
import logging
import os
from .folders import machines_folder
from .types import validate_hostname
log = logging.getLogger(__name__)
def list_machines() -> list[str]:
path = machines_folder()
log.debug(f"Listing machines in {path}")
if not path.exists():
return []
objs: list[str] = []