Not all network service providers need to be NetworkElements. NetworkElements are only those that are interested in L2 events. Since only NetworkElements were injected, and only in NetworkManagerImpl, this has led to all kinds of contortions. As a first step, enable individual service providers to be injected.

Signed-off-by: Chiradeep Vittal <chiradeep@apache.org>
Rationalize the interface by injecting ipDeployers. This is step 1 and includes 2 service providers - Remote AccessVPN and S2S VPN

Signed-off-by: Chiradeep Vittal <chiradeep@apache.org>
Rationalize the interface by injecting all service providers by the service provider interface instead of assuming everybody implements NetworkElement. This is step 2 and includes all the plugins
import cleanups - remove unneeded and add explicit classes

Signed-off-by: Chiradeep Vittal <chiradeep@apache.org>
Move applyRules to the rightful place(s). Not sure why applyIps is required during applyRules, so we still have a reference back into a (simplified) applyRules in NetworkManager
WIP : extract NetworkService
WIP : move stuff between network manager and network service.
      at this point there is about 700 lines of duplicated code
WIP: Leave creation of default offerings to NetworkManager init
WIP: clean up imports

Signed-off-by: Chiradeep Vittal <chiradeep@apache.org>
Remove old applyRules implementation
Clean up some unused imports
Fix mocks
Forgot some element adapters + dont add JuniperSRX by default
Network-refactor: Refactor NetworkManager into NetworkModel and NetworkManager.
NetworkManager's exclusive focus is now
 - handling plugins during orchestration, and
 - to deal with ip address allocation.
Those classes that used to refer to NetworkManager to get access to the datamodel now refer to NetworkModel

Signed-off-by: Chiradeep Vittal <chiradeep@apache.org>
Network-refactor: Move code from NetworkManager to NetworkModel.
NetworkModel is intended as a read-only view on the network model.
This includes Networks, Nics, Ip address, PhysicalNetwork, NetworkOfferings, etc
The code in configure() and start() is used to support queries on the network model which is now the responsibility of the NetworkModel service

Network-refactor: Fix tests so that they get injected with the required NetworkModel mock

Signed-off-by: Chiradeep Vittal <chiradeep@apache.org>
Network-refactor: In preparation for moving the read-only interface NetworkModel
to the api project, ensure that all methods use interfaces from the api project.
By moving it to the api project, it lessens the dependency of plugins on the server components.

Signed-off-by: Chiradeep Vittal <chiradeep@apache.org>
Network-refactor: move readonly interface NetworkModel into api project so that plugins can stop depending on the server project
Network-refactor: accidentally injected NetworkModel twice (revert one of them)

Signed-off-by: Chiradeep Vittal <chiradeep@apache.org>
Network-refactor: verify that s2s provider gets injected as expected

Signed-off-by: Chiradeep Vittal <chiradeep@apache.org>
Network-refactor: add a method for plugins to get the source nat ip

Signed-off-by: Chiradeep Vittal <chiradeep@apache.org>
Network-refactor: verify injection is correct. Verify that dhcp service providers and ip deployers get injected independently in addition to the list of network elements

Signed-off-by: Chiradeep Vittal <chiradeep@apache.org>
Network-refactor: remove unused members. Makes testing of injection a PIA.

Signed-off-by: Chiradeep Vittal <chiradeep@apache.org>
Network-refactor: fix bugs in components.xml discovered by unit tests
Provide injection tests for NetworkManager and FirewallManager

Signed-off-by: Chiradeep Vittal <chiradeep@apache.org>
Network-refactor: interaction between firewall manager and network manager changed, verify this works as expected

Signed-off-by: Chiradeep Vittal <chiradeep@apache.org>
Network-refactor: reduce verbosity of test logs.
Icky way to do it, but unable to get maven to pick up log4j properties from test/resources

Signed-off-by: Chiradeep Vittal <chiradeep@apache.org>