def agent_settings(name, contact, location, services=None):
    '''
    Manage the SNMP sysContact, sysLocation, and sysServices settings.

    :param str contact: The SNMP contact.
    :param str location: The SNMP location.
    :param str services: A list of selected services.

    Example of usage:

    .. code-block:: yaml

        snmp-agent-settings:
            win_snmp.agent_settings:
                - contact: Test Contact
                - location: Test Location
                - services:
                    - Physical
                    - Internet
    '''
    ret = {'name': name,
           'changes': {},
           'comment': six.text_type(),
           'result': None}

    ret_settings = {'changes': dict(),
                    'failures': dict()}

    if not services:
        services = ['None']

    # Filter services for unique items, and sort them for comparison purposes.
    services = sorted(set(services))

    settings = {'contact': contact, 'location': location, 'services': services}

    current_settings = __salt__['win_snmp.get_agent_settings']()

    for setting in settings:
        if six.text_type(settings[setting]) != six.text_type(current_settings[setting]):
            ret_settings['changes'][setting] = {'old': current_settings[setting],
                                                'new': settings[setting]}
    if not ret_settings['changes']:
        ret['comment'] = 'Agent settings already contain the provided values.'
        ret['result'] = True
        return ret
    elif __opts__['test']:
        ret['comment'] = 'Agent settings will be changed.'
        ret['changes'] = ret_settings
        return ret

    __salt__['win_snmp.set_agent_settings'](**settings)
    new_settings = __salt__['win_snmp.get_agent_settings']()

    for setting in settings:
        if settings[setting] != new_settings[setting]:
            ret_settings['failures'][setting] = {'old': current_settings[setting],
                                                 'new': new_settings[setting]}
            ret_settings['changes'].pop(setting, None)

    if ret_settings['failures']:
        ret['comment'] = 'Some agent settings failed to change.'
        ret['changes'] = ret_settings
        ret['result'] = False
    else:
        ret['comment'] = 'Set agent settings to contain the provided values.'
        ret['changes'] = ret_settings['changes']
        ret['result'] = True
    return ret
Manage the SNMP sysContact, sysLocation, and sysServices settings.

    :param str contact: The SNMP contact.
    :param str location: The SNMP location.
    :param str services: A list of selected services.

    Example of usage:

    .. code-block:: yaml

        snmp-agent-settings:
            win_snmp.agent_settings:
                - contact: Test Contact
                - location: Test Location
                - services:
                    - Physical
                    - Internet