def get_config_id(ctx: click.Context, mor: Dict[(str, Any)], config: str) -> str:
    'Get the remote access configuration id matching a specific type\n    from a device managed object\n\n    Args:\n        mor (Dict[str, Any]): Device managed object\n        config (str): Expected configuration type\n\n    Returns:\n        str: Remote access configuration id\n    '
    device_name = mor.get('name', '<<empty_name>>')
    if (REMOTE_ACCESS_FRAGMENT not in mor):
        logging.error('No Remote Access Configuration has been found for device "%s"', device_name)
        ctx.exit(ExitCodes.DEVICE_MISSING_REMOTE_ACCESS_FRAGMENT)
    valid_configs = [item for item in mor.get(REMOTE_ACCESS_FRAGMENT, []) if (item.get('protocol') == PASSTHROUGH)]
    if (not valid_configs):
        logging.error('No config with protocol set to "%s" has been found for device "%s"', PASSTHROUGH, device_name)
        ctx.exit(ExitCodes.DEVICE_NO_PASSTHROUGH_CONFIG)

    def extract_config_id(matching_config):
        logging.info('Using Configuration with Name "%s" and Remote Port %s', matching_config.get('name'), matching_config.get('port'))
        return matching_config.get('id')
    if (not config):
        return extract_config_id(valid_configs[0])
    matches = [item for item in valid_configs if (item.get('name', '').casefold() == config.casefold())]
    if (not matches):
        logging.error('Provided config name "%s" for "%s" was not found or none with protocal set to "%s"', config, device_name, PASSTHROUGH)
        ctx.exit(ExitCodes.DEVICE_NO_MATCHING_PASSTHROUGH_CONFIG)
    return extract_config_id(matches[0])
Get the remote access configuration id matching a specific type
from a device managed object

Args:
    mor (Dict[str, Any]): Device managed object
    config (str): Expected configuration type

Returns:
    str: Remote access configuration id
def get_config_id(ctx: click.Context, mor: Dict[(str, Any)], config: str) -> str:
    'Get the remote access configuration id matching a specific type\n    from a device managed object\n\n    Args:\n        mor (Dict[str, Any]): Device managed object\n        config (str): Expected configuration type\n\n    Returns:\n        str: Remote access configuration id\n    '
    device_name = mor.get('name', '<<empty_name>>')
    if (REMOTE_ACCESS_FRAGMENT not in mor):
        logging.error('No Remote Access Configuration has been found for device "%s"', device_name)
        ctx.exit(ExitCodes.DEVICE_MISSING_REMOTE_ACCESS_FRAGMENT)
    valid_configs = [item for item in mor.get(REMOTE_ACCESS_FRAGMENT, []) if (item.get('protocol') == PASSTHROUGH)]
    if (not valid_configs):
        logging.error('No config with protocol set to "%s" has been found for device "%s"', PASSTHROUGH, device_name)
        ctx.exit(ExitCodes.DEVICE_NO_PASSTHROUGH_CONFIG)

    def extract_config_id(matching_config):
        logging.info('Using Configuration with Name "%s" and Remote Port %s', matching_config.get('name'), matching_config.get('port'))
        return matching_config.get('id')
    if (not config):
        return extract_config_id(valid_configs[0])
    matches = [item for item in valid_configs if (item.get('name', ).casefold() == config.casefold())]
    if (not matches):
        logging.error('Provided config name "%s" for "%s" was not found or none with protocal set to "%s"', config, device_name, PASSTHROUGH)
        ctx.exit(ExitCodes.DEVICE_NO_MATCHING_PASSTHROUGH_CONFIG)
    return extract_config_id(matches[0])