def get_egress_lossless_buffer_size(host_ans):
    """
    Get egress lossless buffer size of a switch

    Args:
        host_ans: Ansible host instance of the device

    Returns:
        total switch buffer size in byte (int)
    """
    config_facts = host_ans.config_facts(host=host_ans.hostname,
                                         source="running")['ansible_facts']

    if "BUFFER_POOL" not in config_facts.keys():
        return None

    buffer_pools = config_facts['BUFFER_POOL']
    profile_name = 'egress_lossless_pool'

    if profile_name not in buffer_pools.keys():
        return None

    egress_lossless_pool = buffer_pools[profile_name]
    return int(egress_lossless_pool['size'])