Search in sources :

Example 6 with VolumeGroupUpdateParam

use of com.emc.storageos.model.application.VolumeGroupUpdateParam in project coprhd-controller by CoprHD.

the class AddVolumesToApplication method doExecute.

@Override
protected Tasks<TaskResourceRep> doExecute() throws Exception {
    VolumeGroupUpdateParam input = new VolumeGroupUpdateParam();
    VolumeGroupVolumeList addVolumesList = new VolumeGroupVolumeList();
    addVolumesList.setVolumes(volumeIds);
    if (replicationGroup != null && !replicationGroup.isEmpty()) {
        addVolumesList.setReplicationGroupName(replicationGroup);
    }
    input.setAddVolumesList(addVolumesList);
    TaskList taskList = getClient().application().updateApplication(applicationId, input);
    return new Tasks<TaskResourceRep>(getClient().auth().getClient(), taskList.getTaskList(), TaskResourceRep.class);
}
Also used : VolumeGroupVolumeList(com.emc.storageos.model.application.VolumeGroupUpdateParam.VolumeGroupVolumeList) WaitForTasks(com.emc.sa.service.vipr.tasks.WaitForTasks) Tasks(com.emc.vipr.client.Tasks) TaskList(com.emc.storageos.model.TaskList) VolumeGroupUpdateParam(com.emc.storageos.model.application.VolumeGroupUpdateParam)

Example 7 with VolumeGroupUpdateParam

use of com.emc.storageos.model.application.VolumeGroupUpdateParam in project coprhd-controller by CoprHD.

the class RemoveVolumesFromApplication method doExecute.

@Override
protected Tasks<TaskResourceRep> doExecute() throws Exception {
    VolumeGroupUpdateParam input = new VolumeGroupUpdateParam();
    VolumeGroupVolumeList removeVolumesList = new VolumeGroupVolumeList();
    removeVolumesList.setVolumes(volumeIds);
    input.setRemoveVolumesList(removeVolumesList);
    TaskList taskList = getClient().application().updateApplication(applicationId, input);
    return new Tasks<TaskResourceRep>(getClient().auth().getClient(), taskList.getTaskList(), TaskResourceRep.class);
}
Also used : VolumeGroupVolumeList(com.emc.storageos.model.application.VolumeGroupUpdateParam.VolumeGroupVolumeList) WaitForTasks(com.emc.sa.service.vipr.tasks.WaitForTasks) Tasks(com.emc.vipr.client.Tasks) TaskList(com.emc.storageos.model.TaskList) VolumeGroupUpdateParam(com.emc.storageos.model.application.VolumeGroupUpdateParam)

Example 8 with VolumeGroupUpdateParam

use of com.emc.storageos.model.application.VolumeGroupUpdateParam in project coprhd-controller by CoprHD.

the class AddHostsToMobilityGroup method doExecute.

@Override
protected Tasks<TaskResourceRep> doExecute() throws Exception {
    VolumeGroupUpdateParam input = new VolumeGroupUpdateParam();
    input.setAddHostsList(hostIds);
    TaskList taskList = getClient().application().updateApplication(mobilityGroupId, input);
    return new Tasks<TaskResourceRep>(getClient().auth().getClient(), taskList.getTaskList(), TaskResourceRep.class);
}
Also used : WaitForTasks(com.emc.sa.service.vipr.tasks.WaitForTasks) Tasks(com.emc.vipr.client.Tasks) TaskList(com.emc.storageos.model.TaskList) VolumeGroupUpdateParam(com.emc.storageos.model.application.VolumeGroupUpdateParam)

Aggregations

WaitForTasks (com.emc.sa.service.vipr.tasks.WaitForTasks)8 TaskList (com.emc.storageos.model.TaskList)8 VolumeGroupUpdateParam (com.emc.storageos.model.application.VolumeGroupUpdateParam)8 Tasks (com.emc.vipr.client.Tasks)8 VolumeGroupVolumeList (com.emc.storageos.model.application.VolumeGroupUpdateParam.VolumeGroupVolumeList)4