Configure SNMP

    CLI Example:

    .. code-block:: bash

        salt '*' ilo.configure_snmp [COMMUNITY STRING] [SNMP PORT] [SNMP TRAP PORT]

def configure_snmp(community, snmp_port=161, snmp_trapport=161):
    '''
    Configure SNMP

    CLI Example:

    .. code-block:: bash

        salt '*' ilo.configure_snmp [COMMUNITY STRING] [SNMP PORT] [SNMP TRAP PORT]
    '''
    _xml = """<RIBCL VERSION="2.2">
                <LOGIN USER_LOGIN="x" PASSWORD="y">
                  <RIB_INFO mode="write">
                    <MOD_GLOBAL_SETTINGS>
                      <SNMP_ACCESS_ENABLED VALUE="Yes"/>
                      <SNMP_PORT VALUE="{0}"/>
                      <SNMP_TRAP_PORT VALUE="{1}"/>
                    </MOD_GLOBAL_SETTINGS>

                   <MOD_SNMP_IM_SETTINGS>
                     <SNMP_ADDRESS_1 VALUE=""/>
                     <SNMP_ADDRESS_1_ROCOMMUNITY VALUE="{2}"/>
                     <SNMP_ADDRESS_1_TRAPCOMMUNITY VERSION="" VALUE=""/>
                     <RIB_TRAPS VALUE="Y"/>
                     <OS_TRAPS VALUE="Y"/>
                     <SNMP_PASSTHROUGH_STATUS VALUE="N"/>
                  </MOD_SNMP_IM_SETTINGS>
                </RIB_INFO>
              </LOGIN>
           </RIBCL>""".format(snmp_port, snmp_trapport, community)

    return __execute_cmd('Configure_SNMP', _xml)