tree: 9ffeb38161bc640b21abd323aeac857fc7216d12 [path history] [tgz]
  1. README.md
  2. __init__.py
  3. adapter_alarms.py
  4. adapter_pm_metrics.py
  5. adtran_device_handler.py
  6. adtran_olt.py
  7. adtran_olt_handler.py
  8. codec/
  9. flow/
  10. gem_port.py
  11. net/
  12. nni_port.py
  13. onu.py
  14. pon_port.py
  15. tcont.py
voltha/adapters/adtran_olt/README.md

Adtran OLT Device Adapter

To preprovision an Adtran OLT, you will need to provide the IP Address and the NETCONF/REST credentials for the device. The NETCONF/REST credentials are an extension of the existing preprovision_olt command and these are placed after entering two dashes '--'. The full syntax to use is.

ShortLongDefaultNotes
-u--nc_username''NETCONF Username
-p--nc_password''NETCONF Password
-t--nc_port830NETCONF TCP Port
-U--rc_username''REST Username
-P--rc_password''REST Password
-T--rc_port8081REST TCP Port
-z--zmq_port5656ZeroMQ OMCI Proxy Port
-a--autoactivateFalseAutoactivate ONUs, xPON othewise
-M--multicast_vlan4092Multicast VLANs (comma-delimeted)
-V--packet_in_vlan4000OpenFlow Packet-In/Out VLAN

For example, if your Adtran OLT is address 10.17.174.193 with the default TCP ports and NETCONF credentials of admin/admin and REST credentials of ADMIN/ADMIN, the command line would be:

    preprovision_olt -t adtran_olt -i 10.17.174.193 -- -u admin -p admin -U ADMIN -P ADMIN

or

    preprovision_olt -t adtran_olt -i 10.17.174.193 -- --nc_username admin --nc_password admin --rc_username ADMIN --rc_password ADMIN

Currently the Adtran Device Adapter will enable all PON ports on startup and attempt to activate any discovered ONUs. This behaviour will change once PON Management is fully supported.

REST Based Pre-Provisioning

In addition to CLI provisioning, the Adtran OLT Device Adapter can also be provisioned though the VOLTHA Northbound REST API.

VOLTHA_IP=localhost
OLT_IP=10.17.174.228
REST_PORT=`docker inspect compose_chameleon_1 | jq -r '.[0].NetworkSettings.Ports["8881/tcp"][0].HostPort'`
    
curl -k -s -X POST https://${VOLTHA_IP}:${REST_PORT}/api/v1/local/devices \
 --header 'Content-Type: application/json' --header 'Accept: application/json' \
 -d "{\"type\": \"adtran_olt\",\"ipv4_address\": \"${OLT_IP}\",\"extra_args\": \"-u admin -p admin -U ADMIN -P ADMIN\"}" \
| jq '.' | tee /tmp/adtn-olt.json

This will not only pre-provision the OLT, but it will also return the created VOLTHA Device ID for use other commands. The output is also shown on the console as well:

REST_PORT=`docker inspect compose_chameleon_1 | jq -r '.[0].NetworkSettings.Ports["8881/tcp"][0].HostPort'`
    
curl -k -s -X POST https://${VOLTHA_IP}:${REST_PORT}/api/v1/local/devices \
  --header 'Content-Type: application/json' --header 'Accept: application/json' \
  -d "{\"type\": \"adtran_olt\",\"ipv4_address\": \"${OLT_IP}\",\"extra_args\": \"-u admin -p admin -U ADMIN -P ADMIN\"}" \
| jq '.' | tee /tmp/adtn-olt.json
{
  "extra_args": "-u admin -p admin -U ADMIN -P ADMIN",
  "vendor": "",
  "channel_terminations": [],
  "parent_port_no": 0,
  "connect_status": "UNKNOWN",
  "root": false,
  "adapter": "adtran_olt",
  "vlan": 0,
  "hardware_version": "",
  "ports": [],
  "ipv4_address": "10.17.174.228",
  "parent_id": "",
  "oper_status": "UNKNOWN",
  "admin_state": "PREPROVISIONED",
  "reason": "",
  "serial_number": "",
  "model": "",
  "type": "adtran_olt",
  "id": "00017cbb382b9260",
  "firmware_version": ""
}

Enabling the Pre-Provisioned OLT

To enable the OLT, you need the retrieve the OLT Device ID and issue a POST request to the proper URL as in:

DEVICE_ID=$(jq .id /tmp/adtn-olt.json | sed 's/"//g')

curl -k -s -X POST https://${VOLTHA_IP}:${REST_PORT}/api/v1/local/devices/${DEVICE_ID}/enable

Other REST APIs

A full list of URLs supported by VOLTHA can be obtained from the swagger API pointing your favorite Internet Browser at: https://${VOLTHA_IP}:${REST_PORT}/#

To list out any devices, you can use the following command:

curl -k -s  https://${VOLTHA_IP}:${REST_PORT}/api/v1/local/devices | json_pp