Search in sources :

Example 1 with CreateBrickVDSParameters

use of org.ovirt.engine.core.common.vdscommands.gluster.CreateBrickVDSParameters in project ovirt-engine by oVirt.

the class CreateBrickVDSCommand method executeVdsBrokerCommand.

@Override
protected void executeVdsBrokerCommand() {
    CreateBrickVDSParameters parameters = getParameters();
    Set<String> diskNames = new HashSet<>();
    for (StorageDevice storageDevice : parameters.getStorageDevices()) {
        diskNames.add(storageDevice.getName());
    }
    storageDeviceReturn = getBroker().glusterCreateBrick(parameters.getLvName(), parameters.getMountPoint(), parameters.getRaidParams(), parameters.getFsType(), diskNames.toArray(new String[0]));
    proceedProxyReturnValue();
    if (getVDSReturnValue().getSucceeded()) {
        StorageDevice storageDevice = storageDeviceReturn.getStorageDevice();
        storageDevice.setVdsId(getParameters().getVdsId());
        storageDevice.setId(Guid.newGuid());
        setReturnValue(storageDevice);
    }
}
Also used : CreateBrickVDSParameters(org.ovirt.engine.core.common.vdscommands.gluster.CreateBrickVDSParameters) StorageDevice(org.ovirt.engine.core.common.businessentities.gluster.StorageDevice) HashSet(java.util.HashSet)

Aggregations

HashSet (java.util.HashSet)1 StorageDevice (org.ovirt.engine.core.common.businessentities.gluster.StorageDevice)1 CreateBrickVDSParameters (org.ovirt.engine.core.common.vdscommands.gluster.CreateBrickVDSParameters)1