/** * Return a reference to the node that contains this flow table. * * @return A reference to the node that contains this flow table. */ private NodeRef getNodeRef() { return new NodeRef(tablePath.firstIdentifierOf(Node.class)); }
@Override public boolean equals(java.lang.Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } PortKey other = (PortKey) obj; if (_id == null) { if (other._id != null) { return false; } } else if(!_id.equals(other._id)) { return false; } if (_node == null) { if (other._node != null) { return false; } } else if(!_node.equals(other._node)) { return false; } return true; }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((_node == null) ? 0 : _node.hashCode()); result = prime * result + ((augmentation == null) ? 0 : augmentation.hashCode()); return result; }
public static NodeKey getNodeKey(final NodeRef ref) { return ref.getValue().firstKeyOf(Node.class, NodeKey.class); }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((_node == null) ? 0 : _node.hashCode()); result = prime * result + ((augmentation == null) ? 0 : augmentation.hashCode()); return result; }
/** * @param path pointer to element * @return extracted {@link NodeKey} and wrapped in {@link NodeRef} */ public static NodeRef createNodeRef(InstanceIdentifier<?> path) { final InstanceIdentifier<Node> nodePath = Preconditions.checkNotNull(path.firstIdentifierOf(Node.class)); return new NodeRef(nodePath); }
public static org.opendaylight.controller.sal.core.Node toADNode(final NodeRef node) throws ConstructionException { return NodeMapping.toADNode(node.getValue()); }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((_node == null) ? 0 : _node.hashCode()); result = prime * result + ((augmentation == null) ? 0 : augmentation.hashCode()); return result; }
@Override public boolean equals(java.lang.Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } MeterKey other = (MeterKey) obj; if (_id == null) { if (other._id != null) { return false; } } else if(!_id.equals(other._id)) { return false; } if (_node == null) { if (other._node != null) { return false; } } else if(!_node.equals(other._node)) { return false; } return true; }
/** * Return a {@link NodeRef} instance corresponding to this instance. * * @return An {@link NodeRef} instance. */ public NodeRef getNodeRef() { return new NodeRef(getNodeIdentifier()); }
private JoinTopicInput getJoinTopicInputArgument(final InstanceIdentifier<?> path) { final NodeRef nodeRef = new NodeRef(path); final JoinTopicInput jti = new JoinTopicInputBuilder() .setNode(nodeRef.getValue()) .setTopicId(topicId) .setNotificationPattern(notificationPattern) .build(); return jti; }
@Override public void onNodeRemoved(final NodeRemoved notification) { Preconditions.checkNotNull(notification); final NodeRef nodeRef = notification.getNodeRef(); final InstanceIdentifier<?> nodeRefIdent = nodeRef.getValue(); final InstanceIdentifier<Node> nodeIdent = nodeRefIdent.firstIdentifierOf(Node.class); if (nodeIdent != null) { disconnectFlowCapableNode(nodeIdent); } }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((_node == null) ? 0 : _node.hashCode()); result = prime * result + ((augmentation == null) ? 0 : augmentation.hashCode()); return result; }
@Override public boolean equals(java.lang.Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } GroupKey other = (GroupKey) obj; if (_id == null) { if (other._id != null) { return false; } } else if(!_id.equals(other._id)) { return false; } if (_node == null) { if (other._node != null) { return false; } } else if(!_node.equals(other._node)) { return false; } return true; }
public static NodeRef getNodeRef(NodeConnectorRef nodeConnectorRef) { InstanceIdentifier<Node> nodeIID = nodeConnectorRef.getValue() .firstIdentifierOf(Node.class); return new NodeRef(nodeIID); }
private JoinTopicInput getJoinTopicInputArgument(final InstanceIdentifier<?> path) { final NodeRef nodeRef = new NodeRef(path); final JoinTopicInput jti = new JoinTopicInputBuilder() .setNode(nodeRef.getValue()) .setTopicId(topicId) .setNotificationPattern(notificationPattern) .build(); return jti; }
/** * Convert a MD-SAL node reference into a {@link SalNode} instance. * * @param ref A {@link NodeRef} instance. * @return A {@code SalNode} instance on success. * {@code null} on failure. */ public static final SalNode create(NodeRef ref) { if (ref == null) { return null; } InstanceIdentifier<?> id = ref.getValue(); if (id == null) { return null; } return create(id.firstKeyOf(Node.class)); }