def check_if_ip_exists(com, server, ip):
    """Check if an ip exists on the server"""

    for vm in com.getNodeContainerIndex(server.proxmox_node_name)['data']:
        if vm['ip'] == ip:
            return False

    return True