use of util.builders.FileVirtualPoolBuilder in project coprhd-controller by CoprHD.
the class FileVirtualPoolForm method doSave.
protected FileVirtualPoolRestRep doSave() {
FileVirtualPoolRestRep virtualPool;
if (isNew()) {
FileVirtualPoolBuilder builder = apply(new FileVirtualPoolBuilder());
virtualPool = VirtualPoolUtils.create(builder.getVirtualPool());
this.id = ResourceUtils.stringId(virtualPool);
} else {
FileVirtualPoolRestRep oldVirtualPool = VirtualPoolUtils.getFileVirtualPool(id);
FileVirtualPoolUpdateBuilder builder = apply(new FileVirtualPoolUpdateBuilder(oldVirtualPool));
virtualPool = VirtualPoolUtils.update(id, builder.getVirtualPoolUpdate());
List<NamedRelatedResourceRep> matchingPools = VirtualPoolUtils.refreshMatchingPools(virtualPool);
Logger.info("Refreshed File Virtual Pool '%s' matching pools: %d", virtualPool.getName(), matchingPools.size());
}
virtualPool = saveStoragePools(virtualPool);
return virtualPool;
}
use of util.builders.FileVirtualPoolBuilder in project coprhd-controller by CoprHD.
the class FileVirtualPoolForm method matchingStoragePools.
public MatchingFileStoragePoolsCall matchingStoragePools() {
FileVirtualPoolBuilder builder = new FileVirtualPoolBuilder();
apply(builder);
builder.setUseMatchedPools(true);
return new MatchingFileStoragePoolsCall(builder.getVirtualPool());
}
Aggregations