use of com.emc.storageos.model.NamedRelatedResourceRep 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 com.emc.storageos.model.NamedRelatedResourceRep in project coprhd-controller by CoprHD.
the class ExecutionWindowUtils method getExecutionWindows.
public static List<ExecutionWindowRestRep> getExecutionWindows() {
ViPRCatalogClient2 catalog = getCatalogClient();
List<NamedRelatedResourceRep> reps = catalog.executionWindows().listByUserTenant();
return catalog.executionWindows().getByRefs(reps);
}
use of com.emc.storageos.model.NamedRelatedResourceRep in project coprhd-controller by CoprHD.
the class BlockVolumes method volumeMigrations.
public static void volumeMigrations(String volumeId) {
ViPRCoreClient client = BourneUtil.getViprClient();
List<NamedRelatedResourceRep> migrationsRep = client.blockVolumes().listMigrations(uri(volumeId));
List<MigrationRestRep> migrations = client.blockMigrations().getByRefs(migrationsRep);
render(migrations);
}
use of com.emc.storageos.model.NamedRelatedResourceRep in project coprhd-controller by CoprHD.
the class BlockVolumes method volumeSnapshotSessions.
public static void volumeSnapshotSessions(String volumeId) {
ViPRCoreClient client = BourneUtil.getViprClient();
VolumeRestRep volume = client.blockVolumes().get(uri(volumeId));
List<BlockSnapshotSessionRestRep> snapshotSessions = Lists.newArrayList();
if (volume.getConsistencyGroup() != null) {
URI consistencygroup = volume.getConsistencyGroup().getId();
List<NamedRelatedResourceRep> cgSessions = client.blockConsistencyGroups().getSnapshotSessions(consistencygroup);
snapshotSessions = client.blockSnapshotSessions().getByRefs(cgSessions);
} else {
List<NamedRelatedResourceRep> refs = client.blockSnapshotSessions().listByVolume(uri(volumeId));
snapshotSessions = client.blockSnapshotSessions().getByRefs(refs);
}
render(snapshotSessions, volumeId);
}
use of com.emc.storageos.model.NamedRelatedResourceRep in project coprhd-controller by CoprHD.
the class FileSystems method fileSystemSnapshots.
public static void fileSystemSnapshots(String fileSystemId) {
ViPRCoreClient client = BourneUtil.getViprClient();
List<NamedRelatedResourceRep> refs = client.fileSnapshots().listByFileSystem(uri(fileSystemId));
List<FileSnapshotRestRep> snapshots = client.fileSnapshots().getByRefs(refs);
render(snapshots);
}
Aggregations