[ONOS-6627] Revise adding and removing packet processor for virtual network

At present, we have to use requestPackets to trigger adding packet processor for virtual network and use cancelPackets to trigger removing the packet process for the virtual network.
But if we call cancelPackets more then one time in the deactivate() method when the application is deactivated, if will throw a NullPoint exception.

Furthermore, if a user does not requestPackets() in the application, the packet processor will never be added.
It may be a confusing trouble for a tenant user.
As a result, I think the packet processor should be created when the virtual network is added and be removed when no virtual network exists.

Soultions:
Listen to the network event to add and remove packet processor for virtual network.

Change-Id: I583d453219bef2f271b4a1e96f9869a28b4f0250
6 files changed
tree: 632e67bd40fc536187d109d6efe73dae45713b2e
  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. pom.xml
  24. protocols/
  25. providers/
  26. tools/
  27. utils/
  28. 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