SONA: openstackSwitching
-Added ARP handler
-Added OpenstackSubnet to encode and decode subnet-related message from Openstack
-Rebased with 5896 (Modified DhcpService for OpenStack)
Change-Id: Ic63e5c82d0301fa5c45d1a41548d8dc3a8b1ec57
diff --git a/apps/openstackswitching/src/main/java/org/onosproject/openstackswitching/OpenstackNetwork.java b/apps/openstackswitching/src/main/java/org/onosproject/openstackswitching/OpenstackNetwork.java
index dc7c026..7bfdf29 100644
--- a/apps/openstackswitching/src/main/java/org/onosproject/openstackswitching/OpenstackNetwork.java
+++ b/apps/openstackswitching/src/main/java/org/onosproject/openstackswitching/OpenstackNetwork.java
@@ -26,8 +26,18 @@
private String name;
private String tenantId;
private String segmentId;
- private String networkType;
private String id;
+ private NetworkType networkType;
+
+ public enum NetworkType {
+ /**
+ * Currently only VXLAN moded is supported.
+ */
+ VXLAN,
+ VLAN,
+ STT,
+ LOCAL
+ }
/**
* Returns the builder object of the OpenstackNetwork class.
@@ -39,12 +49,12 @@
}
private OpenstackNetwork(String name, String tenantId, String id, String sid,
- String type) {
+ NetworkType type) {
this.name = checkNotNull(name);
this.tenantId = checkNotNull(tenantId);
this.segmentId = checkNotNull(sid);
this.id = checkNotNull(id);
- this.networkType = checkNotNull(type);
+ this.networkType = type;
}
public String name() {
@@ -63,7 +73,7 @@
return this.segmentId;
}
- public String networkType() {
+ public NetworkType networkType() {
return this.networkType;
}
@@ -72,7 +82,7 @@
private String tenantId;
private String id;
private String sid;
- private String networkType;
+ private NetworkType networkType;
public Builder name(String name) {
this.name = name;
@@ -98,7 +108,7 @@
return this;
}
- public Builder networkType(String type) {
+ public Builder networkType(NetworkType type) {
this.networkType = type;
return this;