import org.opendaylight.controller.md.sal.binding.api.DataObjectModification;
import org.opendaylight.controller.md.sal.binding.api.DataTreeModification;
import org.opendaylight.ovsdb.hwvtepsouthbound.HwvtepSouthboundMapper;
+import org.opendaylight.ovsdb.lib.error.SchemaVersionMismatchException;
import org.opendaylight.ovsdb.lib.notation.Mutator;
import org.opendaylight.ovsdb.lib.notation.UUID;
import org.opendaylight.ovsdb.lib.operations.TransactionBuilder;
setDescription(physicalSwitch, physicalSwitchAugmentation);
setManagementIps(physicalSwitch, physicalSwitchAugmentation);
setTunnuleIps(physicalSwitch, physicalSwitchAugmentation);
- setTunnels(transaction, iid, physicalSwitch, physicalSwitchAugmentation,
- operationalPhysicalSwitchOptional.isPresent());
+ try {
+ setTunnels(transaction, iid, physicalSwitch, physicalSwitchAugmentation,
+ operationalPhysicalSwitchOptional.isPresent());
+ } catch (SchemaVersionMismatchException e) {
+ LOG.debug("tunnels table unsupported for this version of HWVTEP schema", e);
+ }
if (!operationalPhysicalSwitchOptional.isPresent()) {
//create a physical switch
setName(physicalSwitch, physicalSwitchAugmentation, operationalPhysicalSwitchOptional);
public PhysicalSwitchUpdateCommand(HwvtepConnectionInstance key, TableUpdates updates, DatabaseSchema dbSchema) {
super(key, updates, dbSchema);
updatedPSRows = TyperUtils.extractRowsUpdated(PhysicalSwitch.class, getUpdates(), getDbSchema());
- updatedTunnelRows = TyperUtils.extractRowsUpdated(Tunnel.class, getUpdates(), getDbSchema());
updatedPLocRows = TyperUtils.extractRowsUpdated(PhysicalLocator.class, getUpdates(), getDbSchema());
+ try {
+ updatedTunnelRows = TyperUtils.extractRowsUpdated(Tunnel.class, getUpdates(), getDbSchema());
+ } catch (IllegalArgumentException e) {
+ LOG.debug("Tunnel Table not supported on this HWVTEP device", e.getMessage());
+ }
}
@Override
private void setTunnels(Node node, PhysicalSwitchAugmentationBuilder psAugmentationBuilder,
PhysicalSwitch pSwitch) {
- if (pSwitch.getTunnels() != null && pSwitch.getTunnels().getData() != null
+ if (updatedTunnelRows != null && pSwitch.getTunnels() != null && pSwitch.getTunnels().getData() != null
&& !pSwitch.getTunnels().getData().isEmpty()) {
Set<UUID> uuidList = pSwitch.getTunnels().getData();
List<Tunnels> tunnelList = new ArrayList<>();