9 The SNMP Plugin can be installed using a single karaf feature:
14 - Install the feature: **feature:install odl-snmp-plugin**
16 - Expose the northbound API: **feature:install odl-restconf**
21 There are two exposed northbound APIs: snmp-get & snmp-set
26 Default URL: http://localhost:8181/restconf/operations/snmp:snmp-get
31 +----------------+----------------+----------------+----------------+----------------+
32 | Field Name | Type | Description | Example | Required? |
33 +================+================+================+================+================+
34 | ip-address | Ipv4 Address | The IPv4 | 10.86.3.13 | Yes |
35 | | | Address of the | | |
37 | | | network node | | |
38 +----------------+----------------+----------------+----------------+----------------+
39 | oid | String | The Object | 1.3.6.1.2.1.1. | Yes |
40 | | | Identifier of | 1 | |
41 | | | the desired | | |
43 | | | table/object | | |
44 +----------------+----------------+----------------+----------------+----------------+
45 | get-type | ENUM (GET, | The type of | GET-BULK | Yes |
46 | | GET-NEXT, | get request to | | |
47 | | GET-BULK, | send | | |
49 +----------------+----------------+----------------+----------------+----------------+
50 | community | String | The community | private | No. (Default: |
51 | | | string to use | | public) |
52 | | | for the SNMP | | |
54 +----------------+----------------+----------------+----------------+----------------+
62 "ip-address": "10.86.3.13",
63 "oid" : "1.3.6.1.2.1.1.1",
64 "get-type" : "GET-BULK",
65 "community" : "private"
72 +--------------------------+--------------------------+--------------------------+
73 | Field Name | Type | Description |
74 +==========================+==========================+==========================+
75 | results | List of { "value" : | The results of the SNMP |
76 | | String } pairs | query |
77 +--------------------------+--------------------------+--------------------------+
86 "value": "Ethernet0/0/0",
87 "oid": "1.3.6.1.2.1.2.2.1.2.1"
90 "value": "FastEthernet0/0/0",
91 "oid": "1.3.6.1.2.1.2.2.1.2.2"
94 "value": "GigabitEthernet0/0/0",
95 "oid": "1.3.6.1.2.1.2.2.1.2.3"
103 Default URL: http://localhost:8181/restconf/operations/snmp:snmp-set
108 +----------------+----------------+----------------+----------------+----------------+
109 | Field Name | Type | Description | Example | Required? |
110 +================+================+================+================+================+
111 | ip-address | Ipv4 Address | The Ipv4 | 10.86.3.13 | Yes |
112 | | | address of the | | |
114 | | | network node | | |
115 +----------------+----------------+----------------+----------------+----------------+
116 | oid | String | The Object | 1.3.6.2.1.1.1 | Yes |
117 | | | Identifier of | | |
118 | | | the desired | | |
119 | | | MIB object | | |
120 +----------------+----------------+----------------+----------------+----------------+
121 | value | String | The value to | "Hello World" | Yes |
122 | | | set on the | | |
123 | | | network device | | |
124 +----------------+----------------+----------------+----------------+----------------+
125 | community | String | The community | private | No. (Default: |
126 | | | string to use | | public) |
127 | | | for the SNMP | | |
129 +----------------+----------------+----------------+----------------+----------------+
137 "ip-address": "10.86.3.13",
138 "oid" : "1.3.6.1.2.1.1.1.0",
139 "value" : "Sample description",
140 "community" : "private"
147 On a successful SNMP-SET, no output is presented, just a HTTP status of
153 If any errors happen in the set request, you will be presented with an
154 error message in the output.
156 For example, on a failed set request you may see an error like:
164 "error-type": "application",
165 "error-tag": "operation-failed",
166 "error-message": "SnmpSET failed with error status: 17, error index: 1. StatusText: Not writable"
172 which corresponds to Error status 17 in the SNMPv2 RFC:
173 https://tools.ietf.org/html/rfc1905.