Add explicit init/close methods to OpendaylightToaster 57/57057/3
authorTom Pantelis <tompantelis@gmail.com>
Mon, 15 May 2017 12:21:34 +0000 (08:21 -0400)
committerTom Pantelis <tompantelis@gmail.com>
Tue, 16 May 2017 10:20:51 +0000 (10:20 +0000)
commit390c714cdeae2efe67d55d5a401929653b534f5c
tree469a87628de20018ce5ae6571dde76ab3c76eb27
parent62d2f37a4e9ff4c637ff83e3d9dbbfd292552aaa
Add explicit init/close methods to OpendaylightToaster

The blueprint XML specifies the "register" and "unregister" methods
for init/destroy however this bypasses the "close" method. Add
explicit init/close methods and call register/unregister.

I also moved the initialization code that was in setDataBroker to the
new init method. The former is a setter and should have code logic side
effects.

Change-Id: Idf46f76913c4400aaef61ff78ad8f57e3db4c4b9
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
opendaylight/md-sal/samples/toaster-provider/src/main/java/org/opendaylight/controller/sample/toaster/provider/OpendaylightToaster.java
opendaylight/md-sal/samples/toaster-provider/src/main/resources/org/opendaylight/blueprint/toaster-provider.xml
opendaylight/md-sal/samples/toaster-provider/src/test/java/org/opendaylight/controller/sample/toaster/provider/OpenDaylightToasterTest.java

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.