protected void addTasksForVolumesAndCGs(DbClient dbClient,List<Volume> addVols,List<Volume> removeVols,Set<URI> removeVolumeCGs,String taskId,TaskList taskList){
  if (addVols != null && !addVols.isEmpty()) {
    for (    Volume vol : addVols) {
      addVolumeTask(dbClient,vol,taskList,taskId,ResourceOperationTypeEnum.UPDATE_VOLUME_GROUP);
    }
  }
  if (removeVols != null && !removeVols.isEmpty()) {
    for (    Volume vol : removeVols) {
      addVolumeTask(dbClient,vol,taskList,taskId,ResourceOperationTypeEnum.UPDATE_VOLUME_GROUP);
    }
  }
  if (removeVolumeCGs != null && !removeVolumeCGs.isEmpty()) {
    for (    URI cg : removeVolumeCGs) {
      addConsistencyGroupTask(dbClient,cg,taskList,taskId,ResourceOperationTypeEnum.UPDATE_VOLUME_GROUP);
    }
  }
}

protected void addTasksForVolumesAndCGs ( DbClient dbClient , List < Volume > addVols , List < Volume > removeVols , Set < URI > removeVolumeCGs , String taskId , TaskList taskList ) { if ( addVols != null && ! addVols . isEmpty ( ) ) { for ( Volume vol : addVols ) { addVolumeTask ( dbClient , vol , taskList , taskId , ResourceOperationTypeEnum . UPDATE_VOLUME_GROUP ) ; } } if ( removeVols != null && ! removeVols . isEmpty ( ) ) { for ( Volume vol : removeVols ) { addVolumeTask ( dbClient , vol , taskList , taskId , ResourceOperationTypeEnum . UPDATE_VOLUME_GROUP ) ; } } if ( removeVolumeCGs != null && ! removeVolumeCGs . isEmpty ( ) ) { for ( URI cg : removeVolumeCGs ) { addConsistencyGroupTask ( dbClient , cg , taskList , taskId , ResourceOperationTypeEnum . UPDATE_VOLUME_GROUP ) ; } } }
add task for volumes and consistency groups
