util: move get_host_storage() to a separate module

Add a new util module called host which is used for functions that are
meant for interactions with the host.  These functions should not be
used in stages.

The containers.get_host_storage() function is renamed to
host.get_container_storage() for clarity, since it is no longer
namespaced under containers.
This commit is contained in:
Achilleas Koutsou 2024-08-15 14:32:30 +02:00 committed by Michael Vogt
parent bce908e4a2
commit 07a597481b
4 changed files with 24 additions and 22 deletions

View file

@ -15,7 +15,7 @@ import os
import sys
from osbuild import inputs
from osbuild.util import containers
from osbuild.util import host
from osbuild.util.mnt import MountGuard
SCHEMA = r"""
@ -89,7 +89,7 @@ class ContainersStorageInput(inputs.InputService):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.mg = MountGuard()
self.storage_conf = containers.get_host_storage()
self.storage_conf = host.get_container_storage()
def bind_mount_local_storage(self, target):
source = self.storage_conf["storage"]["graphroot"]