use of org.opendaylight.controller.md.sal.dom.api.DOMMountPoint in project controller by opendaylight.
the class BindingDOMMountPointServiceAdapter method getMountPoint.
@Override
public Optional<MountPoint> getMountPoint(InstanceIdentifier<?> mountPoint) {
YangInstanceIdentifier domPath = codec.toYangInstanceIdentifierBlocking(mountPoint);
Optional<DOMMountPoint> domMount = mountService.getMountPoint(domPath);
if (domMount.isPresent()) {
return Optional.<MountPoint>fromNullable(bindingMountpoints.getUnchecked(domMount.get()));
}
return Optional.absent();
}
use of org.opendaylight.controller.md.sal.dom.api.DOMMountPoint in project controller by opendaylight.
the class MountPointServiceTest method createSimpleMountPoint.
@Test
public void createSimpleMountPoint() {
Optional<DOMMountPoint> mountNotPresent = mountService.getMountPoint(PATH);
assertFalse(mountNotPresent.isPresent());
DOMMountPointBuilder mountBuilder = mountService.createMountPoint(PATH);
mountBuilder.register();
Optional<DOMMountPoint> mountPresent = mountService.getMountPoint(PATH);
assertTrue(mountPresent.isPresent());
}
Aggregations