use of com.iwave.ext.linux.command.ListMountPointsCommand in project coprhd-controller by CoprHD.
the class FindMountPointsForVolumes method executeTask.
@Override
public Void executeTask() throws Exception {
ListMountPointsCommand command = new ListMountPointsCommand();
Map<String, MountPoint> results = executeCommand(command, SHORT_TIMEOUT);
for (VolumeSpec volume : volumes) {
volume.mountPoint = LinuxUtils.getMountPoint(hostId, results, volume.viprVolume);
}
return null;
}
use of com.iwave.ext.linux.command.ListMountPointsCommand in project coprhd-controller by CoprHD.
the class LinuxSystemCLI method listMountPoints.
public List<MountPoint> listMountPoints() {
ListMountPointsCommand command = new ListMountPointsCommand();
executeCommand(command);
return Lists.newArrayList(command.getResults().values());
}
use of com.iwave.ext.linux.command.ListMountPointsCommand in project coprhd-controller by CoprHD.
the class LinuxMountUtils method verifyMountPoints.
public boolean verifyMountPoints(String mountPoint, String mountPath) throws InternalException {
ListMountPointsCommand command = new ListMountPointsCommand();
_log.info("check existing command:" + command.getResolvedCommandLine());
cli.executeCommand(command);
Map<String, MountPoint> mountPoints = command.getResults();
for (MountPoint mp : mountPoints.values()) {
if (StringUtils.equals(mp.getDevice(), mountPoint) && StringUtils.equals(mp.getPath(), mountPath)) {
return true;
}
}
return false;
}
use of com.iwave.ext.linux.command.ListMountPointsCommand in project coprhd-controller by CoprHD.
the class LinuxMountUtils method checkExistingMountPoints.
protected void checkExistingMountPoints(String mountPoint) throws InternalException {
ListMountPointsCommand command = new ListMountPointsCommand();
_log.info("check existing command:" + command.getResolvedCommandLine());
cli.executeCommand(command);
Map<String, MountPoint> mountPoints = command.getResults();
for (MountPoint mp : mountPoints.values()) {
if (StringUtils.equals(mp.getPath(), mountPoint)) {
throw new IllegalStateException("Mount point already exists: " + mountPoint);
}
}
}
Aggregations