예제 #1
0
def update(params):
    """Update a host group"""
    name = params["name"]
    group = fetch_group(name, "host")
    constructors.require_etag(constructors.etag_of_dict(group))
    edit_group(name, "host", updated_group_details(name, "host", params["body"]))
    group = fetch_group(name, "host")
    return serve_group(group, serialize_group("host_group_config"))
예제 #2
0
def update(params):
    """Update a contact group"""
    name = params['name']
    group = fetch_group(name, "contact")
    constructors.require_etag(constructors.etag_of_dict(group))
    edit_group(name, 'contact',
               updated_group_details(name, 'contact', params['body']))
    group = fetch_group(name, "contact")
    return serve_group(group, serialize_group('contact_group_config'))
예제 #3
0
def update(params):
    """Update a contact group"""
    user.need_permission("wato.edit")
    name = params["name"]
    group = fetch_group(name, "contact")
    constructors.require_etag(constructors.etag_of_dict(group))
    edit_group(name, "contact",
               updated_group_details(name, "contact", params["body"]))
    group = fetch_group(name, "contact")
    return serve_group(group, serialize_group("contact_group_config"))