+
+ // First check if QosEntry is present and use that
+ if (terminationPoint.getQosEntry() != null && !terminationPoint.getQosEntry().isEmpty()) {
+ OvsdbQosRef qosRef = terminationPoint.getQosEntry().iterator().next().getQosRef();
+ Uri qosId = qosRef.getValue().firstKeyOf(QosEntries.class).getQosId();
+ OvsdbNodeAugmentation operNode = getOperNode(operBridge);
+ if (operNode != null && operNode.getQosEntries() != null &&
+ !operNode.getQosEntries().isEmpty()) {
+ for (QosEntries qosEntry : operNode.getQosEntries()) {
+ if (qosEntry.getQosId().equals(qosId)) {
+ uuidSet.add(new UUID(qosEntry.getQosUuid().getValue()));
+ }
+ }
+ }
+ if (uuidSet.size() == 0) {
+ uuidSet.add(new UUID(SouthboundConstants.QOS_NAMED_UUID_PREFIX +
+ TransactUtils.bytesToHexString(qosId.getValue().getBytes())));
+ }
+ } else {
+ // Second check if Qos is present and use that (deprecated)
+ // Do not bother to check if QosEntry and Qos are consistent if both are present
+ Uuid qosUuid = terminationPoint.getQos();
+ if (qosUuid != null) {
+ uuidSet.add(new UUID(qosUuid.getValue()));
+ }