Exemple #1
0
def modify_hosts(host_filter_data, update_data):
    """
    :param host_filter_data: Filters out which hosts to modify.
    :param update_data: A dictionary with the changes to make to the hosts.
    """
    rpc_utils.check_modify_host(update_data)
    hosts = models.Host.query_objects(host_filter_data)
    for host in hosts:
        host.update_object(update_data)
Exemple #2
0
def modify_hosts(host_filter_data, update_data):
    """
    @param host_filter_data: Filters out which hosts to modify.
    @param update_data: A dictionary with the changes to make to the hosts.
    """
    rpc_utils.check_modify_host(update_data)
    hosts = models.Host.query_objects(host_filter_data)
    for host in hosts:
        host.update_object(update_data)
Exemple #3
0
def modify_host(id, **data):
    """
    Modify (update) host.

    :param id: Host identification.
    :param data: Fields to modify.
    :return: None.
    """
    rpc_utils.check_modify_host(data)
    host = models.Host.smart_get(id)
    rpc_utils.check_modify_host_locking(host, data)
    host.update_object(data)
Exemple #4
0
def modify_host(id, **data):
    """
    Modify (update) host.

    :param id: Host identification.
    :param data: Fields to modify.
    :return: None.
    """
    rpc_utils.check_modify_host(data)
    host = models.Host.smart_get(id)
    rpc_utils.check_modify_host_locking(host, data)
    host.update_object(data)
Exemple #5
0
def modify_host(id, **data):
    rpc_utils.check_modify_host(data)
    host = models.Host.smart_get(id)
    rpc_utils.check_modify_host_locking(host, data)
    host.update_object(data)
Exemple #6
0
def modify_host(id, **data):
    rpc_utils.check_modify_host(data)
    host = models.Host.smart_get(id)
    rpc_utils.check_modify_host_locking(host, data)
    host.update_object(data)