- ConcurrentMap<String, Row> portRows =
- this.ovsdbConfigurationService.getRows(node,
- ovsdbConfigurationService.getTableName(node, Port.class));
- if (portRows != null) {
- for (Row portRow : portRows.values()) {
- Port port = ovsdbConfigurationService.getTypedRow(node, Port.class, portRow);
- for (UUID interfaceUuid : port.getInterfacesColumn().getData()) {
- Row ifaceRow = ovsdbConfigurationService
- .getRow(node,
- ovsdbConfigurationService.getTableName(node, Interface.class),
- interfaceUuid.toString());
- Interface iface = ovsdbConfigurationService.getTypedRow(node, Interface.class, ifaceRow);
- Map<String, String> externalIds = iface.getExternalIdsColumn().getData();
-
- if (externalIds == null) {
- logger.trace("No external_ids seen in {}", iface.getName());
- continue;
- }
-
- /* Compare Neutron port uuid */
- String neutronPortId = externalIds.get(Constants.EXTERNAL_ID_INTERFACE_ID);
- if (neutronPortId == null) {
- continue;
- }
-
- if (neutronPortId.equalsIgnoreCase(neutronPort.getPortUUID())) {
- logger.trace("neutronPortDeleted: Delete interface {}", iface.getName());
- ovsdbConfigurationService.deleteRow(node,
- ovsdbConfigurationService.getTableName(node, Port.class),
- port.getUuid().toString());
- break;
- }
- }
+ List<OvsdbTerminationPointAugmentation> ports = MdsalUtils.getTerminationPointsOfBridge(node);
+ for (OvsdbTerminationPointAugmentation port : ports) {
+ String neutronPortId =
+ MdsalUtils.getInterfaceExternalIdsValue(port, Constants.EXTERNAL_ID_INTERFACE_ID);
+ if (neutronPortId != null && neutronPortId.equalsIgnoreCase(neutronPort.getPortUUID())) {
+ logger.trace("neutronPortDeleted: Delete interface {}", port.getName());
+ MdsalUtils.deleteTerminationPoint(node, port.getName());
+ break;