private void execute(TransactionBuilder transaction, BridgeOperationalState state, Map<InstanceIdentifier<OvsdbNodeAugmentation>, OvsdbNodeAugmentation> original, Map<InstanceIdentifier<OvsdbNodeAugmentation>, OvsdbNodeAugmentation> updated) { for (final Map.Entry<InstanceIdentifier<OvsdbNodeAugmentation>, OvsdbNodeAugmentation> originalEntry : original.entrySet()) { final InstanceIdentifier<OvsdbNodeAugmentation> ovsdbNodeIid = originalEntry.getKey(); final OvsdbNodeAugmentation ovsdbNodeAugmentation = originalEntry.getValue(); final OvsdbNodeAugmentation deletedOvsdbNodeAugmentation = updated.get(ovsdbNodeIid); if (ovsdbNodeAugmentation != null && deletedOvsdbNodeAugmentation != null) { final List<Autoattach> origAutoattachList = ovsdbNodeAugmentation.getAutoattach(); final List<Autoattach> deletedAutoattachList = deletedOvsdbNodeAugmentation.getAutoattach(); if (origAutoattachList != null && !origAutoattachList.isEmpty() && (deletedAutoattachList == null || deletedAutoattachList.isEmpty())) { if (true) { // FIXME: Remove if loop after ovs community supports external_ids column in AutoAttach Table LOG.info("UNSUPPORTED FUNCTIONALITY: Auto Attach related CRUD operations are not supported for" + " this version of OVSDB schema due to missing external_ids column."); return; } final OvsdbNodeAugmentation currentOvsdbNode = state.getBridgeNode(ovsdbNodeIid).get().getAugmentation(OvsdbNodeAugmentation.class); final List<Autoattach> currentAutoAttach = currentOvsdbNode.getAutoattach(); for (final Autoattach origAutoattach : origAutoattachList) { final Uri autoAttachId = origAutoattach.getAutoattachId(); deleteAutoAttach(transaction, ovsdbNodeIid, getAutoAttachUuid(currentAutoAttach, autoAttachId)); } } } } }
return; final List<Autoattach> autoAttachList = ovsdbNode.getAutoattach(); if (autoAttachList != null) { if (true) { final List<Autoattach> currentAutoAttach = currentOvsdbNode.getAutoattach(); for (final Autoattach autoAttach : autoAttachList) { final AutoAttach autoAttachWrapper =
if (!Objects.equals(_autoattach, other.getAutoattach())) { return false;
private AutoattachKey getAutoAttachKeyToRemove(Node node, UUID autoAttachUuid) { final List<Autoattach> autoAttachList = node.getAugmentation(OvsdbNodeAugmentation.class).getAutoattach(); if (autoAttachList == null || autoAttachList.isEmpty()) { return null; } for (final Autoattach autoAttach : autoAttachList) { if (autoAttach.getAutoattachUuid() .equals(new Uuid(autoAttachUuid.toString()))) { return autoAttach.getKey(); } } return null; } }
public OvsdbNodeAugmentationBuilder(OvsdbNodeAugmentation base) { this._autoattach = base.getAutoattach(); this._connectionInfo = base.getConnectionInfo(); this._datapathTypeEntry = base.getDatapathTypeEntry(); this._dbVersion = base.getDbVersion(); this._interfaceTypeEntry = base.getInterfaceTypeEntry(); this._managedNodeEntry = base.getManagedNodeEntry(); this._managerEntry = base.getManagerEntry(); this._openvswitchExternalIds = base.getOpenvswitchExternalIds(); this._openvswitchOtherConfigs = base.getOpenvswitchOtherConfigs(); this._ovsVersion = base.getOvsVersion(); this._qosEntries = base.getQosEntries(); this._queues = base.getQueues(); }