Hyunsun Moon
Committed by Gerrit Code Review

Fixed not to load network config at system activation

Change-Id: I7a6a53724c1983b4a887e30880898746982c1682
...@@ -72,8 +72,6 @@ public class CordVtnConfigManager { ...@@ -72,8 +72,6 @@ public class CordVtnConfigManager {
72 72
73 configService.addListener(configListener); 73 configService.addListener(configListener);
74 configRegistry.registerConfigFactory(configFactory); 74 configRegistry.registerConfigFactory(configFactory);
75 -
76 - readConfiguration();
77 } 75 }
78 76
79 @Deactivate 77 @Deactivate
...@@ -101,7 +99,22 @@ public class CordVtnConfigManager { ...@@ -101,7 +99,22 @@ public class CordVtnConfigManager {
101 99
102 @Override 100 @Override
103 public void event(NetworkConfigEvent event) { 101 public void event(NetworkConfigEvent event) {
104 - // TODO handle update event 102 + if (!event.configClass().equals(CordVtnConfig.class)) {
103 + return;
104 + }
105 +
106 + switch (event.type()) {
107 + case CONFIG_ADDED:
108 + log.info("Network configuration added");
109 + readConfiguration();
110 + break;
111 + case CONFIG_UPDATED:
112 + log.info("Network configuration updated");
113 + // TODO handle update event
114 + break;
115 + default:
116 + break;
117 + }
105 } 118 }
106 } 119 }
107 } 120 }
......