Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
<command>
	<action class="org.onos.byon.cli.RemoveHostCommand"/>
    <completers>
		<ref component-id="networkCompleter"/>
        <ref component-id="hostIdCompleter"/>
        <null/>
	</completers>
</command>
<command>
	<action class="org.onos.byon.cli.RemoveNetworkRemoveNetworkCommand"/>
	<completers>
		<ref component-id="networkCompleter"/>
        <null/>
    </completers>
</command>

...

Alright, so now that the stores emit events the managers should be made to receive them. For this we are going to have to add a reference on the EventDeliveryService an AbstractListenerRegistry an ListenerRegistry to keep track of listeners and NetworkStoreDelegate as shown in the code snippet below.

Code Block
languagejava
	@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
	protected EventDeliveryService eventDispatcher;

    private final AbstractListenerRegistry<NetworkEventListenerRegistry<NetworkEvent, NetworkListener>
            listenerRegistry = new AbstractListenerRegistry<>ListenerRegistry<>();

    private final NetworkStoreDelegate delegate = new InternalStoreDelegate();

...