package org.opendaylight.ovsdb.southbound.transactions.md;
+import static org.opendaylight.ovsdb.southbound.SouthboundUtil.schemaMismatchLog;
+
import java.net.InetAddress;
import java.net.NetworkInterface;
import java.util.ArrayList;
}
}
} catch (SchemaVersionMismatchException e) {
- // We don't care about the exception stack trace here
- LOG.warn("protocol not supported by this version of ovsdb: {}", e.getMessage());
+ schemaMismatchLog("protocols", "Bridge", e);
}
return result;
}
setFailMode(ovsdbBridgeAugmentationBuilder, bridge);
setOpenFlowNodeRef(ovsdbBridgeAugmentationBuilder, bridge);
setManagedBy(ovsdbBridgeAugmentationBuilder);
+ setAutoAttach(ovsdbBridgeAugmentationBuilder, bridge);
bridgeNodeBuilder.addAugmentation(OvsdbBridgeAugmentation.class, ovsdbBridgeAugmentationBuilder.build());
LOG.debug("Built with the intent to store bridge data {}",
return bridgeNodeBuilder.build();
}
+ private void setAutoAttach(OvsdbBridgeAugmentationBuilder ovsdbBridgeAugmentationBuilder,
+ Bridge bridge) {
+ try {
+ if (bridge.getAutoAttachColumn() != null
+ && bridge.getAutoAttachColumn().getData() != null
+ && !bridge.getAutoAttachColumn().getData().isEmpty()) {
+ Set<UUID> uuids = bridge.getAutoAttachColumn().getData();
+ for (UUID uuid : uuids) {
+ ovsdbBridgeAugmentationBuilder.setAutoAttach(new Uuid(uuid.toString()));
+ }
+ }
+ } catch (SchemaVersionMismatchException e) {
+ schemaMismatchLog("auto_attach", "Bridge", e);
+ }
+ }
+
private void setManagedBy(OvsdbBridgeAugmentationBuilder ovsdbBridgeAugmentationBuilder) {
InstanceIdentifier<Node> connectionNodePath = getOvsdbConnectionInstance().getInstanceIdentifier();
ovsdbBridgeAugmentationBuilder.setManagedBy(new OvsdbNodeRef(connectionNodePath));
}
}
} catch (Exception e) {
- LOG.warn("Error getting local ip address {}", e);
+ LOG.warn("Error getting local ip address", e);
}
}
}