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