def configure_snmp(community, snmp_port=161, snmp_trapport=161):
 _xml = '<RIBCL VERSION="2.2">\n                <LOGIN USER_LOGIN="x" PASSWORD="y">\n                  <RIB_INFO mode="write">\n                    <MOD_GLOBAL_SETTINGS>\n                      <SNMP_ACCESS_ENABLED VALUE="Yes"/>\n                      <SNMP_PORT VALUE="{0}"/>\n                      <SNMP_TRAP_PORT VALUE="{1}"/>\n                    </MOD_GLOBAL_SETTINGS>\n\n                   <MOD_SNMP_IM_SETTINGS>\n                     <SNMP_ADDRESS_1 VALUE=""/>\n                     <SNMP_ADDRESS_1_ROCOMMUNITY VALUE="{2}"/>\n                     <SNMP_ADDRESS_1_TRAPCOMMUNITY VERSION="" VALUE=""/>\n                     <RIB_TRAPS VALUE="Y"/>\n                     <OS_TRAPS VALUE="Y"/>\n                     <SNMP_PASSTHROUGH_STATUS VALUE="N"/>\n                  </MOD_SNMP_IM_SETTINGS>\n                </RIB_INFO>\n              </LOGIN>\n           </RIBCL>'.format(snmp_port, snmp_trapport, community)
 return __execute_cmd('Configure_SNMP', _xml)

def configure_snmp ( community , snmp_port = 161 , snmp_trapport = 161 ) : _xml = '<RIBCL VERSION="2.2">\n                <LOGIN USER_LOGIN="x" PASSWORD="y">\n                  <RIB_INFO mode="write">\n                    <MOD_GLOBAL_SETTINGS>\n                      <SNMP_ACCESS_ENABLED VALUE="Yes"/>\n                      <SNMP_PORT VALUE="{0}"/>\n                      <SNMP_TRAP_PORT VALUE="{1}"/>\n                    </MOD_GLOBAL_SETTINGS>\n\n                   <MOD_SNMP_IM_SETTINGS>\n                     <SNMP_ADDRESS_1 VALUE=""/>\n                     <SNMP_ADDRESS_1_ROCOMMUNITY VALUE="{2}"/>\n                     <SNMP_ADDRESS_1_TRAPCOMMUNITY VERSION="" VALUE=""/>\n                     <RIB_TRAPS VALUE="Y"/>\n                     <OS_TRAPS VALUE="Y"/>\n                     <SNMP_PASSTHROUGH_STATUS VALUE="N"/>\n                  </MOD_SNMP_IM_SETTINGS>\n                </RIB_INFO>\n              </LOGIN>\n           </RIBCL>' . format ( snmp_port , snmp_trapport , community ) return __execute_cmd ( 'Configure_SNMP' , _xml )
configure snmp cli example: .