Fixed vSG network can communicate with other service networks
By installing default rules for the VSG network, too.
Change-Id: I4e26a600c63a98322c01b4b3095da166e62ad038
diff --git a/src/main/java/org/opencord/cordvtn/impl/handler/DefaultInstanceHandler.java b/src/main/java/org/opencord/cordvtn/impl/handler/DefaultInstanceHandler.java
index ce3de31..8cda98c 100644
--- a/src/main/java/org/opencord/cordvtn/impl/handler/DefaultInstanceHandler.java
+++ b/src/main/java/org/opencord/cordvtn/impl/handler/DefaultInstanceHandler.java
@@ -41,6 +41,7 @@
import static org.opencord.cordvtn.api.ServiceNetwork.ServiceNetworkType.PRIVATE;
import static org.opencord.cordvtn.api.ServiceNetwork.ServiceNetworkType.PUBLIC;
+import static org.opencord.cordvtn.api.ServiceNetwork.ServiceNetworkType.VSG;
/**
* Provides network connectivity for default service instances.
@@ -56,7 +57,7 @@
@Activate
protected void activate() {
- netTypes = ImmutableSet.of(PRIVATE, PUBLIC);
+ netTypes = ImmutableSet.of(PRIVATE, PUBLIC, VSG);
super.activate();
}
@@ -67,6 +68,9 @@
@Override
public void instanceDetected(Instance instance) {
+ if (instance.isNestedInstance()) {
+ return;
+ }
log.info("Instance is detected {}", instance);
VtnNetwork vtnNet = getVtnNetwork(instance);
@@ -75,6 +79,9 @@
@Override
public void instanceRemoved(Instance instance) {
+ if (instance.isNestedInstance()) {
+ return;
+ }
log.info("Instance is removed {}", instance);
VtnNetwork vtnNet = getVtnNetwork(instance);