7 The SNMP Plugin can be installed using a single karaf feature:
12 - Install the feature: **feature:install odl-snmp-plugin**
14 - Expose the northbound API: **feature:install odl-restconf**
19 There are two exposed northbound APIs: snmp-get & snmp-set
24 Default URL: http://localhost:8181/restconf/operations/snmp:snmp-get
29 +----------------+----------------+----------------+----------------+----------------+
30 | Field Name | Type | Description | Example | Required? |
31 +================+================+================+================+================+
32 | ip-address | Ipv4 Address | The IPv4 | 10.86.3.13 | Yes |
33 | | | Address of the | | |
35 | | | network node | | |
36 +----------------+----------------+----------------+----------------+----------------+
37 | oid | String | The Object | 1.3.6.1.2.1.1. | Yes |
38 | | | Identifier of | 1 | |
39 | | | the desired | | |
41 | | | table/object | | |
42 +----------------+----------------+----------------+----------------+----------------+
43 | get-type | ENUM (GET, | The type of | GET-BULK | Yes |
44 | | GET-NEXT, | get request to | | |
45 | | GET-BULK, | send | | |
47 +----------------+----------------+----------------+----------------+----------------+
48 | community | String | The community | private | No. (Default: |
49 | | | string to use | | public) |
50 | | | for the SNMP | | |
52 +----------------+----------------+----------------+----------------+----------------+
60 "ip-address": "10.86.3.13",
61 "oid" : "1.3.6.1.2.1.1.1",
62 "get-type" : "GET-BULK",
63 "community" : "private"
70 +--------------------------+--------------------------+--------------------------+
71 | Field Name | Type | Description |
72 +==========================+==========================+==========================+
73 | results | List of { "value" : | The results of the SNMP |
74 | | String } pairs | query |
75 +--------------------------+--------------------------+--------------------------+
84 "value": "Ethernet0/0/0",
85 "oid": "1.3.6.1.2.1.2.2.1.2.1"
88 "value": "FastEthernet0/0/0",
89 "oid": "1.3.6.1.2.1.2.2.1.2.2"
92 "value": "GigabitEthernet0/0/0",
93 "oid": "1.3.6.1.2.1.2.2.1.2.3"
101 Default URL: http://localhost:8181/restconf/operations/snmp:snmp-set
106 +----------------+----------------+----------------+----------------+----------------+
107 | Field Name | Type | Description | Example | Required? |
108 +================+================+================+================+================+
109 | ip-address | Ipv4 Address | The Ipv4 | 10.86.3.13 | Yes |
110 | | | address of the | | |
112 | | | network node | | |
113 +----------------+----------------+----------------+----------------+----------------+
114 | oid | String | The Object | 1.3.6.2.1.1.1 | Yes |
115 | | | Identifier of | | |
116 | | | the desired | | |
117 | | | MIB object | | |
118 +----------------+----------------+----------------+----------------+----------------+
119 | value | String | The value to | "Hello World" | Yes |
120 | | | set on the | | |
121 | | | network device | | |
122 +----------------+----------------+----------------+----------------+----------------+
123 | community | String | The community | private | No. (Default: |
124 | | | string to use | | public) |
125 | | | for the SNMP | | |
127 +----------------+----------------+----------------+----------------+----------------+
135 "ip-address": "10.86.3.13",
136 "oid" : "1.3.6.1.2.1.1.1.0",
137 "value" : "Sample description",
138 "community" : "private"
145 On a successful SNMP-SET, no output is presented, just a HTTP status of
151 If any errors happen in the set request, you will be presented with an
152 error message in the output.
154 For example, on a failed set request you may see an error like:
162 "error-type": "application",
163 "error-tag": "operation-failed",
164 "error-message": "SnmpSET failed with error status: 17, error index: 1. StatusText: Not writable"
170 which corresponds to Error status 17 in the SNMPv2 RFC:
171 https://tools.ietf.org/html/rfc1905.