def set_domains(dns_provider, domains):
    """
    Increments pending certificate attempt counter and updates it in the database.
    """
    dns_provider.domains = domains
    database.update(dns_provider)
    return dns_provider

    Increments pending certificate attempt counter and updates it in the database.
    
lemur/dns_providers/service.py