if (connectionInfo.getType().equals(OvsdbConnectionInfo.ConnectionType.PASSIVE)) {
identifier = connectionInfo.getRemoteAddress().getHostAddress()+":"+connectionInfo.getRemotePort();
}
- /* TODO Node.fromString lookup fails because the "OVS|id" is no longer written to the node.*/
- //assertEquals(Node.fromString("OVS|" + identifier), connectionService.getNodes().get(0));
+ assertEquals(node, connectionService.getNode("OVS|" + identifier));
System.out.println("Nodes = "+ connectionService.getNodes());
/*
* Test sequence :
componentB.setImplementation(listenerB);
dm.add(componentB);
- Node newNode = Node.fromString("OVS:10.10.10.10:65342");
+ Node newNode = Node.fromString("OVS|10.10.10.10:65342");
InetAddress address = InetAddress.getByName("10.10.10.10");
int port = 65342;
if (connectionInfo.getType().equals(OvsdbConnectionInfo.ConnectionType.PASSIVE)) {
identifier = connectionInfo.getRemoteAddress().getHostAddress()+":"+connectionInfo.getRemotePort();
}
- /* TODO Node.fromString lookup fails because the "OVS|id" is no longer written to the node.*/
- //assertEquals(Node.fromString("OVS|" + identifier), connectionService.getNodes().get(0));
+ assertEquals(node, connectionService.getNode("OVS|" + identifier));
log.info("Nodes = "+ connectionService.getNodes());
/*
* Test sequence :
componentB.setImplementation(listenerB);
dm.add(componentB);
- Node newNode = Node.fromString("OVS:10.10.10.10:65342");
+ Node newNode = Node.fromString("OVS|10.10.10.10:65342");
InetAddress address = InetAddress.getByName("10.10.10.10");
int port = 65342;
throw new ServiceUnavailableException("OVS Configuration Service " + RestMessages.SERVICEUNAVAILABLE.toString());
}
- Node node = Node.fromString(nodeType, nodeId);
OvsdbConnectionService
connectionService = (OvsdbConnectionService)ServiceHelper.getGlobalInstance(OvsdbConnectionService.class, this);
+ Node node = connectionService.getNode(nodeId);
+
OvsdbClient client = connectionService.getConnection(node).getClient();
OvsdbRow localRow = OvsdbRow.fromJsonNode(client, OvsVswitchdSchemaConstants.DATABASE_NAME, rowJson);
String bckCompatibleTableName = this.getBackwardCompatibleTableName(client, OvsVswitchdSchemaConstants.DATABASE_NAME, tableName);
throw new ServiceUnavailableException("UserManager " + RestMessages.SERVICEUNAVAILABLE.toString());
}
- Node node = Node.fromString(nodeType, nodeId);
OvsdbConnectionService
connectionService = (OvsdbConnectionService)ServiceHelper.getGlobalInstance(OvsdbConnectionService.class, this);
+ Node node = connectionService.getNode(nodeId);
OvsdbClient client = connectionService.getConnection(node).getClient();
String bckCompatibleTableName = this.getBackwardCompatibleTableName(client, OvsVswitchdSchemaConstants.DATABASE_NAME, tableName);
throw new ServiceUnavailableException("UserManager " + RestMessages.SERVICEUNAVAILABLE.toString());
}
- Node node = Node.fromString(nodeType, nodeId);
OvsdbConnectionService
connectionService = (OvsdbConnectionService)ServiceHelper.getGlobalInstance(OvsdbConnectionService.class, this);
+ Node node = connectionService.getNode(nodeId);
OvsdbClient client = connectionService.getConnection(node).getClient();
String bckCompatibleTableName = this.getBackwardCompatibleTableName(client, OvsVswitchdSchemaConstants.DATABASE_NAME, tableName);
Map<String, Row> rows = null;
throw new ServiceUnavailableException("OVS Configuration Service " + RestMessages.SERVICEUNAVAILABLE.toString());
}
- Node node = Node.fromString(nodeType, nodeId);
OvsdbConnectionService
connectionService = (OvsdbConnectionService)ServiceHelper.getGlobalInstance(OvsdbConnectionService.class, this);
+ Node node = connectionService.getNode(nodeId);
OvsdbClient client = connectionService.getConnection(node).getClient();
String bckCompatibleTableName = this.getBackwardCompatibleTableName(client, OvsVswitchdSchemaConstants.DATABASE_NAME, tableName);
OvsdbRow localRow = OvsdbRow.fromJsonNode(client, OvsVswitchdSchemaConstants.DATABASE_NAME, rowJson);
throw new ServiceUnavailableException("OVS Configuration Service " + RestMessages.SERVICEUNAVAILABLE.toString());
}
- Node node = Node.fromString(nodeType, nodeId);
OvsdbConnectionService
connectionService = (OvsdbConnectionService)ServiceHelper.getGlobalInstance(OvsdbConnectionService.class, this);
+ Node node = connectionService.getNode(nodeId);
OvsdbClient client = connectionService.getConnection(node).getClient();
String bckCompatibleTableName = this.getBackwardCompatibleTableName(client, OvsVswitchdSchemaConstants.DATABASE_NAME, tableName);