Brian Stanke
Committed by Gerrit Code Review

ONOS-3633 - Virtual network provider service API definitions.

Change-Id: I919171aa9ad38b34954f0eed57341030e01ed7a4
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
15 */ 15 */
16 package org.onosproject.incubator.net.virtual; 16 package org.onosproject.incubator.net.virtual;
17 17
18 +import org.onosproject.net.ConnectPoint;
18 import org.onosproject.net.provider.ProviderService; 19 import org.onosproject.net.provider.ProviderService;
19 20
20 /** 21 /**
...@@ -22,5 +23,24 @@ import org.onosproject.net.provider.ProviderService; ...@@ -22,5 +23,24 @@ import org.onosproject.net.provider.ProviderService;
22 * the core. 23 * the core.
23 */ 24 */
24 public interface VirtualNetworkProviderService extends ProviderService<VirtualNetworkProvider> { 25 public interface VirtualNetworkProviderService extends ProviderService<VirtualNetworkProvider> {
25 - // TODO: Add methods for notification of core about damaged tunnels, etc. 26 +
27 + /**
28 + * This method is used to notify the VirtualNetwork service that a tunnel is now ACTIVE.
29 + *
30 + * @param networkId network identifier
31 + * @param src source connection point
32 + * @param dst destination connection point
33 + */
34 + void tunnelUp(NetworkId networkId, ConnectPoint src, ConnectPoint dst);
35 +
36 + /**
37 + * This method is used to notify the VirtualNetwork service that a tunnel is now
38 + * FAILED or INACTIVE.
39 + *
40 + * @param networkId network identifier
41 + * @param src source connection point
42 + * @param dst destination connection point
43 + */
44 + void tunnelDown(NetworkId networkId, ConnectPoint src, ConnectPoint dst);
45 +
26 } 46 }
......
...@@ -249,6 +249,16 @@ public class VirtualNetworkManager ...@@ -249,6 +249,16 @@ public class VirtualNetworkManager
249 InternalVirtualNetworkProviderService(VirtualNetworkProvider provider) { 249 InternalVirtualNetworkProviderService(VirtualNetworkProvider provider) {
250 super(provider); 250 super(provider);
251 } 251 }
252 +
253 + @Override
254 + public void tunnelUp(NetworkId networkId, ConnectPoint src, ConnectPoint dst) {
255 +
256 + }
257 +
258 + @Override
259 + public void tunnelDown(NetworkId networkId, ConnectPoint src, ConnectPoint dst) {
260 +
261 + }
252 } 262 }
253 263
254 } 264 }
......
...@@ -174,6 +174,16 @@ public class PtToPtIntentVirtualNetworkProviderTest { ...@@ -174,6 +174,16 @@ public class PtToPtIntentVirtualNetworkProviderTest {
174 protected TestVirtualNetworkProviderService(VirtualNetworkProvider provider) { 174 protected TestVirtualNetworkProviderService(VirtualNetworkProvider provider) {
175 super(provider); 175 super(provider);
176 } 176 }
177 +
178 + @Override
179 + public void tunnelUp(NetworkId networkId, ConnectPoint src, ConnectPoint dst) {
180 +
181 + }
182 +
183 + @Override
184 + public void tunnelDown(NetworkId networkId, ConnectPoint src, ConnectPoint dst) {
185 +
186 + }
177 } 187 }
178 188
179 189
......