use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.cluster.admin.rev151013.DataStoreType in project netvirt by opendaylight.
the class FloatingIPListener method getExtNetworkId.
private Uuid getExtNetworkId(final InstanceIdentifier<RouterPorts> portIid, LogicalDatastoreType dataStoreType) {
Optional<RouterPorts> rtrPort = SingleTransactionDataBroker.syncReadOptionalAndTreatReadFailedExceptionAsAbsentOptional(dataBroker, dataStoreType, portIid);
if (!rtrPort.isPresent()) {
LOG.error("getExtNetworkId : Unable to read router port entry for {}", portIid);
return null;
}
Uuid extNwId = rtrPort.get().getExternalNetworkId();
return extNwId;
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.cluster.admin.rev151013.DataStoreType in project genius by opendaylight.
the class HwvtepUtils method getPhysicalLocator.
/**
* Gets the physical locator.
*
* @param broker
* the broker
* @param datastoreType
* the datastore type
* @param nodeId
* the node id
* @param phyLocatorIp
* the phy locator ip
* @return the physical locator
*/
public static HwvtepPhysicalLocatorAugmentation getPhysicalLocator(DataBroker broker, LogicalDatastoreType datastoreType, NodeId nodeId, final IpAddress phyLocatorIp) {
HwvtepPhysicalLocatorAugmentation phyLocatorAug = HwvtepSouthboundUtils.createHwvtepPhysicalLocatorAugmentation(String.valueOf(phyLocatorIp.getValue()));
InstanceIdentifier<HwvtepPhysicalLocatorAugmentation> iid = HwvtepSouthboundUtils.createPhysicalLocatorInstanceIdentifier(nodeId, phyLocatorAug).augmentation(HwvtepPhysicalLocatorAugmentation.class);
return MDSALUtil.read(broker, datastoreType, iid).orNull();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.cluster.admin.rev151013.DataStoreType in project genius by opendaylight.
the class HwvtepUtils method getPhysicalPortTerminationPoint.
/**
* Gets physical port termination point.
*
* @param broker
* the broker
* @param datastoreType
* the datastore type
* @param nodeId
* the physical switch node id
* @param portName
* port name under physical switch node id
* @return the physical port termination point
*/
public static TerminationPoint getPhysicalPortTerminationPoint(DataBroker broker, LogicalDatastoreType datastoreType, NodeId nodeId, String portName) {
TerminationPointKey tpKey = new TerminationPointKey(new TpId(portName));
InstanceIdentifier<TerminationPoint> iid = HwvtepSouthboundUtils.createTerminationPointId(nodeId, tpKey);
return MDSALUtil.read(broker, datastoreType, iid).orNull();
}
Aggregations