use of com.cloud.storage.snapshot.SnapshotSchedule in project CloudStack-archive by CloudStack-extras.
the class ListRecurringSnapshotScheduleCmd method execute.
@Override
public void execute() {
List<? extends SnapshotSchedule> snapshotSchedules = _snapshotService.findRecurringSnapshotSchedule(this);
ListResponse<SnapshotScheduleResponse> response = new ListResponse<SnapshotScheduleResponse>();
List<SnapshotScheduleResponse> snapshotScheduleResponses = new ArrayList<SnapshotScheduleResponse>();
for (SnapshotSchedule snapshotSchedule : snapshotSchedules) {
SnapshotScheduleResponse snapSchedResponse = new SnapshotScheduleResponse();
snapSchedResponse.setId(snapshotSchedule.getId());
snapSchedResponse.setVolumeId(snapshotSchedule.getVolumeId());
snapSchedResponse.setSnapshotPolicyId(snapshotSchedule.getPolicyId());
snapSchedResponse.setScheduled(snapshotSchedule.getScheduledTimestamp());
snapSchedResponse.setObjectName("snapshot");
snapshotScheduleResponses.add(snapSchedResponse);
}
response.setResponses(snapshotScheduleResponses);
response.setResponseName(getCommandName());
this.setResponseObject(response);
}
use of com.cloud.storage.snapshot.SnapshotSchedule in project cloudstack by apache.
the class ListRecurringSnapshotScheduleCmd method execute.
@Override
public void execute() {
List<? extends SnapshotSchedule> snapshotSchedules = _snapshotService.findRecurringSnapshotSchedule(this);
ListResponse<SnapshotScheduleResponse> response = new ListResponse<SnapshotScheduleResponse>();
List<SnapshotScheduleResponse> snapshotScheduleResponses = new ArrayList<SnapshotScheduleResponse>();
for (SnapshotSchedule snapshotSchedule : snapshotSchedules) {
SnapshotScheduleResponse snapSchedResponse = _responseGenerator.createSnapshotScheduleResponse(snapshotSchedule);
snapshotScheduleResponses.add(snapSchedResponse);
}
response.setResponses(snapshotScheduleResponses);
response.setResponseName(getCommandName());
this.setResponseObject(response);
}
Aggregations