private QosEntriesImpl(QosEntriesBuilder base) { if (base.getKey() == null) { this._key = new QosEntriesKey( base.getQosId() ); this._qosId = base.getQosId(); } else { this._key = base.getKey(); this._qosId = _key.getQosId(); } this._qosExternalIds = base.getQosExternalIds(); this._qosOtherConfig = base.getQosOtherConfig(); this._qosType = base.getQosType(); this._qosUuid = base.getQosUuid(); this._queueList = base.getQueueList(); switch (base.augmentation.size()) { case 0: this.augmentation = Collections.emptyMap(); break; case 1: final Map.Entry<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.ovsdb.node.attributes.QosEntries>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.ovsdb.node.attributes.QosEntries>> e = base.augmentation.entrySet().iterator().next(); this.augmentation = Collections.<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.ovsdb.node.attributes.QosEntries>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.ovsdb.node.attributes.QosEntries>>singletonMap(e.getKey(), e.getValue()); break; default : this.augmentation = new HashMap<>(base.augmentation); } }
public QosEntriesBuilder(QosEntries base) { if (base.getKey() == null) { this._key = new QosEntriesKey( base.getQosId() ); this._qosId = base.getQosId(); } else { this._key = base.getKey(); this._qosId = _key.getQosId(); } this._qosExternalIds = base.getQosExternalIds(); this._qosOtherConfig = base.getQosOtherConfig(); this._qosType = base.getQosType(); this._qosUuid = base.getQosUuid(); this._queueList = base.getQueueList(); if (base instanceof QosEntriesImpl) { QosEntriesImpl impl = (QosEntriesImpl) 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.QosEntries> casted =(AugmentationHolder<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.ovsdb.node.attributes.QosEntries>) base; if (!casted.augmentations().isEmpty()) { this.augmentation = new HashMap<>(casted.augmentations()); } } }
Uri qosId = qosRef.getValue().firstKeyOf(QosEntries.class).getQosId(); OvsdbNodeAugmentation operNode = getOperNode(operBridge); if (operNode != null && operNode.getQosEntries() != null
@SuppressWarnings("unchecked") private String getQosId(Qos qos) { if (qos.getExternalIdsColumn() != null && qos.getExternalIdsColumn().getData() != null) { if (qos.getExternalIdsColumn().getData().containsKey(SouthboundConstants.IID_EXTERNAL_ID_KEY)) { InstanceIdentifier<QosEntries> qosIid = (InstanceIdentifier<QosEntries>) SouthboundUtil.deserializeInstanceIdentifier( qos.getExternalIdsColumn().getData().get(SouthboundConstants.IID_EXTERNAL_ID_KEY)); if (qosIid != null) { QosEntriesKey qosEntriesKey = qosIid.firstKeyOf(QosEntries.class); if (qosEntriesKey != null) { return qosEntriesKey.getQosId().getValue(); } } } else if (qos.getExternalIdsColumn().getData().containsKey(SouthboundConstants.QOS_ID_EXTERNAL_ID_KEY)) { return qos.getExternalIdsColumn().getData().get(SouthboundConstants.QOS_ID_EXTERNAL_ID_KEY); } } return SouthboundConstants.QOS_URI_PREFIX + "://" + qos.getUuid().toString(); }