use of com.emc.storageos.model.file.FileSystemSnapshotParam in project coprhd-controller by CoprHD.
the class ApiTest method checkSnapCreate.
private void checkSnapCreate(BalancedWebResource user, boolean good) {
FileSystemSnapshotParam param = new FileSystemSnapshotParam();
param.setLabel("test-fs-snap-" + System.currentTimeMillis());
String snapCreateURL = String.format("/file/filesystems/%s/snapshots", _fs);
if (good) {
TaskResourceRep resp = user.path(snapCreateURL).post(TaskResourceRep.class, param);
Assert.assertNotNull(resp.getOpId());
Assert.assertNotNull(resp.getResource());
} else {
ClientResponse resp = user.path(snapCreateURL).post(ClientResponse.class, param);
Assert.assertEquals(403, resp.getStatus());
}
}
use of com.emc.storageos.model.file.FileSystemSnapshotParam in project coprhd-controller by CoprHD.
the class CreateFileSnapshot method doExecute.
@Override
protected Task<FileSnapshotRestRep> doExecute() throws Exception {
FileSystemSnapshotParam snapshot = new FileSystemSnapshotParam();
snapshot.setLabel(name);
return getClient().fileSnapshots().createForFileSystem(fileSystemId, snapshot);
}
Aggregations