@Override public boolean equals(final Object obj) { if (this == obj) { return true; } if (!(obj instanceof DataTreeIdentifier)) { return false; } final DataTreeIdentifier<?> other = (DataTreeIdentifier<?>) obj; if (datastoreType != other.datastoreType) { return false; } return rootIdentifier.equals(other.rootIdentifier); }
@Override public boolean equals(final Object obj) { if (this == obj) { return true; } if (!(obj instanceof DataTreeIdentifier)) { return false; } final DataTreeIdentifier<?> other = (DataTreeIdentifier<?>) obj; if (datastoreType != other.datastoreType) { return false; } return rootIdentifier.equals(other.rootIdentifier); }
@Override public boolean equals(final Object obj) { if (this == obj) { return true; } if (!(obj instanceof DataTreeIdentifier)) { return false; } final DataTreeIdentifier<?> other = (DataTreeIdentifier<?>) obj; if (datastoreType != other.datastoreType) { return false; } return rootIdentifier.equals(other.rootIdentifier); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null || getClass() != obj.getClass()) { return false; } ReconciliationTask that = (ReconciliationTask) obj; return nodeIid.equals(that.nodeIid); }
@Override public boolean equals(final Object o) { if (this == o) { return true; } if (!(o instanceof RemoteDeviceId)) { return false; } final RemoteDeviceId that = (RemoteDeviceId) o; if (!name.equals(that.name)) { return false; } if (!bindingPath.equals(that.bindingPath)) { return false; } return true; }
@Override public boolean equals(java.lang.Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } GbpNodeRef other = (GbpNodeRef) obj; if (_value == null) { if (other._value != null) { return false; } } else if(!_value.equals(other._value)) { return false; } return true; }
@Override public boolean equals(java.lang.Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } TpReference other = (TpReference) obj; if (_value == null) { if (other._value != null) { return false; } } else if(!_value.equals(other._value)) { return false; } return true; }
@Override public boolean equals(java.lang.Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } MeterRef other = (MeterRef) obj; if (_value == null) { if (other._value != null) { return false; } } else if(!_value.equals(other._value)) { return false; } return true; }
@Override public boolean equals(java.lang.Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } FlowRef other = (FlowRef) obj; if (_value == null) { if (other._value != null) { return false; } } else if(!_value.equals(other._value)) { return false; } return true; }
@Override public boolean equals(java.lang.Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } TableRef other = (TableRef) obj; if (_value == null) { if (other._value != null) { return false; } } else if(!_value.equals(other._value)) { return false; } return true; }
@Override public boolean equals(java.lang.Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } GroupRef other = (GroupRef) obj; if (_value == null) { if (other._value != null) { return false; } } else if(!_value.equals(other._value)) { return false; } return true; }
public LacpPort removeLacpPort (InstanceIdentifier<NodeConnector> portId, boolean hardReset) { LacpPort lacpPortObj = this.lacpPortList.get(portId); if ((lacpPortObj == null) || (!(lacpPortObj.getNodeConnectorId().equals(portId)))) { return null; } LacpPort lacpPort = this.lacpPortList.remove(portId); if (hardReset == true) { // When port is going down, reset the lacp info available for the nodeConnector. updateNodeConnectorLacpInfo(portId); } return lacpPort; } public boolean addDownPort (InstanceIdentifier<NodeConnector> port) {
private boolean isManagedBy(InstanceIdentifier<?> bridgeIid) { // Did we just create the containing node? InstanceIdentifier<?> managedBy = getManagedByIid(event.getCreatedData() , bridgeIid); if (managedBy != null && managedBy.equals(iid)) { return true; } // Did we just update the containing node? managedBy = getManagedByIid(event.getUpdatedData() , bridgeIid); if (managedBy != null && managedBy.equals(iid)) { return true; } // Did we have the containing node already (note: we never get here unless we are deleting it) managedBy = getManagedByIid(event.getOriginalData() , bridgeIid); if (managedBy != null && managedBy.equals(iid)) { return true; } managedBy = getManagedByIidFromOperDS(bridgeIid); if (managedBy != null && managedBy.equals(iid)) { return true; } return false; }
private int getIndexOf(NetworkElement ne) { for (NetworkElement listNE : networkElements.getNetworkElement()) { if (ne.getIid().equals(listNE.getIid())) { return networkElements.getNetworkElement().indexOf(listNE); } } return -1; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (!(obj instanceof DtoChangeEvent)) return false; DtoChangeEvent other = (DtoChangeEvent) obj; if (after == null) { if (other.after != null) return false; } else if (!after.equals(other.after)) return false; if (before == null) { if (other.before != null) return false; } else if (!before.equals(other.before)) return false; if (iid == null) { if (other.iid != null) return false; } else if (!iid.equals(other.iid)) return false; return true; }
protected void updateIrd(IrdInstanceConfiguration original, IrdInstanceConfiguration updated, WriteTransaction wx) { ResourceId rid = updated.getInstanceId(); LOG.info("Updating Ird: " + "\n\tResource ID: " + rid.getValue()); SimpleIrdEntryListener listener = m_listeners.get(rid); if (listener != null) { if (original.getEntryContext().equals(updated.getEntryContext())) { // Changes in resources is managed by another listener return ; } LOG.error("Changing entry context is forbidden! Removing the Ird instance."); removeIrd(original, wx); return; } createIrd(updated, wx); }
/** * Return a MD-SAL flow ID configured in the given flow-ref instance. * * @param fref A flow-ref instance. * @return A MD-SAL flow ID configured in the given flow-ref instance. * @throws IllegalArgumentException * The given flow-ref instance is invalid. */ private String getFlowId(FlowRef fref) { if (fref == null) { throw new IllegalArgumentException("flow-ref cannot be null."); } // Verify the specified path. InstanceIdentifier<?> path = fref.getValue(); FlowKey fkey = path.firstKeyOf(Flow.class); if (fkey != null) { InstanceIdentifier<Flow> expected = tablePath.child(Flow.class, fkey); if (expected.equals(path)) { return fkey.getId().getValue(); } } throw new IllegalArgumentException("Invalid flow-ref: " + path); }
OvsdbBridgeAugmentation bridge = node.getAugmentation(OvsdbBridgeAugmentation.class); if (bridge != null && bridge.getManagedBy() != null && bridge.getManagedBy().getValue().equals(ndIid)) { brChanges.putAll(extractBridgeConfigurationChanges(node, bridge)); tpChanges.add(node);
private InstanceIdentifier<?> getManagedByIid(Map<InstanceIdentifier<?>, DataObject> map, InstanceIdentifier<?> iidToCheck) { // Get the InstanceIdentifier of the containing node InstanceIdentifier<Node> nodeEntryIid = iidToCheck.firstIdentifierOf(Node.class); // Look for the Node in the created/updated data DataObject dataObject = null; if (map != null && map.get(nodeEntryIid) != null) { dataObject = map.get(nodeEntryIid); } // If we are contained in a bridge managed by this iid if (dataObject != null && dataObject instanceof Node) { Node node = (Node)dataObject; OvsdbBridgeAugmentation bridge = node.getAugmentation(OvsdbBridgeAugmentation.class); if (bridge != null && bridge.getManagedBy() != null && bridge.getManagedBy().getValue().equals(this.iid)) { return bridge.getManagedBy().getValue(); } } return null; }
try { OfPort port = physicalPorts.get(pid); if (port == null || !path.equals(port.getPortPath())) { String msg = "Egress port not found: " + egress; return createTransmitPacketError(msg);