Does Opendaylight SNMP-Set (SNMP Plugin) support integer type?

asked 2016-11-14 23:02:57 -0800

Yabolahan gravatar image

I have successfully managed to use opendaylight snmp-get REST API to get some configuration information from a network device. However, right now I have difficulty setting an integer value through snmp-set API.

The given example in the plugin documentation works on strings as follows:

{
               "input": {
                   "ip-address": "10.86.3.13",
                   "oid" : "1.3.6.1.2.1.1.1.0",
                   "value" : "Sample description",
                   "community" : "private"
               }   
     }

For my case, this is the json code (the focus on the "value" field):

{
               "input": {
                   "ip-address": "some IP addr",
                   "oid" : "some OID",
                   "value" : 255,
                   "community" : "private"
               }   
     }

This is the error that I get when try using with an integer value:

{
       "errors": {
           "error": [
               {
                   "error-type": "application",
                   "error-tag": "operation-failed",
                   "error-message": "SnmpSET failed with error status: 3, error index: 0. StatusText: Bad Value"
               }
           ]
       }
   }

Maybe I am doing something wrong or the integer type is not yet supported.

Any input is appreciated.

edit retag flag offensive close merge delete