def set_relay_ip_list(addresses=None, server=_DEFAULT_SERVER):
    setting = 'RelayIpList'
    formatted_addresses = list()

    current_addresses = get_relay_ip_list(server)

    if list(addresses) == current_addresses:
        _LOG.debug('%s already contains the provided addresses.', setting)
        return True

    if addresses:
        # The WMI input data needs to be in the format used by RelayIpList. Order
        # is also important due to the way RelayIpList orders the address list.

        if addresses[0] is None:
            formatted_addresses = None
        else:
            for address in addresses:
                for octet in address.split('.'):
                    formatted_addresses.append(octet)

    _LOG.debug('Formatted %s addresses: %s', setting, formatted_addresses)

    _set_wmi_setting('IIsSmtpServerSetting', setting, formatted_addresses, server)

    new_addresses = get_relay_ip_list(server)

    ret = list(addresses) == new_addresses

    if ret:
        _LOG.debug('%s configured successfully: %s', setting, addresses)
        return ret
    _LOG.error('Unable to configure %s with value: %s', setting, addresses)
    return ret
Either updates an existing resource or creates a new one with the
dataset/ETHPy150Open saltstack/salt/salt/modules/win_smtp_server.py/set_relay_ip_list--crossover with--dataset/ETHPy150Open mozilla/inventory/vendor-local/src/django-tastypie/tastypie/resources.py/Resource.put_detail