utilities

command
v0.0.0-...-4bc4564 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 23, 2020 License: Apache-2.0 Imports: 20 Imported by: 0

README

Utilities

This directory contains some stand-alone utility programs to help in the development of the ONU Mock application

onumock-olt-test

This is a simple test to exercise various tasks that an OLT OMCI Stack will often request of ONUs on the PON.

Currently the OLT test application performs the following steps:

Main application startup and processing loop
  1. There are 3 projects in the ignored 'dep' list. Find as way not to ignore them and look into what the best logger may be if log4go is not the best supported one.

  2. Creates OltOmciEndpoint (gRPC) channel to send/receive requests to an actively running ONU Mock application.

  3. Generates a set of PON IDs and constructs an array of Pon structures to contain PON and ONU information.

  4. Creates an onuOMCIChannel to receive requests upon

  5. Schedules a DiscoverONU Process to start running in the background. It will start after 1 second.

  6. At this point, the main processing loop is entered.

Main Processing loop

This is a 'for-ever' loop that starts with a select statement waiting on one of the following 3 events:

  • Done channel message: This signals to the main loop to exit and proceed to the termination steps

  • ONU OMCI channel message: This is called from an ONU (part of the Pon structure created at startup and initialized with discovered ONUs) to send an OMCI Request to the ONU Mock.

  • OMCI Response channel message: This is the response from the ONU Mock for a previously issued request. AVC and Alarm notifications also arrive on this channel.

  • PLOAM Response channel message: This is reception of a PLOAM OMCI message from the PON. For example, this will receive DISCOVER responses and will then formulate a PLOAM Activate request in order to activate an ONU.

    Currently only Discover responses are handled and these contain the serial number of the ONU. A PLOAM Activate is sent with the ONU ID (and other useful info) to the MOCK and an ONU structure is initialized and stored in the Pon structure.

    After the ONU structure is saved, an ONU thread is scheduled to start in 2 seconds to begin the MIB Upload sequence. The first step in OMCI initialization...

Main Processing shutdown

When the Done channel is written too, the main loop exits and

Discover ONU Task

This task is started one second after initial startup. This task runs with a currently fixed discovery interval/delay of 20 seconds. It does the following sequence of steps until the main application writes to it's done channel.

  1. Schedule a timer to fire in the delay seconds (currently 20s)
  2. On timer expiration, create a PloamRequest with an Operation of DISCOVERY.
  3. go to step 1

The DISCOVERY responses will be receive in the main application loop and acted upon there.

ONU Thread

The ONU thread contains a state machine that runs through a series of states to test the functionality of the ONU Mock. It does not run forever but instead just runs several OMCI tasks to exercise the OMCI gopacket library as well as the ONU MOCK application.

The thread is a forever loop that processes incoming OMCI responses and looks for the Done channel to be written to signal thread shutdown.

The current states are listed below:

Initial

Just the initial state. The PLOAM actiation loop will kick us to the next state whcih is MibUpload

MibUpload

Sends a MIB Reset and the performs a full MIB upload sequence request. Goes to the capabilities state next

Capabilities

Gets the ME and Message types supported by the ONU via the OMCI ME. Goes to time sync next.

TimeSync

Sends a time-sync request to the ONU Mock. It sets the time to 1 minute ahead of what the current wall clock is just so we can test running the MOCK with a skewed since of time. On a response, it transitions to service provisioning.

Service Provisioning

TODO: Not yet coded. Should do initial MIB download and the try out several different flow and TCONT/GEM Port configurations.

Idle

TODO: Not yet coded. Good state for waiting on NBI events

Shutdown

Does cleanup. which is simple

Tasks remaining before initial ONU Mock v1.0.0 release

These tasks need to be performed before we can really call it ready for an initial release. These are not necessary in priority order, just the order I initially wrote them up when this document was first created.

  1. Run application to find out MEs & Attributes not supported but available on Alpha, T&W, and Adtran ONUs.

  2. During application startup, query the ONU Mock for number of PONs that are supported by its configuration. Currently it only creates a single PON with a PON ID of 0.

  3. Investigate the DISCOVERY process and see if it properly separate discovery from activation.

  4. See if the PLOAM response channel message handler needs to be moved to a separate method and have it handle more than just Discovery responses.

  5. Add ONU States/Tasks for the following:

    • Alarm Sync
    • PM Interval Collection
    • Get Current PM Interval Request
    • LOS / ONU goes away...
    • ONU Reboot request
    • ONU Admin Lock (ONU-G and UNI)
  6. Add Alarm Notification handling and generate some in the MOCK based on config settings or NBI requests. Perhaps UNI oper-status to start with

  7. Add AVC Notification handling. And generate some based on events in the MOC

  8. Implement the service provisioning steps for initial startup.

Tasks for future OLT Mocks

These tasks often will require additional work in the ONU Mock and the OMCI go-packet library. Some features may be moved into the v1.0.0 release if it will provide a useful feature.

  1. Support a configurable (command line) setting of the ONU discovery interval

  2. Add ONU States Tasks for the following:

    • Test Request/response (perhaps a self-test???)
    • Software download and image activation
    • Power failure / battery backup support
    • Multicast services support
  3. In the capabilities state, also test out ONU support for getting ME and attribute details. Some ONUs may not support this.

Documentation

Overview

* Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL