BBF YANG Examples

  Copyright (C) 2022 by Tibit Communications, Inc.
  All rights reserved.

This document provides information for running BBF YANG Examples
with the Tibit Netconf Server.

See the following additional documents for more information on the Tibit Netconf Server:
 * Tibit Tech Note TN037 Tibit NETCONF/YANG User Guide & Release Notes.


Overview
--------
The BBF YANG Examples are a collection of Python scripts for select use cases
to demonstrate managing OLTs and ONUs using the BBF YANG models. The ncclient
Python library is used to send and receive Netconf requests in these examples.

Examples for the following use cases are provided with the BBF YANG Examples:
 * bbf_list_olts.py                 - List OLT devices.
 * bbf_get_olt.py                   - Get information for a specific OLT.
 * bbf_list_onus.py                 - List ONU devices.
 * bbf_get_onu.py                   - Get information for a specific ONU.
 * create_olt/
    create_olt.py                   - Configure an OLT PON and map BBF PON configuration to a specific OLT device.
    delete_olt.py                   - Delete configuration for an OLT.
 * add_ctag_service/
    config_add_ctag_svc.py          - Configure an Add CTag service for an ONU.
    disable_svc.py                  - Disable Add CTag service for an ONU.
 * unmodified_service/
    config_unmodified_svc.py        - Configure an Unmodified service for an ONU.
    disable_svc.py                  - Disable Unmodified service for an ONU.
 * shared_vlan_service/
    create_olt_shared_vlan.py       - Create a Shared VLAN on an OLT.
    config_onu_shared_vlan_svc.py   - Configure a Shared VLAN service for an ONU.
    disable_svc.py                  - Disable Shared VLAN service for an ONU.
    delete_olt_shared_vlan.py       - Remove a Shared VLAN configuration from an OLT.
 * add_ctag_5tcont_service/
    config_add_ctag_5tcont_svc.py   - Configure 5x Tcont service for an ONU.
    disable_svc.py                  - Disable 5x Tcont service for an ONU.
 * add_ctag_5uni_service/
    config_add_ctag_5uni_svc.py     - Configure 5x UNI service for an ONU.
    disable_svc.py                  - Disable 5x UNI service for an ONU.
 * bbf_cleanup.py                   - Clean up OLT and ONU BBF YANG configuration.
 * reset_olt.py                     - Reset an OLT device.
 * reset_onu.py                     - Reset an ONU device.


Prerequisites
-------------
Install the ncclient and other Python dependencies using pip3. A Python virtual
environment is recommended for running the examples. Alternatively, the
requirements.txt dependencies can be installed directly into local user or
system libraries using: pip3 install -r requirements.txt.

Use the following steps to run the examples from a Python virtual environment.

1. Create and activate the virtual environment.

    $ python3 -m venv ./venv
    $ source ./venv/bin/activate

2. Upgrade pip and install Python dependencies.

    $ pip3 install --upgrade pip
    $ pip3 install -r ./requirements.txt

3. Run BBF YANG examples.

4. Exit out of the Python virtual environment after running the examples

    $ deactivate

