private Uuid getQueueUuid(List<Queues> operQueues, Uri queueId) { if (operQueues != null && !operQueues.isEmpty()) { for (Queues queueEntry : operQueues) { if (queueEntry.getQueueId().equals(queueId)) { return queueEntry.getQueueUuid(); } } } return null; }
private Uuid getQueueEntryUuid(List<Queues> operQueues, Uri queueId) { if (operQueues != null && !operQueues.isEmpty()) { for (Queues queueEntry : operQueues) { if (queueEntry.getQueueId().equals(queueId)) { return queueEntry.getQueueUuid(); } } } return null; } }
return false; if (!Objects.equals(_queueUuid, other.getQueueUuid())) { return false;
private QueuesKey getQueueKey(Node node, UUID queueUuid) { List<Queues> queueList = node.getAugmentation(OvsdbNodeAugmentation.class).getQueues(); if (queueList == null || queueList.isEmpty()) { LOG.debug("Deleting Queue {}, Ovsdb Node {} does not have a Queue list.", queueUuid.toString(), node); return null; } Iterator<Queues> itr = queueList.iterator(); Uuid quUuid = new Uuid(queueUuid.toString()); while (itr.hasNext()) { Queues queue = itr.next(); if (queue.getQueueUuid().equals(quUuid)) { return queue.getKey(); } } LOG.debug("Deleted Queue {} not found in Ovsdb Node {}", queueUuid.toString(), node); return null; }
public QueuesBuilder(Queues base) { if (base.getKey() == null) { this._key = new QueuesKey( base.getQueueId() ); this._queueId = base.getQueueId(); } else { this._key = base.getKey(); this._queueId = _key.getQueueId(); } this._dscp = base.getDscp(); this._queueUuid = base.getQueueUuid(); this._queuesExternalIds = base.getQueuesExternalIds(); this._queuesOtherConfig = base.getQueuesOtherConfig(); if (base instanceof QueuesImpl) { QueuesImpl impl = (QueuesImpl) 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.Queues> casted =(AugmentationHolder<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.ovsdb.node.attributes.Queues>) base; if (!casted.augmentations().isEmpty()) { this.augmentation = new HashMap<>(casted.augmentations()); } } }
private String getQueueUuid(OvsdbQueueRef queueRef, OvsdbNodeAugmentation operNode) { QueuesKey queueKey = queueRef.getValue().firstKeyOf(Queues.class); if (operNode.getQueues() != null && !operNode.getQueues().isEmpty()) { for (Queues queue : operNode.getQueues()) { if (queue.getQueueId().equals(queueKey.getQueueId())) { return queue.getQueueUuid().getValue(); } } } return SouthboundConstants.QUEUE_NAMED_UUID_PREFIX + TransactUtils.bytesToHexString(queueKey.getQueueId().getValue().getBytes()); }
.getAugmentation(OvsdbNodeAugmentation.class).getQueues(); for (final Queues queue : queuesList) { queueUuid = queue.getQueueUuid();
@SuppressWarnings("unchecked") private InstanceIdentifier<Queues> getQueueIid(UUID queueUuid, Node ovsdbNode) { Queue queue = getQueue(queueUuid); if (queue != null && queue.getExternalIdsColumn() != null && queue.getExternalIdsColumn().getData() != null && queue.getExternalIdsColumn().getData().containsKey(SouthboundConstants.IID_EXTERNAL_ID_KEY)) { return (InstanceIdentifier<Queues>) SouthboundUtil.deserializeInstanceIdentifier( queue.getExternalIdsColumn().getData().get(SouthboundConstants.IID_EXTERNAL_ID_KEY)); } else { OvsdbNodeAugmentation node = ovsdbNode.getAugmentation(OvsdbNodeAugmentation.class); if (node.getQueues() != null && !node.getQueues().isEmpty()) { for (Queues q : node.getQueues()) { if (q.getQueueUuid().equals(new Uuid(queueUuid.toString()))) { return SouthboundMapper.createInstanceIdentifier(ovsdbNode.getNodeId()) .augmentation(OvsdbNodeAugmentation.class) .child(Queues.class, new QueuesKey(q.getQueueId())); } } } LOG.debug("A Queue with UUID {} was not found in Ovsdb Node {}", queueUuid, node); return SouthboundMapper.createInstanceIdentifier(ovsdbNode.getNodeId()) .augmentation(OvsdbNodeAugmentation.class) .child(Queues.class, new QueuesKey( new Uri(SouthboundConstants.QUEUE_URI_PREFIX + "://" + queueUuid.toString()))); } }