Search in sources :

Example 1 with VolumeIngest

use of com.emc.storageos.model.block.VolumeIngest in project coprhd-controller by CoprHD.

the class ApiSystemTestUtil method ingestUnManagedVolume.

public List<String> ingestUnManagedVolume(List<URI> volumes, URI project, URI varray, URI vpool) {
    List<String> nativeGuids = new ArrayList<String>();
    try {
        VolumeIngest input = new VolumeIngest();
        input.setProject(project);
        ;
        input.setVarray(varray);
        ;
        input.setVpool(vpool);
        input.setUnManagedVolumes(volumes);
        ;
        Tasks<UnManagedVolumeRestRep> rep = client.unmanagedVolumes().ingest(input);
        for (UnManagedVolumeRestRep uvol : rep.get()) {
            log.info(String.format("Unmanaged volume %s ", uvol.getNativeGuid()));
            nativeGuids.add(uvol.getNativeGuid());
        }
        return nativeGuids;
    } catch (ServiceErrorException ex) {
        log.error("Exception discovering storage system " + ex.getMessage(), ex);
        throw ex;
    }
}
Also used : VolumeIngest(com.emc.storageos.model.block.VolumeIngest) ArrayList(java.util.ArrayList) UnManagedVolumeRestRep(com.emc.storageos.model.block.UnManagedVolumeRestRep) ServiceErrorException(com.emc.vipr.client.exceptions.ServiceErrorException)

Example 2 with VolumeIngest

use of com.emc.storageos.model.block.VolumeIngest in project coprhd-controller by CoprHD.

the class IngestUnexportedUnmanagedVolumes method doExecute.

@Override
protected Tasks<UnManagedVolumeRestRep> doExecute() throws Exception {
    VolumeIngest ingest = new VolumeIngest();
    ingest.setVpool(vpoolId);
    ingest.setProject(projectId);
    ingest.setVarray(varrayId);
    ingest.setVplexIngestionMethod(ingestionMethod);
    return executeChunks(ingest);
}
Also used : VolumeIngest(com.emc.storageos.model.block.VolumeIngest)

Aggregations

VolumeIngest (com.emc.storageos.model.block.VolumeIngest)2 UnManagedVolumeRestRep (com.emc.storageos.model.block.UnManagedVolumeRestRep)1 ServiceErrorException (com.emc.vipr.client.exceptions.ServiceErrorException)1 ArrayList (java.util.ArrayList)1