]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
cephadm: make get_daemon_args private
authorJohn Mulligan <jmulligan@redhat.com>
Thu, 19 Oct 2023 20:25:17 +0000 (16:25 -0400)
committerJohn Mulligan <jmulligan@redhat.com>
Sat, 4 Nov 2023 18:53:06 +0000 (14:53 -0400)
The get_daemon_args function now only has one caller. To double check
that and to prepare for this function's eventual removal we prefix the
name with an underscore to take it private.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
src/cephadm/cephadm.py
src/cephadm/tests/test_cephadm.py

index f8b0243e37bcbfc774745dfdbec61784507f9fce..9a36360bf2dc7e5f23e700a71f7eb358549a4a01 100755 (executable)
@@ -2318,7 +2318,7 @@ def get_legacy_daemon_fsid(ctx, cluster,
     return fsid
 
 
-def get_daemon_args(ctx: CephadmContext, ident: 'DaemonIdentity') -> List[str]:
+def _get_daemon_args(ctx: CephadmContext, ident: 'DaemonIdentity') -> List[str]:
     r = list()  # type: List[str]
 
     daemon_type = ident.daemon_type
@@ -2847,7 +2847,7 @@ def get_container(
         ctx,
         ident=ident,
         entrypoint=entrypoint,
-        args=ceph_args + get_daemon_args(ctx, ident),
+        args=ceph_args + _get_daemon_args(ctx, ident),
         container_args=container_args,
         volume_mounts=get_container_mounts(ctx, ident),
         bind_mounts=get_container_binds(ctx, ident),
index f933e3bc4708d27dc4fec648561fc1062caaaab7..c12bb9ec5c91a027941d728f127bc2dd0b33c848 100644 (file)
@@ -1229,9 +1229,9 @@ class TestMonitoring(object):
         daemon_type = 'prometheus'
         daemon_id = 'home'
         fsid = 'aaf5a720-13fe-4a3b-82b9-2d99b7fd9704'
-        args = _cephadm.get_daemon_args(
+        args = _cephadm.Monitoring.create(
             ctx, _cephadm.DaemonIdentity(fsid, daemon_type, daemon_id)
-        )
+        ).get_daemon_args()
         assert any([x.startswith('--web.external-url=http://') for x in args])
 
     @mock.patch('cephadm.call')