summaryrefslogtreecommitdiffstats
path: root/src/cephadm/tests/test_unit_file.py
diff options
context:
space:
mode:
authorJohn Mulligan <jmulligan@redhat.com>2023-09-28 23:18:18 +0200
committerJohn Mulligan <jmulligan@redhat.com>2023-12-10 16:25:57 +0100
commiteaa6cbd39fb0e8c1259c0aa7e8a73cc8d65f3a29 (patch)
tree93df682ab6a2f34ce90898a4f6ff5482f4c7bb5e /src/cephadm/tests/test_unit_file.py
parentcephadm: update unit file test imports (diff)
downloadceph-eaa6cbd39fb0e8c1259c0aa7e8a73cc8d65f3a29.tar.xz
ceph-eaa6cbd39fb0e8c1259c0aa7e8a73cc8d65f3a29.zip
cephadm: add a higher-level function for managing systemd units
Add the function update_files to systemd_unit.py to encapsulate and abstract the details regarding the generation of system unit files. This will make it simpler in the future to add more advanced systemd configurations include managing customized unit files and systemd unit drop-in files. Some additional work was needed to update the recently added command_unit_install function. Because the new systemd_unit.update_files function requires a full daemon identity. The command_unit_install function now requires a daemon name. In addition, while testing this change it was found that the function could not have worked as it was because it required the fsid but neither used the infer_fsid decorator nor provided a `--fsid` argument. Both were added. Signed-off-by: John Mulligan <jmulligan@redhat.com>
Diffstat (limited to '')
-rw-r--r--src/cephadm/tests/test_unit_file.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cephadm/tests/test_unit_file.py b/src/cephadm/tests/test_unit_file.py
index ab24aab4e57..a1d49c93c20 100644
--- a/src/cephadm/tests/test_unit_file.py
+++ b/src/cephadm/tests/test_unit_file.py
@@ -24,7 +24,7 @@ _cephadm = import_cephadm()
def _get_unit_file(ctx, fsid):
- return str(systemd_unit.get_unit_file(ctx, fsid))
+ return str(systemd_unit._get_unit_file(ctx, fsid))
def test_docker_engine_requires_docker():