CORD-151 Implement initial compute node setup
Followings are changed
- Changed nodeStore from eventually consistent map to consistent map
- Removed ovsdb connection management(ovsdb controller has connection status)
- Not only one leader but all onos instances make ovsdb session
Following jobs are done
- Reads compute node and ovsdb access info from network config
- Initiates ovsdb connection to the nodes
- Creates integration bridge on each ovsdbs
- Creates vxlan tunnel port on each integration bridges
Change-Id: I8df4061fcb1eae9b0abd545b7a3f540be50607a9
diff --git a/apps/cordvtn/src/main/java/org/onosproject/cordvtn/DefaultOvsdbNode.java b/apps/cordvtn/src/main/java/org/onosproject/cordvtn/DefaultOvsdbNode.java
index ce8b0f1..eba5210 100644
--- a/apps/cordvtn/src/main/java/org/onosproject/cordvtn/DefaultOvsdbNode.java
+++ b/apps/cordvtn/src/main/java/org/onosproject/cordvtn/DefaultOvsdbNode.java
@@ -30,13 +30,13 @@
private final String host;
private final IpAddress ip;
private final TpPort port;
- private final State state;
+ private final DeviceId brId;
- public DefaultOvsdbNode(String host, IpAddress ip, TpPort port, State state) {
+ public DefaultOvsdbNode(String host, IpAddress ip, TpPort port, DeviceId brId) {
this.host = host;
this.ip = ip;
this.port = port;
- this.state = state;
+ this.brId = brId;
}
@Override
@@ -55,8 +55,8 @@
}
@Override
- public State state() {
- return this.state;
+ public DeviceId intBrId() {
+ return this.brId;
}
@Override
@@ -65,11 +65,6 @@
}
@Override
- public DeviceId intBrId() {
- return DeviceId.deviceId("of:" + this.host);
- }
-
- @Override
public boolean equals(Object o) {
if (this == o) {
return true;
@@ -79,7 +74,8 @@
DefaultOvsdbNode that = (DefaultOvsdbNode) o;
if (this.host.equals(that.host) &&
this.ip.equals(that.ip) &&
- this.port.equals(that.port)) {
+ this.port.equals(that.port) &&
+ this.brId.equals(that.brId)) {
return true;
}
}
@@ -97,7 +93,7 @@
.add("host", host)
.add("ip", ip)
.add("port", port)
- .add("state", state)
+ .add("bridgeId", brId)
.toString();
}
}