src/rgw/setup/rgw.py
def _get_service_port(conf: MappedConf, protocol: str):
        """Return rgw service port value."""
        port = None
        endpoints = conf.get(const.SVC_ENDPOINT_KEY)
        if endpoints:
            svc_endpoints = list(filter(lambda x: urlparse(x).scheme == protocol, endpoints))
            port = urlparse(svc_endpoints[0]).port
            Log.info(f'{protocol} port value - {port}')
        else:
            # If endpoint is not present, use default port value.
            if protocol == 'http':
                port = const.DEFAULT_HTTP_PORT
            elif protocol == 'https':
                port = const.DEFAULT_HTTPS_PORT
            Log.info(f'{const.SVC_ENDPOINT_KEY} is not available in cluster.conf,'
                f' using the default value. {protocol} - {port}')
        return port
Return rgw service port value.
Return rgw service port value.
Return rgw service port value .
def _get_service_port(conf: MappedConf, protocol: str):
        port = None
        endpoints = conf.get(const.SVC_ENDPOINT_KEY)
        if endpoints:
            svc_endpoints = list(filter(lambda x: urlparse(x).scheme == protocol, endpoints))
            port = urlparse(svc_endpoints[0]).port
            Log.info(f'{protocol} port value - {port}')
        else:
            if protocol == 'http':
                port = const.DEFAULT_HTTP_PORT
            elif protocol == 'https':
                port = const.DEFAULT_HTTPS_PORT
            Log.info(f'{const.SVC_ENDPOINT_KEY} is not available in cluster.conf,'
                f' using the default value. {protocol} - {port}')
        return port
def _get_service_port ( conf : MappedConf , protocol : str ) : port = None endpoints = conf . get ( const . SVC_ENDPOINT_KEY ) if endpoints : svc_endpoints = list ( filter ( lambda x : urlparse ( x ) . scheme == protocol , endpoints ) ) port = urlparse ( svc_endpoints [ 0 ] ) . port Log . info ( f'{protocol} port value - {port}' ) else : if protocol == 'http' : port = const . DEFAULT_HTTP_PORT elif protocol == 'https' : port = const . DEFAULT_HTTPS_PORT Log . info ( f'{const.SVC_ENDPOINT_KEY} is not available in cluster.conf,' f' using the default value. {protocol} - {port}' ) return port
Return rgw service port value.
Return rgw service port value .
"""Return rgw service port value.""" # If endpoint is not present, use default port value.
conf
MappedConf
protocol
str