- try {
- Map<String, Row> ovsTable = ovsdbConfigurationService.getRows(node,
- ovsdbConfigurationService.getTableName(node, OpenVSwitch.class));
-
- if (ovsTable == null) {
- logger.error("OpenVSwitch table is null for Node {} ", node);
- return null;
- }
-
- // While there is only one entry in the HashMap, we can't access it by index...
- for (Row row : ovsTable.values()) {
- OpenVSwitch ovsRow = ovsdbConfigurationService.getTypedRow(node, OpenVSwitch.class, row);
- Map<String, String> configs = ovsRow.getOtherConfigColumn().getData();
-
- if (configs == null) {
- logger.debug("OpenVSwitch table is null for Node {} ", node);
- continue;
- }
-
- String tunnelEndpoint = configs.get(tunnelEndpointKey);
-
- if (tunnelEndpoint == null) {
- continue;
- }
-
+ String tunnelEndpoint = MdsalUtils.getOtherConfig(node, OvsdbTables.OPENVSWITCH, tunnelEndpointKey);
+ if (tunnelEndpoint != null) {
+ try {