use of com.cloud.api.response.SnapshotScheduleResponse 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);
}
Aggregations