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,
@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
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)
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:
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)