Date: Thu, 28 Mar 2024 09:38:35 +0000 (UTC) Message-ID: <2029508983.715.1711618715419@ip-10-30-146-46.us-west-2.compute.internal> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_714_1841215833.1711618715416" ------=_Part_714_1841215833.1711618715416 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
Name | Organization | Role | |
---|---|---|---|
Andrea Campanella | On.Lab | Developer | andrea@onlab.us |
This section provides an overview on the SNMP southbound protocol implem= entation in ONOS that is used to obtain information and configure devices t= hrough interaction with the SNMP protocol that they expose.
SnmpController.java, implemented by Default= SnmpControllerImpl.java: tracks all the SNMP= devices in this instance of ONOS, serves as a one stop for connecting and = obtaining a device and it's session.
This section specifies how to notify the ONOS core of a device tha= t support REST operations for configuration.
Once you have your device Running on some IP address and some port, in o= rder to make ONOS see it you should follow these steps.
activate the SNMP southbound app :
onos>= ; app activate org.onosproject.snmp
activate the SNMP drivers for your device (i.e. lumentum drivers) :<= /p>
onos>= ; app activate org.onosproject.drivers.lumentum
Pay attention: if your drivers already depend upon the snmp app on= ly the second step is needed.
give ONOS the information regarding the device and which driver to u= se for your device in a json file. You need to specify username, password, = ip and port. If you wrote a specific driver that has also to be changed for= m the standard "rest" one.
{ "devices": { "snmp:<ip>:<port>": { "snmp": { "ip": <ip>, "port": <port>, "username": <username>, "password": <password> }, "basic": { "driver": <driver-name> } } } }
You can also add other information, more than the driver, to the b= asic device configuration information: "type": "<device-type>", "manufacturer": "<device-manuf= acturer>","hwVersion": "<hw-version>","swVersion": "<sw-version= >".
= p>
upload the configuration you just wrote to the instance of ONOS you = are running, in our case localhost:
<you= r_machine>~$ curl -X POST -H "content-type:application/json" http://loca= lhost:8181/onos/v1/network/configuration -d @<path_to_your_json_configur= ation_file> --user onos:rocks
or
<you= r_machine>~$ onos-netcfg localhost <path_to_your_json_configuration_f= ile>
Check if the device is present in ONOS:
onos>= ; devices
should return, among other devices also something like:
onos>= ; id=3Dsnmp:127.0.0.1:1, available=3Dtrue, role=3DMASTER, type=3DSWITC= H, mfr=3Dunknown, hw=3Dunknown, sw=3Dunknown, serial=3Dunknown, ipaddress= =3D127.0.0.1, driver=3Dlumentum, name=3Drest:127.0.0.1:1
If the device is not present the could have been one or multiple e= rrors and you have to check the logs.
for localhost logs
<you= r_machine>~$ tl
or for remote logs
<you= r_machine>~$ ol
verify that the logs don't contain SNMP related exceptions. In case = error are present in the logs it could mean that the device was not able to= reply on the given IP and Port. Verify Ip and Port in the Json file you po= sted and retry. If any other exception is present, such as no device name, = please read the log and react to it accordingly.
If your driver specifies a PortDiscovery implementation, such as
So if your run in ONOS the command:
onos>= ; ports
should return, among other devices also something like:
onos>= ; id=3Dsnmp:127.0.0.1:1, available=3Dtrue, role=3DMASTER, type=3DSWITC= H, mfr=3Dunknown, hw=3Dunknown, sw=3Dunknown, serial=3Dunknown, ipaddress= =3D127.0.0.1, driver=3Dlumentum, name=3Dsnmp:127.0.0.1:1 port=3D4, state=3Denabled, type=3Doch, signalType=3DODU4, isTunable=3Dyes= , name=3D1.1 port=3D5, state=3Denabled, type=3Doch, signalType=3DODU4, isTunable=3Dyes= , name=3D1.2 port=3D20, state=3Denabled, type=3Doduclt, signalType=3DCLT_100GBE , name= =3D5 port=3D24, state=3Denabled, type=3Doduclt, signalType=3DCLT_100GBE , name= =3D6 port=3D28, state=3Denabled, type=3Doduclt, signalType=3DCLT_100GBE , name= =3D7 port=3D32, state=3Denabled, type=3Doduclt, signalType=3DCLT_100GBE , name= =3D8 port=3D48, state=3Denabled, type=3Doch, signalType=3DODU4, isTunable=3Dye= s , name=3D12.1 port=3D49, state=3Denabled, type=3Doch, signalType=3DODU4, isTunable=3Dye= s , name=3D12.2