]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
cephadm: rename fetch_tcp_ports to fetch_endpoints
authorJohn Mulligan <jmulligan@redhat.com>
Tue, 26 Sep 2023 17:28:44 +0000 (13:28 -0400)
committerJohn Mulligan <jmulligan@redhat.com>
Tue, 26 Sep 2023 17:31:26 +0000 (13:31 -0400)
Rename fetch_tcp_ports to fetch_endpoints to more closely match what
the function is doing.

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

index 4287ab6f547f5b82939808f15dc93577cb93fa20..4e9227bdc63ef75a572ff97c188893986abad8a5 100755 (executable)
@@ -84,8 +84,8 @@ from cephadmlib.context import CephadmContext
 from cephadmlib.context_getters import (
     fetch_configs,
     fetch_custom_config_files,
+    fetch_endpoints,
     fetch_meta,
-    fetch_tcp_ports,
     get_config_and_keyring,
     get_parm,
     read_configuration_source,
@@ -315,7 +315,7 @@ class SNMPGateway:
 
     @property
     def port(self) -> int:
-        endpoints = fetch_tcp_ports(self.ctx)
+        endpoints = fetch_endpoints(self.ctx)
         if not endpoints:
             return self.DEFAULT_PORT
         return endpoints[0].port
@@ -5310,7 +5310,7 @@ def _common_deploy(ctx: CephadmContext) -> None:
     migrate_sysctl_dir(ctx, ctx.fsid)
 
     # Get and check ports explicitly required to be opened
-    endpoints = fetch_tcp_ports(ctx)
+    endpoints = fetch_endpoints(ctx)
     _dispatch_deploy(ctx, ident, endpoints, deployment_type)
 
 
@@ -6593,7 +6593,7 @@ def command_rm_daemon(ctx):
     else:
         call_throws(ctx, ['rm', '-rf', data_dir])
 
-    endpoints = fetch_tcp_ports(ctx)
+    endpoints = fetch_endpoints(ctx)
     ports: List[int] = [e.port for e in endpoints]
     if ports:
         try:
index e40319d47069007cafae6b581f6a699fd45a7cb9..8af6cbdd01e2aefd0240f1c0ca0fa4b9b3e9822e 100644 (file)
@@ -111,7 +111,7 @@ def fetch_custom_config_files(ctx: CephadmContext) -> List[Dict[str, Any]]:
     return []
 
 
-def fetch_tcp_ports(ctx: CephadmContext) -> List[EndPoint]:
+def fetch_endpoints(ctx: CephadmContext) -> List[EndPoint]:
     """Return a list of Endpoints, which have a port and ip attribute
     """
     ports = getattr(ctx, 'tcp_ports', None)