Removed INDRECT and DIRECT subtypes from network types
Change-Id: I97a35472281a60bc1d109491d193607baf70107c
diff --git a/apps/cordvtn/src/main/java/org/onosproject/cordvtn/CordService.java b/apps/cordvtn/src/main/java/org/onosproject/cordvtn/CordService.java
index 49ed560..9120fa6 100644
--- a/apps/cordvtn/src/main/java/org/onosproject/cordvtn/CordService.java
+++ b/apps/cordvtn/src/main/java/org/onosproject/cordvtn/CordService.java
@@ -27,18 +27,12 @@
import java.util.Set;
import static com.google.common.base.Preconditions.checkNotNull;
-import static org.onosproject.cordvtn.CordService.ServiceType.*;
-import static org.onosproject.cordvtn.CordService.ServiceType.PRIVATE;
-import static org.onosproject.cordvtn.CordService.ServiceType.PUBLIC_INDIRECT;
public final class CordService {
enum ServiceType {
PRIVATE,
- PRIVATE_DIRECT,
- PRIVATE_INDIRECT,
- PUBLIC_DIRECT,
- PUBLIC_INDIRECT,
+ PUBLIC,
MANAGEMENT
}
@@ -172,18 +166,12 @@
checkNotNull(netName);
String name = netName.toUpperCase();
- if (name.contains(PRIVATE_DIRECT.toString())) {
- return PRIVATE_DIRECT;
- } else if (name.contains(PRIVATE_INDIRECT.toString())) {
- return PRIVATE_INDIRECT;
- } else if (name.contains(PUBLIC_DIRECT.toString())) {
- return PUBLIC_DIRECT;
- } else if (name.contains(PUBLIC_INDIRECT.toString())) {
- return PUBLIC_INDIRECT;
- } else if (name.contains(MANAGEMENT.toString())) {
- return MANAGEMENT;
+ if (name.contains(ServiceType.PUBLIC.toString())) {
+ return ServiceType.PUBLIC;
+ } else if (name.contains(ServiceType.MANAGEMENT.toString())) {
+ return ServiceType.MANAGEMENT;
} else {
- return PRIVATE;
+ return ServiceType.PRIVATE;
}
}
}
diff --git a/apps/cordvtn/src/main/java/org/onosproject/cordvtn/CordVtn.java b/apps/cordvtn/src/main/java/org/onosproject/cordvtn/CordVtn.java
index 4267838..a08bd35 100644
--- a/apps/cordvtn/src/main/java/org/onosproject/cordvtn/CordVtn.java
+++ b/apps/cordvtn/src/main/java/org/onosproject/cordvtn/CordVtn.java
@@ -559,11 +559,8 @@
ruleInstaller.populateManagementNetworkRules(host, service);
break;
case PRIVATE:
- case PRIVATE_INDIRECT:
- case PRIVATE_DIRECT:
arpProxy.addGateway(service.serviceIp(), privateGatewayMac);
- case PUBLIC_INDIRECT:
- case PUBLIC_DIRECT:
+ case PUBLIC:
default:
// TODO check if the service needs an update on its group buckets after done CORD-433
ruleInstaller.updateServiceGroup(service);
@@ -634,13 +631,10 @@
ruleInstaller.removeManagementNetworkRules(host, service);
break;
case PRIVATE:
- case PRIVATE_INDIRECT:
- case PRIVATE_DIRECT:
if (getHostsWithOpenstackNetwork(vNet).isEmpty()) {
arpProxy.removeGateway(service.serviceIp());
}
- case PUBLIC_INDIRECT:
- case PUBLIC_DIRECT:
+ case PUBLIC:
default:
// TODO check if the service needs an update on its group buckets after done CORD-433
ruleInstaller.updateServiceGroup(service);