return false; if (!Objects.equals(_ofport, other.getOfport())) { return false;
public OvsdbTerminationPointAugmentationBuilder(OvsdbTerminationPointAugmentation base) { this._ifindex = base.getIfindex(); this._ingressPolicingBurst = base.getIngressPolicingBurst(); this._ingressPolicingRate = base.getIngressPolicingRate(); this._interfaceBfd = base.getInterfaceBfd(); this._interfaceBfdStatus = base.getInterfaceBfdStatus(); this._interfaceExternalIds = base.getInterfaceExternalIds(); this._interfaceLldp = base.getInterfaceLldp(); this._interfaceOtherConfigs = base.getInterfaceOtherConfigs(); this._interfaceType = base.getInterfaceType(); this._interfaceUuid = base.getInterfaceUuid(); this._name = base.getName(); this._ofport = base.getOfport(); this._ofportRequest = base.getOfportRequest(); this._options = base.getOptions(); this._portExternalIds = base.getPortExternalIds(); this._portOtherConfigs = base.getPortOtherConfigs(); this._portUuid = base.getPortUuid(); this._qos = base.getQos(); this._qosEntry = base.getQosEntry(); this._trunks = base.getTrunks(); this._vlanMode = base.getVlanMode(); this._vlanTag = base.getVlanTag(); }
private void createOfPort( final OvsdbTerminationPointAugmentation terminationPoint, final Interface ovsInterface) { Long ofPort = terminationPoint.getOfport(); if (ofPort != null) { ovsInterface.setOpenFlowPort(Sets.newHashSet(ofPort)); } }
/** * Construct a new instance. * * @param port The target neutron port. * @param ovtp The OVSDB termination point augmentation. */ private PortMapAttr(@Nonnull Port port, @Nonnull OvsdbTerminationPointAugmentation ovtp) { targetPort = port; portId = ovtp.getOfport(); portName = ovtp.getName(); }
private void updateOfPort( final OvsdbTerminationPointAugmentation terminationPoint, final Interface ovsInterface) { Long ofPort = terminationPoint.getOfport(); if (ofPort != null) { ovsInterface.setOpenFlowPort(Sets.newHashSet(ofPort)); } }
/** * Determine whether the specified OVSDB termination point has been changed * or not. * * <p> * This method compares fields in the OVSDB termination point that affect * port mapping. * </p> * * @param before The OVSDB termination point before modification. * @param after The OVSDB termination point after modification. * @return {@code true} if the specified OVSDB termination point is * changed. {@code null} otherwise. */ static boolean isChanged(@Nonnull OvsdbTerminationPointAugmentation before, @Nonnull OvsdbTerminationPointAugmentation after) { // Compare external interface ID. boolean changed = !Objects.equals(getPortId(before), getPortId(after)); if (!changed) { // Compare OpenFlow port ID and port name. changed = !(Objects.equals(before.getOfport(), after.getOfport()) && Objects.equals(before.getName(), after.getName())); } return changed; }
private Long findOFPortForExtPatch(Long dpId) { final String brInt = configurationService.getIntegrationBridgeName(); final String brExt = configurationService.getExternalBridgeName(); final String portNameInt = configurationService.getPatchPortName(new ImmutablePair<>(brInt, brExt)); Preconditions.checkNotNull(dpId); Preconditions.checkNotNull(portNameInt); final long dpidPrimitive = dpId; for (Node node : nodeCacheManager.getBridgeNodes()) { if (dpidPrimitive == southbound.getDataPathId(node)) { final OvsdbTerminationPointAugmentation terminationPointOfBridge = southbound.getTerminationPointOfBridge(node, portNameInt); return terminationPointOfBridge == null ? null : terminationPointOfBridge.getOfport(); } } return null; }
private Long findOFPortForExtPatch(Long dpId) { final String brInt = configurationService.getIntegrationBridgeName(); final String brExt = configurationService.getExternalBridgeName(); final String portNameInt = configurationService.getPatchPortName(new ImmutablePair<>(brInt, brExt)); Preconditions.checkNotNull(dpId); Preconditions.checkNotNull(portNameInt); final long dpidPrimitive = dpId; for (Node node : nodeCacheManager.getBridgeNodes()) { if (dpidPrimitive == southbound.getDataPathId(node)) { final OvsdbTerminationPointAugmentation terminationPointOfBridge = southbound.getTerminationPointOfBridge(node, portNameInt); return terminationPointOfBridge == null ? null : terminationPointOfBridge.getOfport(); } } return null; }
OvsdbTerminationPointAugmentation otp = tp.getAugmentation(OvsdbTerminationPointAugmentation.class); if (comp.compare(otp)) { return otp.getOfport();