if (!Objects.equals(_key, other.getKey())) { return false;
public ManagerEntryBuilder(ManagerEntry base) { if (base.getKey() == null) { this._key = new ManagerEntryKey( base.getTarget() ); this._target = base.getTarget(); } else { this._key = base.getKey(); this._target = _key.getTarget(); } this._numberOfConnections = base.getNumberOfConnections(); this._connected = base.isConnected(); if (base instanceof ManagerEntryImpl) { ManagerEntryImpl impl = (ManagerEntryImpl) base; if (!impl.augmentation.isEmpty()) { this.augmentation = new HashMap<>(impl.augmentation); } } else if (base instanceof AugmentationHolder) { @SuppressWarnings("unchecked") AugmentationHolder<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.ovsdb.node.attributes.ManagerEntry> casted =(AugmentationHolder<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.ovsdb.node.attributes.ManagerEntry>) base; if (!casted.augmentations().isEmpty()) { this.augmentation = new HashMap<>(casted.augmentations()); } } }
InstanceIdentifier<ManagerEntry> iid = connectionIId .augmentation(OvsdbNodeAugmentation.class) .child(ManagerEntry.class, managerEntry.getKey()); transaction.merge(LogicalDatastoreType.OPERATIONAL, iid, managerEntry);
/** * Create the {@link InstanceIdentifier} for the {@link ManagerEntry}. * * @param managerEntry the {@link ManagerEntry} * @return the {@link InstanceIdentifier} */ private InstanceIdentifier<ManagerEntry> getManagerEntryIid(ManagerEntry managerEntry) { OvsdbConnectionInstance client = getOvsdbConnectionInstance(); String nodeString = client.getNodeKey().getNodeId().getValue(); NodeId nodeId = new NodeId(new Uri(nodeString)); NodeKey nodeKey = new NodeKey(nodeId); InstanceIdentifier<Node> ovsdbNodeIid = InstanceIdentifier.builder(NetworkTopology.class) .child(Topology.class,new TopologyKey(SouthboundConstants.OVSDB_TOPOLOGY_ID)) .child(Node.class,nodeKey) .build(); return ovsdbNodeIid .augmentation(OvsdbNodeAugmentation.class) .child(ManagerEntry.class, managerEntry.getKey()); }