Avoid division by zero

Nothing stops an OF agent to return zero for lambda values and ONOS
probably ought to not crash then.

One use case for this is when only one direction is supported on a port,
for example tx. Unfortunately, the openflow specification does not
separate the directions into different properties, so the agent
implementation has to return some frequency value for rx in this case
even if only the tx direction is supported. However, anything non-zero
would probably be untruthful as it would indicate valid reading to the
end user.

Even zero will be problematic for unsupported power reading in a
direction as 0 dBm is a valid value, but not sure how to deal with any
better.

Change-Id: I2597bd7d577d9c2e1a3b44421fe505b8b3b6cc92
1 file changed
tree: 71a04122f664e6cea27e7b330419b6efa3ed50f8
  1. .buckconfig
  2. .dockerignore
  3. .gitignore
  4. .gitreview
  5. BUCK
  6. Dockerfile
  7. Jenkinsfile
  8. LICENSE.txt
  9. README.md
  10. apps/
  11. buck-tools/
  12. bucklets/
  13. cli/
  14. core/
  15. docs/
  16. drivers/
  17. features/
  18. incubator/
  19. lib/
  20. models/
  21. modules.defs
  22. onos.defs
  23. pipelines/
  24. pom.xml
  25. protocols/
  26. providers/
  27. tools/
  28. utils/
  29. web/
README.md

ONOS : Open Network Operating System

What is ONOS?

ONOS is a new SDN network operating system designed for high availability, performance, scale-out.

Top-Level Features

  • High availability through clustering and distributed state management.
  • Scalability through clustering and sharding of network device control.
  • Performance that is good for a first release, and which has an architecture that will continue to support improvements.
  • Northbound abstractions for a global network view, network graph, and application intents.
  • Pluggable southbound for support of OpenFlow and new or legacy protocols.
  • Graphical user interface to view multi-layer topologies and inspect elements of the topology.
  • REST API for access to Northbound abstractions as well as CLI commands.
  • CLI for debugging.
  • Support for both proactive and reactive flow setup.
  • SDN-IP application to support interworking with traditional IP networks controlled by distributed routing protocols such as BGP.
  • IP-Optical use case demonstration.

Checkout our website and our tools