Esempio n. 1
0
def bulk_update(params):
    """Bulk update host-groups"""
    body = params['body']
    entries = body['entries']
    updated_contact_groups = update_groups("contact", entries)
    return constructors.serve_json(
        serialize_group_list('contact_group_config', updated_contact_groups))
Esempio n. 2
0
def bulk_update(params):
    """Bulk update service-groups"""
    body = params['body']
    entries = body['entries']
    updated_service_groups = update_groups("service", entries)
    return constructors.serve_json(
        serialize_group_list('service_group_config', updated_service_groups))
Esempio n. 3
0
def bulk_update(params):
    """Bulk update host groups

    Please be aware that when doing bulk updates, it is not possible to prevent the
    [Updating Values]("lost update problem"), which is normally prevented by the ETag locking
    mechanism. Use at your own risk
    """
    body = params["body"]
    entries = body["entries"]
    updated_host_groups = update_groups("host", entries)
    return constructors.serve_json(serialize_group_list("host_group_config", updated_host_groups))