mirror of https://github.com/apache/cloudstack.git
refactor
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
This commit is contained in:
parent
c0b8aa636a
commit
3a02433d75
|
|
@ -533,6 +533,7 @@ public class ServerAdapter extends ManagerBase {
|
|||
}
|
||||
|
||||
public Vm updateInstance(String uuid, Vm request) {
|
||||
// ToDo: what to do?!
|
||||
return getInstance(uuid);
|
||||
}
|
||||
|
||||
|
|
@ -724,11 +725,11 @@ public class ServerAdapter extends ManagerBase {
|
|||
if (StringUtils.isBlank(name) && !name.startsWith("Veeam_KvmBackupDisk_")) {
|
||||
throw new InvalidParameterValueException("Only worker VM disk creation is supported");
|
||||
}
|
||||
if (request.getStorageDomains() == null || CollectionUtils.isEmpty(request.getStorageDomains().getStorageDomain()) ||
|
||||
request.getStorageDomains().getStorageDomain().size() > 1) {
|
||||
if (request.getStorageDomains() == null || CollectionUtils.isEmpty(request.getStorageDomains().getItems()) ||
|
||||
request.getStorageDomains().getItems().size() > 1) {
|
||||
throw new InvalidParameterValueException("Exactly one storage domain must be specified");
|
||||
}
|
||||
StorageDomain domain = request.getStorageDomains().getStorageDomain().get(0);
|
||||
StorageDomain domain = request.getStorageDomains().getItems().get(0);
|
||||
if (domain == null || domain.getId() == null) {
|
||||
throw new InvalidParameterValueException("Storage domain ID must be specified");
|
||||
}
|
||||
|
|
@ -1154,6 +1155,7 @@ public class ServerAdapter extends ManagerBase {
|
|||
|
||||
public List<Disk> listDisksByBackupUuid(final String uuid) {
|
||||
throw new InvalidParameterValueException("List Backup Disks with ID " + uuid + " not implemented");
|
||||
// ToDo: implement
|
||||
// BackupVO vo = backupDao.findByUuid(uuid);
|
||||
// if (vo == null) {
|
||||
// throw new InvalidParameterValueException("Backup with ID " + uuid + " not found");
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ import org.apache.cloudstack.veeam.RouteHandler;
|
|||
import org.apache.cloudstack.veeam.VeeamControlServlet;
|
||||
import org.apache.cloudstack.veeam.adapter.ServerAdapter;
|
||||
import org.apache.cloudstack.veeam.api.dto.Cluster;
|
||||
import org.apache.cloudstack.veeam.api.dto.Clusters;
|
||||
import org.apache.cloudstack.veeam.api.dto.NamedList;
|
||||
import org.apache.cloudstack.veeam.utils.Negotiation;
|
||||
import org.apache.cloudstack.veeam.utils.PathUtil;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
|
|
@ -85,8 +85,7 @@ public class ClustersRouteHandler extends ManagerBase implements RouteHandler {
|
|||
protected void handleGet(final HttpServletRequest req, final HttpServletResponse resp,
|
||||
Negotiation.OutFormat outFormat, VeeamControlServlet io) throws IOException {
|
||||
final List<Cluster> result = serverAdapter.listAllClusters();
|
||||
final Clusters response = new Clusters(result);
|
||||
|
||||
NamedList<Cluster> response = NamedList.of("cluster", result);
|
||||
io.getWriter().write(resp, HttpServletResponse.SC_OK, response, outFormat);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -28,11 +28,9 @@ import org.apache.cloudstack.veeam.RouteHandler;
|
|||
import org.apache.cloudstack.veeam.VeeamControlServlet;
|
||||
import org.apache.cloudstack.veeam.adapter.ServerAdapter;
|
||||
import org.apache.cloudstack.veeam.api.dto.DataCenter;
|
||||
import org.apache.cloudstack.veeam.api.dto.DataCenters;
|
||||
import org.apache.cloudstack.veeam.api.dto.NamedList;
|
||||
import org.apache.cloudstack.veeam.api.dto.Network;
|
||||
import org.apache.cloudstack.veeam.api.dto.Networks;
|
||||
import org.apache.cloudstack.veeam.api.dto.StorageDomain;
|
||||
import org.apache.cloudstack.veeam.api.dto.StorageDomains;
|
||||
import org.apache.cloudstack.veeam.utils.Negotiation;
|
||||
import org.apache.cloudstack.veeam.utils.PathUtil;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
|
|
@ -99,8 +97,7 @@ public class DataCentersRouteHandler extends ManagerBase implements RouteHandler
|
|||
protected void handleGet(final HttpServletRequest req, final HttpServletResponse resp,
|
||||
Negotiation.OutFormat outFormat, VeeamControlServlet io) throws IOException {
|
||||
final List<DataCenter> result = serverAdapter.listAllDataCenters();
|
||||
final DataCenters response = new DataCenters(result);
|
||||
|
||||
NamedList<DataCenter> response = NamedList.of("data_center", result);
|
||||
io.getWriter().write(resp, HttpServletResponse.SC_OK, response, outFormat);
|
||||
}
|
||||
|
||||
|
|
@ -118,8 +115,7 @@ public class DataCentersRouteHandler extends ManagerBase implements RouteHandler
|
|||
final VeeamControlServlet io) throws IOException {
|
||||
try {
|
||||
List<StorageDomain> storageDomains = serverAdapter.listStorageDomainsByDcId(id);
|
||||
StorageDomains response = new StorageDomains();
|
||||
response.setStorageDomain(storageDomains);
|
||||
NamedList<StorageDomain> response = NamedList.of("storage_domain", storageDomains);
|
||||
io.getWriter().write(resp, HttpServletResponse.SC_OK, response, outFormat);
|
||||
} catch (InvalidParameterValueException e) {
|
||||
io.notFound(resp, e.getMessage(), outFormat);
|
||||
|
|
@ -130,7 +126,7 @@ public class DataCentersRouteHandler extends ManagerBase implements RouteHandler
|
|||
final VeeamControlServlet io) throws IOException {
|
||||
try {
|
||||
List<Network> networks = serverAdapter.listNetworksByDcId(id);
|
||||
Networks response = new Networks(networks);
|
||||
NamedList<Network> response = NamedList.of("network", networks);
|
||||
io.getWriter().write(resp, HttpServletResponse.SC_OK, response, outFormat);
|
||||
} catch (InvalidParameterValueException e) {
|
||||
io.notFound(resp, e.getMessage(), outFormat);
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ import org.apache.cloudstack.veeam.RouteHandler;
|
|||
import org.apache.cloudstack.veeam.VeeamControlServlet;
|
||||
import org.apache.cloudstack.veeam.adapter.ServerAdapter;
|
||||
import org.apache.cloudstack.veeam.api.dto.Disk;
|
||||
import org.apache.cloudstack.veeam.api.dto.Disks;
|
||||
import org.apache.cloudstack.veeam.api.dto.NamedList;
|
||||
import org.apache.cloudstack.veeam.utils.Negotiation;
|
||||
import org.apache.cloudstack.veeam.utils.PathUtil;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
|
|
@ -116,8 +116,7 @@ public class DisksRouteHandler extends ManagerBase implements RouteHandler {
|
|||
protected void handleGet(final HttpServletRequest req, final HttpServletResponse resp,
|
||||
Negotiation.OutFormat outFormat, VeeamControlServlet io) throws IOException {
|
||||
final List<Disk> result = serverAdapter.listAllDisks();
|
||||
final Disks response = new Disks(result);
|
||||
|
||||
NamedList<Disk> response = NamedList.of("disk", result);
|
||||
io.getWriter().write(resp, HttpServletResponse.SC_OK, response, outFormat);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ import org.apache.cloudstack.veeam.RouteHandler;
|
|||
import org.apache.cloudstack.veeam.VeeamControlServlet;
|
||||
import org.apache.cloudstack.veeam.adapter.ServerAdapter;
|
||||
import org.apache.cloudstack.veeam.api.dto.Host;
|
||||
import org.apache.cloudstack.veeam.api.dto.Hosts;
|
||||
import org.apache.cloudstack.veeam.api.dto.NamedList;
|
||||
import org.apache.cloudstack.veeam.utils.Negotiation;
|
||||
import org.apache.cloudstack.veeam.utils.PathUtil;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
|
|
@ -85,8 +85,7 @@ public class HostsRouteHandler extends ManagerBase implements RouteHandler {
|
|||
protected void handleGet(final HttpServletRequest req, final HttpServletResponse resp,
|
||||
Negotiation.OutFormat outFormat, VeeamControlServlet io) throws IOException {
|
||||
final List<Host> result = serverAdapter.listAllHosts();
|
||||
final Hosts response = new Hosts(result);
|
||||
|
||||
NamedList<Host> response = NamedList.of("host", result);
|
||||
io.getWriter().write(resp, HttpServletResponse.SC_OK, response, outFormat);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ import org.apache.cloudstack.veeam.RouteHandler;
|
|||
import org.apache.cloudstack.veeam.VeeamControlServlet;
|
||||
import org.apache.cloudstack.veeam.adapter.ServerAdapter;
|
||||
import org.apache.cloudstack.veeam.api.dto.ImageTransfer;
|
||||
import org.apache.cloudstack.veeam.api.dto.ImageTransfers;
|
||||
import org.apache.cloudstack.veeam.api.dto.NamedList;
|
||||
import org.apache.cloudstack.veeam.utils.Negotiation;
|
||||
import org.apache.cloudstack.veeam.utils.PathUtil;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
|
|
@ -106,8 +106,7 @@ public class ImageTransfersRouteHandler extends ManagerBase implements RouteHand
|
|||
protected void handleGet(final HttpServletRequest req, final HttpServletResponse resp,
|
||||
Negotiation.OutFormat outFormat, VeeamControlServlet io) throws IOException {
|
||||
final List<ImageTransfer> result = serverAdapter.listAllImageTransfers();
|
||||
final ImageTransfers response = new ImageTransfers();
|
||||
response.setImageTransfer(result);
|
||||
NamedList<ImageTransfer> response = NamedList.of("image_transfer", result);
|
||||
io.getWriter().write(resp, HttpServletResponse.SC_OK, response, outFormat);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ import org.apache.cloudstack.veeam.RouteHandler;
|
|||
import org.apache.cloudstack.veeam.VeeamControlServlet;
|
||||
import org.apache.cloudstack.veeam.adapter.ServerAdapter;
|
||||
import org.apache.cloudstack.veeam.api.dto.Job;
|
||||
import org.apache.cloudstack.veeam.api.dto.Jobs;
|
||||
import org.apache.cloudstack.veeam.api.dto.NamedList;
|
||||
import org.apache.cloudstack.veeam.utils.Negotiation;
|
||||
import org.apache.cloudstack.veeam.utils.PathUtil;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
|
|
@ -85,8 +85,7 @@ public class JobsRouteHandler extends ManagerBase implements RouteHandler {
|
|||
protected void handleGet(final HttpServletRequest req, final HttpServletResponse resp,
|
||||
Negotiation.OutFormat outFormat, VeeamControlServlet io) throws IOException {
|
||||
final List<Job> result = serverAdapter.listAllJobs();
|
||||
final Jobs response = new Jobs(result);
|
||||
|
||||
NamedList<Job> response = NamedList.of("job", result);
|
||||
io.getWriter().write(resp, HttpServletResponse.SC_OK, response, outFormat);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -27,8 +27,8 @@ import javax.servlet.http.HttpServletResponse;
|
|||
import org.apache.cloudstack.veeam.RouteHandler;
|
||||
import org.apache.cloudstack.veeam.VeeamControlServlet;
|
||||
import org.apache.cloudstack.veeam.adapter.ServerAdapter;
|
||||
import org.apache.cloudstack.veeam.api.dto.NamedList;
|
||||
import org.apache.cloudstack.veeam.api.dto.Network;
|
||||
import org.apache.cloudstack.veeam.api.dto.Networks;
|
||||
import org.apache.cloudstack.veeam.utils.Negotiation;
|
||||
import org.apache.cloudstack.veeam.utils.PathUtil;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
|
|
@ -85,8 +85,7 @@ public class NetworksRouteHandler extends ManagerBase implements RouteHandler {
|
|||
protected void handleGet(final HttpServletRequest req, final HttpServletResponse resp,
|
||||
Negotiation.OutFormat outFormat, VeeamControlServlet io) throws IOException {
|
||||
final List<Network> result = serverAdapter.listAllNetworks();
|
||||
final Networks response = new Networks(result);
|
||||
|
||||
NamedList<Network> response = NamedList.of("network", result);
|
||||
io.getWriter().write(resp, HttpServletResponse.SC_OK, response, outFormat);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -32,17 +32,13 @@ import org.apache.cloudstack.veeam.api.dto.Backup;
|
|||
import org.apache.cloudstack.veeam.api.dto.Checkpoint;
|
||||
import org.apache.cloudstack.veeam.api.dto.Disk;
|
||||
import org.apache.cloudstack.veeam.api.dto.DiskAttachment;
|
||||
import org.apache.cloudstack.veeam.api.dto.DiskAttachments;
|
||||
import org.apache.cloudstack.veeam.api.dto.Disks;
|
||||
import org.apache.cloudstack.veeam.api.dto.NamedList;
|
||||
import org.apache.cloudstack.veeam.api.dto.Nic;
|
||||
import org.apache.cloudstack.veeam.api.dto.Nics;
|
||||
import org.apache.cloudstack.veeam.api.dto.ResourceAction;
|
||||
import org.apache.cloudstack.veeam.api.dto.Snapshot;
|
||||
import org.apache.cloudstack.veeam.api.dto.Snapshots;
|
||||
import org.apache.cloudstack.veeam.api.dto.Vm;
|
||||
import org.apache.cloudstack.veeam.api.dto.VmAction;
|
||||
import org.apache.cloudstack.veeam.api.dto.Vms;
|
||||
import org.apache.cloudstack.veeam.api.request.VmListQuery;
|
||||
import org.apache.cloudstack.veeam.api.request.VmSearchExpr;
|
||||
import org.apache.cloudstack.veeam.api.request.VmSearchFilters;
|
||||
|
|
@ -279,8 +275,7 @@ public class VmsRouteHandler extends ManagerBase implements RouteHandler {
|
|||
}
|
||||
|
||||
final List<Vm> result = serverAdapter.listAllInstances();
|
||||
final Vms response = new Vms(result);
|
||||
|
||||
NamedList<Vm> response = NamedList.of("vm", result);
|
||||
io.getWriter().write(resp, HttpServletResponse.SC_OK, response, outFormat);
|
||||
}
|
||||
|
||||
|
|
@ -380,7 +375,7 @@ public class VmsRouteHandler extends ManagerBase implements RouteHandler {
|
|||
final VeeamControlServlet io) throws IOException {
|
||||
try {
|
||||
List<DiskAttachment> disks = serverAdapter.listDiskAttachmentsByInstanceUuid(id);
|
||||
DiskAttachments response = new DiskAttachments(disks);
|
||||
NamedList<DiskAttachment> response = NamedList.of("disk_attachment", disks);
|
||||
io.getWriter().write(resp, HttpServletResponse.SC_OK, response, outFormat);
|
||||
} catch (InvalidParameterValueException e) {
|
||||
io.notFound(resp, e.getMessage(), outFormat);
|
||||
|
|
@ -428,7 +423,7 @@ public class VmsRouteHandler extends ManagerBase implements RouteHandler {
|
|||
final Negotiation.OutFormat outFormat, final VeeamControlServlet io) throws IOException {
|
||||
try {
|
||||
List<Snapshot> snapshots = serverAdapter.listSnapshotsByInstanceUuid(id);
|
||||
Snapshots response = new Snapshots(snapshots);
|
||||
NamedList<Snapshot> response = NamedList.of("snapshot", snapshots);
|
||||
io.getWriter().write(resp, HttpServletResponse.SC_OK, response, outFormat);
|
||||
} catch (InvalidParameterValueException e) {
|
||||
io.notFound(resp, e.getMessage(), outFormat);
|
||||
|
|
@ -487,7 +482,7 @@ public class VmsRouteHandler extends ManagerBase implements RouteHandler {
|
|||
final Negotiation.OutFormat outFormat, final VeeamControlServlet io) throws IOException {
|
||||
try {
|
||||
List<Backup> backups = serverAdapter.listBackupsByInstanceUuid(id);
|
||||
NamedList<Backup> response = NamedList.of("backups", backups);
|
||||
NamedList<Backup> response = NamedList.of("backup", backups);
|
||||
io.getWriter().write(resp, HttpServletResponse.SC_OK, response, outFormat);
|
||||
} catch (InvalidParameterValueException e) {
|
||||
io.notFound(resp, e.getMessage(), outFormat);
|
||||
|
|
@ -522,7 +517,7 @@ public class VmsRouteHandler extends ManagerBase implements RouteHandler {
|
|||
throws IOException {
|
||||
try {
|
||||
List<Disk> disks = serverAdapter.listDisksByBackupUuid(id);
|
||||
Disks response = new Disks(disks);
|
||||
NamedList<Disk> response = NamedList.of("disk", disks);
|
||||
io.getWriter().write(resp, HttpServletResponse.SC_OK, response, outFormat);
|
||||
} catch (InvalidParameterValueException e) {
|
||||
io.notFound(resp, e.getMessage(), outFormat);
|
||||
|
|
|
|||
|
|
@ -27,8 +27,8 @@ import javax.servlet.http.HttpServletResponse;
|
|||
import org.apache.cloudstack.veeam.RouteHandler;
|
||||
import org.apache.cloudstack.veeam.VeeamControlServlet;
|
||||
import org.apache.cloudstack.veeam.adapter.ServerAdapter;
|
||||
import org.apache.cloudstack.veeam.api.dto.NamedList;
|
||||
import org.apache.cloudstack.veeam.api.dto.VnicProfile;
|
||||
import org.apache.cloudstack.veeam.api.dto.VnicProfiles;
|
||||
import org.apache.cloudstack.veeam.utils.Negotiation;
|
||||
import org.apache.cloudstack.veeam.utils.PathUtil;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
|
|
@ -85,8 +85,7 @@ public class VnicProfilesRouteHandler extends ManagerBase implements RouteHandle
|
|||
protected void handleGet(final HttpServletRequest req, final HttpServletResponse resp,
|
||||
Negotiation.OutFormat outFormat, VeeamControlServlet io) throws IOException {
|
||||
final List<VnicProfile> result = serverAdapter.listAllVnicProfiles();
|
||||
final VnicProfiles response = new VnicProfiles(result);
|
||||
|
||||
NamedList<VnicProfile> response = NamedList.of("vnic_profile", result);
|
||||
io.getWriter().write(resp, HttpServletResponse.SC_OK, response, outFormat);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ import java.util.Collections;
|
|||
import org.apache.cloudstack.jobs.JobInfo;
|
||||
import org.apache.cloudstack.veeam.VeeamControlService;
|
||||
import org.apache.cloudstack.veeam.api.JobsRouteHandler;
|
||||
import org.apache.cloudstack.veeam.api.dto.Actions;
|
||||
import org.apache.cloudstack.veeam.api.dto.Job;
|
||||
import org.apache.cloudstack.veeam.api.dto.Ref;
|
||||
import org.apache.cloudstack.veeam.api.dto.ResourceAction;
|
||||
|
|
@ -48,7 +47,6 @@ public class AsyncJobJoinVOToJobConverter {
|
|||
job.setEndTime(System.currentTimeMillis());
|
||||
}
|
||||
job.setOwner(Ref.of(basePath + "/api/users/" + uuid, uuid));
|
||||
job.setActions(new Actions());
|
||||
job.setDescription("Something");
|
||||
job.setLink(Collections.emptyList());
|
||||
return job;
|
||||
|
|
@ -80,7 +78,6 @@ public class AsyncJobJoinVOToJobConverter {
|
|||
job.setEndTime(endTime);
|
||||
}
|
||||
job.setOwner(Ref.of(basePath + "/api/users/" + vo.getUserUuid(), vo.getUserUuid()));
|
||||
job.setActions(new Actions());
|
||||
job.setDescription("Something");
|
||||
job.setLink(Collections.emptyList());
|
||||
return job;
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@ import java.util.stream.Collectors;
|
|||
import org.apache.cloudstack.veeam.VeeamControlService;
|
||||
import org.apache.cloudstack.veeam.api.ClustersRouteHandler;
|
||||
import org.apache.cloudstack.veeam.api.DataCentersRouteHandler;
|
||||
import org.apache.cloudstack.veeam.api.dto.Actions;
|
||||
import org.apache.cloudstack.veeam.api.dto.Cluster;
|
||||
import org.apache.cloudstack.veeam.api.dto.Cpu;
|
||||
import org.apache.cloudstack.veeam.api.dto.Link;
|
||||
|
|
@ -143,11 +142,6 @@ public class ClusterVOToClusterConverter {
|
|||
c.setSchedulingPolicy(Ref.of(basePath + "/schedulingpolicies/" + stableUuid("schedpolicy:default"),
|
||||
stableUuid("schedpolicy:default")));
|
||||
|
||||
// --- actions.links (can be omitted; but Veeam sometimes expects actions to exist)
|
||||
final Actions actions = new Actions();
|
||||
actions.setLink(Collections.emptyList());
|
||||
c.setActions(actions);
|
||||
|
||||
// --- related links (optional)
|
||||
c.setLink(List.of(
|
||||
Link.of("networks", c.getHref() + "/networks")
|
||||
|
|
|
|||
|
|
@ -27,9 +27,9 @@ import org.apache.cloudstack.veeam.VeeamControlService;
|
|||
import org.apache.cloudstack.veeam.api.DisksRouteHandler;
|
||||
import org.apache.cloudstack.veeam.api.HostsRouteHandler;
|
||||
import org.apache.cloudstack.veeam.api.ImageTransfersRouteHandler;
|
||||
import org.apache.cloudstack.veeam.api.dto.Actions;
|
||||
import org.apache.cloudstack.veeam.api.dto.ImageTransfer;
|
||||
import org.apache.cloudstack.veeam.api.dto.Link;
|
||||
import org.apache.cloudstack.veeam.api.dto.NamedList;
|
||||
import org.apache.cloudstack.veeam.api.dto.Ref;
|
||||
|
||||
import com.cloud.api.query.vo.HostJoinVO;
|
||||
|
|
@ -73,7 +73,7 @@ public class ImageTransferVOToImageTransferConverter {
|
|||
final List<Link> links = new ArrayList<>();
|
||||
links.add(getLink(imageTransfer, "cancel"));
|
||||
links.add(getLink(imageTransfer, "finalize"));
|
||||
imageTransfer.setActions(new Actions(links));
|
||||
imageTransfer.setActions(NamedList.of("link", links));
|
||||
return imageTransfer;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -25,8 +25,8 @@ import java.util.stream.Collectors;
|
|||
import org.apache.cloudstack.veeam.VeeamControlService;
|
||||
import org.apache.cloudstack.veeam.api.DataCentersRouteHandler;
|
||||
import org.apache.cloudstack.veeam.api.NetworksRouteHandler;
|
||||
import org.apache.cloudstack.veeam.api.dto.NamedList;
|
||||
import org.apache.cloudstack.veeam.api.dto.Network;
|
||||
import org.apache.cloudstack.veeam.api.dto.NetworkUsages;
|
||||
import org.apache.cloudstack.veeam.api.dto.Ref;
|
||||
|
||||
import com.cloud.api.query.vo.DataCenterJoinVO;
|
||||
|
|
@ -50,7 +50,7 @@ public class NetworkVOToNetworkConverter {
|
|||
dto.setPortIsolation("false");
|
||||
dto.setStp("false");
|
||||
|
||||
dto.setUsages(new NetworkUsages(List.of("vm")));
|
||||
dto.setUsages(NamedList.of("usage", List.of("vm")));
|
||||
|
||||
// Best-effort mapping for vdsm_name
|
||||
dto.setVdsmName(dto.getName());
|
||||
|
|
|
|||
|
|
@ -25,12 +25,11 @@ import org.apache.cloudstack.veeam.VeeamControlService;
|
|||
import org.apache.cloudstack.veeam.api.VmsRouteHandler;
|
||||
import org.apache.cloudstack.veeam.api.VnicProfilesRouteHandler;
|
||||
import org.apache.cloudstack.veeam.api.dto.Ip;
|
||||
import org.apache.cloudstack.veeam.api.dto.Ips;
|
||||
import org.apache.cloudstack.veeam.api.dto.Mac;
|
||||
import org.apache.cloudstack.veeam.api.dto.NamedList;
|
||||
import org.apache.cloudstack.veeam.api.dto.Nic;
|
||||
import org.apache.cloudstack.veeam.api.dto.Ref;
|
||||
import org.apache.cloudstack.veeam.api.dto.ReportedDevice;
|
||||
import org.apache.cloudstack.veeam.api.dto.ReportedDevices;
|
||||
import org.apache.cloudstack.veeam.api.dto.Vm;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
|
@ -59,7 +58,7 @@ public class NicVOToNicConverter {
|
|||
}
|
||||
nic.setInterfaceType("virtio");
|
||||
ReportedDevice device = getReportedDevice(vo, mac, nic.getVm());
|
||||
nic.setReportedDevices(new ReportedDevices(List.of(device)));
|
||||
nic.setReportedDevices(NamedList.of("reported_device", List.of(device)));
|
||||
if (networkResolver != null) {
|
||||
final NetworkVO network = networkResolver.apply(vo.getNetworkId());
|
||||
if (network != null) {
|
||||
|
|
@ -88,7 +87,7 @@ public class NicVOToNicConverter {
|
|||
ip.setGateway(vo.getIPv6Gateway());
|
||||
ip.setVersion("v6");
|
||||
}
|
||||
device.setIps(new Ips(List.of(ip)));
|
||||
device.setIps(NamedList.of("ip", List.of(ip)));
|
||||
}
|
||||
device.setHref(vm.getHref() + "/reporteddevices/" + vo.getUuid());
|
||||
device.setVm(vm);
|
||||
|
|
|
|||
|
|
@ -24,8 +24,8 @@ import org.apache.cloudstack.veeam.VeeamControlService;
|
|||
import org.apache.cloudstack.veeam.api.ApiService;
|
||||
import org.apache.cloudstack.veeam.api.DataCentersRouteHandler;
|
||||
import org.apache.cloudstack.veeam.api.dto.DataCenter;
|
||||
import org.apache.cloudstack.veeam.api.dto.DataCenters;
|
||||
import org.apache.cloudstack.veeam.api.dto.Link;
|
||||
import org.apache.cloudstack.veeam.api.dto.NamedList;
|
||||
import org.apache.cloudstack.veeam.api.dto.Storage;
|
||||
import org.apache.cloudstack.veeam.api.dto.StorageDomain;
|
||||
|
||||
|
|
@ -77,7 +77,7 @@ public class StoreVOToStorageDomainConverter {
|
|||
DataCenter dc = new DataCenter();
|
||||
dc.setHref(href(basePath, DataCentersRouteHandler.BASE_ROUTE + "/" + dcId));
|
||||
dc.setId(dcId);
|
||||
sd.setDataCenters(new DataCenters(List.of(dc)));
|
||||
sd.setDataCenters(NamedList.of("data_center", List.of(dc)));
|
||||
|
||||
sd.setLink(defaultStorageDomainLinks(href, true, /*includeTemplates*/ true));
|
||||
|
||||
|
|
@ -130,7 +130,7 @@ public class StoreVOToStorageDomainConverter {
|
|||
DataCenter dc = new DataCenter();
|
||||
dc.setHref(href(basePath, DataCentersRouteHandler.BASE_ROUTE + "/" + dcId));
|
||||
dc.setId(dcId);
|
||||
sd.setDataCenters(new DataCenters(List.of(dc)));
|
||||
sd.setDataCenters(NamedList.of("data_center", List.of(dc)));
|
||||
|
||||
sd.setLink(defaultStorageDomainLinks(href, false, /*includeTemplates*/ false));
|
||||
|
||||
|
|
|
|||
|
|
@ -26,13 +26,12 @@ import java.util.stream.Collectors;
|
|||
import org.apache.cloudstack.veeam.VeeamControlService;
|
||||
import org.apache.cloudstack.veeam.api.ApiService;
|
||||
import org.apache.cloudstack.veeam.api.VmsRouteHandler;
|
||||
import org.apache.cloudstack.veeam.api.dto.Actions;
|
||||
import org.apache.cloudstack.veeam.api.dto.BaseDto;
|
||||
import org.apache.cloudstack.veeam.api.dto.Bios;
|
||||
import org.apache.cloudstack.veeam.api.dto.Cpu;
|
||||
import org.apache.cloudstack.veeam.api.dto.DiskAttachment;
|
||||
import org.apache.cloudstack.veeam.api.dto.DiskAttachments;
|
||||
import org.apache.cloudstack.veeam.api.dto.EmptyElement;
|
||||
import org.apache.cloudstack.veeam.api.dto.NamedList;
|
||||
import org.apache.cloudstack.veeam.api.dto.Nic;
|
||||
import org.apache.cloudstack.veeam.api.dto.Nics;
|
||||
import org.apache.cloudstack.veeam.api.dto.Os;
|
||||
|
|
@ -124,7 +123,7 @@ public final class UserVmJoinVOToVmConverter {
|
|||
|
||||
if (disksResolver != null) {
|
||||
List<DiskAttachment> diskAttachments = disksResolver.apply(src.getId());
|
||||
dst.setDiskAttachments(new DiskAttachments(diskAttachments));
|
||||
dst.setDiskAttachments(NamedList.of("disk_attachment", diskAttachments));
|
||||
}
|
||||
|
||||
if (disksResolver != null) {
|
||||
|
|
@ -132,7 +131,7 @@ public final class UserVmJoinVOToVmConverter {
|
|||
dst.setNics(new Nics(nics));
|
||||
}
|
||||
|
||||
dst.setActions(new Actions(List.of(
|
||||
dst.setActions(NamedList.of("link", List.of(
|
||||
BaseDto.getActionLink("start", dst.getHref()),
|
||||
BaseDto.getActionLink("stop", dst.getHref()),
|
||||
BaseDto.getActionLink("shutdown", dst.getHref())
|
||||
|
|
|
|||
|
|
@ -22,8 +22,8 @@ import java.util.stream.Collectors;
|
|||
|
||||
import org.apache.cloudstack.veeam.VeeamControlService;
|
||||
import org.apache.cloudstack.veeam.api.VmsRouteHandler;
|
||||
import org.apache.cloudstack.veeam.api.dto.Actions;
|
||||
import org.apache.cloudstack.veeam.api.dto.BaseDto;
|
||||
import org.apache.cloudstack.veeam.api.dto.NamedList;
|
||||
import org.apache.cloudstack.veeam.api.dto.Snapshot;
|
||||
import org.apache.cloudstack.veeam.api.dto.Vm;
|
||||
|
||||
|
|
@ -42,7 +42,7 @@ public class VmSnapshotVOToSnapshotConverter {
|
|||
snapshot.setDate(vmSnapshotVO.getCreated().getTime());
|
||||
snapshot.setPersistMemorystate(String.valueOf(VMSnapshotVO.Type.DiskAndMemory.equals(vmSnapshotVO.getType())));
|
||||
snapshot.setSnapshotStatus(VMSnapshot.State.Ready.equals(vmSnapshotVO.getState()) ? "ok" : "locked");
|
||||
snapshot.setActions(new Actions(List.of(BaseDto.getActionLink("restore", snapshot.getHref()))));
|
||||
snapshot.setActions(NamedList.of("link", List.of(BaseDto.getActionLink("restore", snapshot.getHref()))));
|
||||
return snapshot;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@
|
|||
package org.apache.cloudstack.veeam.api.converter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
|
@ -27,13 +26,12 @@ import org.apache.cloudstack.veeam.VeeamControlService;
|
|||
import org.apache.cloudstack.veeam.api.ApiService;
|
||||
import org.apache.cloudstack.veeam.api.DisksRouteHandler;
|
||||
import org.apache.cloudstack.veeam.api.VmsRouteHandler;
|
||||
import org.apache.cloudstack.veeam.api.dto.Actions;
|
||||
import org.apache.cloudstack.veeam.api.dto.Disk;
|
||||
import org.apache.cloudstack.veeam.api.dto.DiskAttachment;
|
||||
import org.apache.cloudstack.veeam.api.dto.Link;
|
||||
import org.apache.cloudstack.veeam.api.dto.NamedList;
|
||||
import org.apache.cloudstack.veeam.api.dto.Ref;
|
||||
import org.apache.cloudstack.veeam.api.dto.StorageDomain;
|
||||
import org.apache.cloudstack.veeam.api.dto.StorageDomains;
|
||||
import org.apache.cloudstack.veeam.api.dto.Vm;
|
||||
|
||||
import com.cloud.api.ApiDBUtils;
|
||||
|
|
@ -110,17 +108,12 @@ public class VolumeJoinVOToDiskConverter {
|
|||
|
||||
// Storage domains
|
||||
if (vol.getPoolUuid() != null) {
|
||||
StorageDomains sds = new StorageDomains();
|
||||
StorageDomain sd = new StorageDomain();
|
||||
sd.setHref(apiBasePath + "/storagedomains/" + vol.getPoolUuid());
|
||||
sd.setId(vol.getPoolUuid());
|
||||
sds.setStorageDomain(List.of(sd));
|
||||
disk.setStorageDomains(sds);
|
||||
disk.setStorageDomains(NamedList.of("storage_domain", List.of(sd)));
|
||||
}
|
||||
|
||||
// Actions (Veeam checks presence, not behavior)
|
||||
disk.setActions(defaultDiskActions(diskHref));
|
||||
|
||||
// Links
|
||||
disk.setLink(List.of(
|
||||
Link.of("disksnapshots", diskHref + "/disksnapshots")
|
||||
|
|
@ -205,8 +198,4 @@ public class VolumeJoinVOToDiskConverter {
|
|||
return "locked";
|
||||
}
|
||||
}
|
||||
|
||||
private static Actions defaultDiskActions(final String diskHref) {
|
||||
return new Actions(Collections.emptyList());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,41 +0,0 @@
|
|||
// Licensed to the Apache Software Foundation (ASF) under one
|
||||
// or more contributor license agreements. See the NOTICE file
|
||||
// distributed with this work for additional information
|
||||
// regarding copyright ownership. The ASF licenses this file
|
||||
// to you under the Apache License, Version 2.0 (the
|
||||
// "License"); you may not use this file except in compliance
|
||||
// with the License. You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing,
|
||||
// software distributed under the License is distributed on an
|
||||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
|
||||
package org.apache.cloudstack.veeam.api.dto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public final class Actions {
|
||||
private List<Link> link;
|
||||
|
||||
public Actions() {}
|
||||
|
||||
public Actions(final List<Link> link) {
|
||||
this.link = link;
|
||||
}
|
||||
|
||||
public List<Link> getLink() {
|
||||
return link;
|
||||
}
|
||||
|
||||
public void setLink(List<Link> link) {
|
||||
this.link = link;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
// Licensed to the Apache Software Foundation (ASF) under one
|
||||
// or more contributor license agreements. See the NOTICE file
|
||||
// distributed with this work for additional information
|
||||
// regarding copyright ownership. The ASF licenses this file
|
||||
// to you under the Apache License, Version 2.0 (the
|
||||
// "License"); you may not use this file except in compliance
|
||||
// with the License. You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing,
|
||||
// software distributed under the License is distributed on an
|
||||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
|
||||
package org.apache.cloudstack.veeam.api.dto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
|
||||
|
||||
public class Backups {
|
||||
|
||||
@JacksonXmlElementWrapper(useWrapping = false)
|
||||
public List<Backup> backup;
|
||||
|
||||
public Backups(final List<Backup> backup) {
|
||||
this.backup = backup;
|
||||
}
|
||||
}
|
||||
|
|
@ -24,8 +24,19 @@ public class Certificate {
|
|||
private String organization;
|
||||
private String subject;
|
||||
|
||||
public String getOrganization() { return organization; }
|
||||
public void setOrganization(String organization) { this.organization = organization; }
|
||||
public String getSubject() { return subject; }
|
||||
public void setSubject(String subject) { this.subject = subject; }
|
||||
public String getOrganization() {
|
||||
return organization;
|
||||
}
|
||||
|
||||
public void setOrganization(String organization) {
|
||||
this.organization = organization;
|
||||
}
|
||||
|
||||
public String getSubject() {
|
||||
return subject;
|
||||
}
|
||||
|
||||
public void setSubject(String subject) {
|
||||
this.subject = subject;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,42 +0,0 @@
|
|||
// Licensed to the Apache Software Foundation (ASF) under one
|
||||
// or more contributor license agreements. See the NOTICE file
|
||||
// distributed with this work for additional information
|
||||
// regarding copyright ownership. The ASF licenses this file
|
||||
// to you under the Apache License, Version 2.0 (the
|
||||
// "License"); you may not use this file except in compliance
|
||||
// with the License. You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing,
|
||||
// software distributed under the License is distributed on an
|
||||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
|
||||
package org.apache.cloudstack.veeam.api.dto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
|
||||
|
||||
public class Checkpoints {
|
||||
|
||||
@JacksonXmlElementWrapper(useWrapping = false)
|
||||
private List<Checkpoint> checkpoint;
|
||||
|
||||
public Checkpoints() {}
|
||||
|
||||
public Checkpoints(final List<Checkpoint> checkpoint) {
|
||||
this.checkpoint = checkpoint;
|
||||
}
|
||||
|
||||
public List<Checkpoint> getCheckpoint() {
|
||||
return checkpoint;
|
||||
}
|
||||
|
||||
public void setCheckpoint(List<Checkpoint> checkpoint) {
|
||||
this.checkpoint = checkpoint;
|
||||
}
|
||||
}
|
||||
|
|
@ -58,7 +58,7 @@ public final class Cluster extends BaseDto {
|
|||
private Ref dataCenter;
|
||||
private Ref macPool;
|
||||
private Ref schedulingPolicy;
|
||||
private Actions actions;
|
||||
private NamedList<Link> actions;
|
||||
@JacksonXmlElementWrapper(useWrapping = false)
|
||||
private List<Link> link;
|
||||
|
||||
|
|
@ -310,11 +310,11 @@ public final class Cluster extends BaseDto {
|
|||
this.schedulingPolicy = schedulingPolicy;
|
||||
}
|
||||
|
||||
public Actions getActions() {
|
||||
public NamedList<Link> getActions() {
|
||||
return actions;
|
||||
}
|
||||
|
||||
public void setActions(Actions actions) {
|
||||
public void setActions(NamedList<Link> actions) {
|
||||
this.actions = actions;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,46 +0,0 @@
|
|||
// Licensed to the Apache Software Foundation (ASF) under one
|
||||
// or more contributor license agreements. See the NOTICE file
|
||||
// distributed with this work for additional information
|
||||
// regarding copyright ownership. The ASF licenses this file
|
||||
// to you under the Apache License, Version 2.0 (the
|
||||
// "License"); you may not use this file except in compliance
|
||||
// with the License. You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing,
|
||||
// software distributed under the License is distributed on an
|
||||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
|
||||
package org.apache.cloudstack.veeam.api.dto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
|
||||
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public final class Clusters {
|
||||
|
||||
@JsonProperty("cluster")
|
||||
@JacksonXmlElementWrapper(useWrapping = false)
|
||||
private List<Cluster> cluster;
|
||||
|
||||
public Clusters() {}
|
||||
|
||||
public Clusters(final List<Cluster> cluster) {
|
||||
this.cluster = cluster;
|
||||
}
|
||||
|
||||
public List<Cluster> getCluster() {
|
||||
return cluster;
|
||||
}
|
||||
|
||||
public void setCluster(List<Cluster> cluster) {
|
||||
this.cluster = cluster;
|
||||
}
|
||||
}
|
||||
|
|
@ -27,14 +27,43 @@ public final class Cpu {
|
|||
private String type;
|
||||
private Topology topology;
|
||||
|
||||
public String getName() { return name; }
|
||||
public void setName(String name) { this.name = name; }
|
||||
public String getSpeed() { return speed; }
|
||||
public void setSpeed(String speed) { this.speed = speed; }
|
||||
public String getArchitecture() { return architecture; }
|
||||
public void setArchitecture(String architecture) { this.architecture = architecture; }
|
||||
public String getType() { return type; }
|
||||
public void setType(String type) { this.type = type; }
|
||||
public Topology getTopology() { return topology; }
|
||||
public void setTopology(Topology topology) { this.topology = topology; }
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getSpeed() {
|
||||
return speed;
|
||||
}
|
||||
|
||||
public void setSpeed(String speed) {
|
||||
this.speed = speed;
|
||||
}
|
||||
|
||||
public String getArchitecture() {
|
||||
return architecture;
|
||||
}
|
||||
|
||||
public void setArchitecture(String architecture) {
|
||||
this.architecture = architecture;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public Topology getTopology() {
|
||||
return topology;
|
||||
}
|
||||
|
||||
public void setTopology(Topology topology) {
|
||||
this.topology = topology;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ public final class DataCenter extends BaseDto {
|
|||
private SupportedVersions supportedVersions;
|
||||
private Version version;
|
||||
private Ref macPool;
|
||||
private Actions actions;
|
||||
private NamedList<Link> actions;
|
||||
private String name;
|
||||
private String description;
|
||||
@JacksonXmlElementWrapper(useWrapping = false)
|
||||
|
|
@ -95,11 +95,11 @@ public final class DataCenter extends BaseDto {
|
|||
this.macPool = macPool;
|
||||
}
|
||||
|
||||
public Actions getActions() {
|
||||
public NamedList<Link> getActions() {
|
||||
return actions;
|
||||
}
|
||||
|
||||
public void setActions(Actions actions) {
|
||||
public void setActions(NamedList<Link> actions) {
|
||||
this.actions = actions;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,49 +0,0 @@
|
|||
// Licensed to the Apache Software Foundation (ASF) under one
|
||||
// or more contributor license agreements. See the NOTICE file
|
||||
// distributed with this work for additional information
|
||||
// regarding copyright ownership. The ASF licenses this file
|
||||
// to you under the Apache License, Version 2.0 (the
|
||||
// "License"); you may not use this file except in compliance
|
||||
// with the License. You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing,
|
||||
// software distributed under the License is distributed on an
|
||||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
|
||||
package org.apache.cloudstack.veeam.api.dto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
|
||||
|
||||
/**
|
||||
* Root collection wrapper:
|
||||
* {
|
||||
* "data_center": [ { ... } ]
|
||||
* }
|
||||
*/
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public final class DataCenters {
|
||||
|
||||
@JacksonXmlElementWrapper(useWrapping = false)
|
||||
public List<DataCenter> dataCenter;
|
||||
|
||||
public DataCenters() {}
|
||||
public DataCenters(final List<DataCenter> dataCenter) {
|
||||
this.dataCenter = dataCenter;
|
||||
}
|
||||
|
||||
public List<DataCenter> getDataCenter() {
|
||||
return dataCenter;
|
||||
}
|
||||
|
||||
public void setDataCenter(List<DataCenter> dataCenter) {
|
||||
this.dataCenter = dataCenter;
|
||||
}
|
||||
}
|
||||
|
|
@ -46,8 +46,8 @@ public final class Disk extends BaseDto {
|
|||
private String wipeAfterDelete;
|
||||
private Ref diskProfile;
|
||||
private Ref quota;
|
||||
private StorageDomains storageDomains;
|
||||
private Actions actions;
|
||||
private NamedList<StorageDomain> storageDomains;
|
||||
private NamedList<Link> actions;
|
||||
private String name;
|
||||
private String description;
|
||||
@JacksonXmlElementWrapper(useWrapping = false)
|
||||
|
|
@ -205,19 +205,19 @@ public final class Disk extends BaseDto {
|
|||
this.quota = quota;
|
||||
}
|
||||
|
||||
public StorageDomains getStorageDomains() {
|
||||
public NamedList<StorageDomain> getStorageDomains() {
|
||||
return storageDomains;
|
||||
}
|
||||
|
||||
public void setStorageDomains(StorageDomains storageDomains) {
|
||||
public void setStorageDomains(NamedList<StorageDomain> storageDomains) {
|
||||
this.storageDomains = storageDomains;
|
||||
}
|
||||
|
||||
public Actions getActions() {
|
||||
public NamedList<Link> getActions() {
|
||||
return actions;
|
||||
}
|
||||
|
||||
public void setActions(Actions actions) {
|
||||
public void setActions(NamedList<Link> actions) {
|
||||
this.actions = actions;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,8 @@ public final class DiskAttachment extends BaseDto {
|
|||
private Disk disk;
|
||||
private Vm vm;
|
||||
|
||||
public DiskAttachment() {}
|
||||
public DiskAttachment() {
|
||||
}
|
||||
|
||||
public String getActive() {
|
||||
return active;
|
||||
|
|
|
|||
|
|
@ -1,38 +0,0 @@
|
|||
// Licensed to the Apache Software Foundation (ASF) under one
|
||||
// or more contributor license agreements. See the NOTICE file
|
||||
// distributed with this work for additional information
|
||||
// regarding copyright ownership. The ASF licenses this file
|
||||
// to you under the Apache License, Version 2.0 (the
|
||||
// "License"); you may not use this file except in compliance
|
||||
// with the License. You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing,
|
||||
// software distributed under the License is distributed on an
|
||||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
|
||||
package org.apache.cloudstack.veeam.api.dto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
|
||||
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public final class DiskAttachments {
|
||||
|
||||
@JacksonXmlElementWrapper(useWrapping = false)
|
||||
private List<DiskAttachment> diskAttachment;
|
||||
|
||||
public DiskAttachments(final List<DiskAttachment> diskAttachment) {
|
||||
this.diskAttachment = diskAttachment;
|
||||
}
|
||||
|
||||
public List<DiskAttachment> getDiskAttachment() {
|
||||
return diskAttachment;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
// Licensed to the Apache Software Foundation (ASF) under one
|
||||
// or more contributor license agreements. See the NOTICE file
|
||||
// distributed with this work for additional information
|
||||
// regarding copyright ownership. The ASF licenses this file
|
||||
// to you under the Apache License, Version 2.0 (the
|
||||
// "License"); you may not use this file except in compliance
|
||||
// with the License. You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing,
|
||||
// software distributed under the License is distributed on an
|
||||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
|
||||
package org.apache.cloudstack.veeam.api.dto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
|
||||
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public final class Disks {
|
||||
|
||||
@JacksonXmlElementWrapper(useWrapping = false)
|
||||
private List<Disk> disk;
|
||||
|
||||
public Disks(final List<Disk> disk) {
|
||||
this.disk = disk;
|
||||
}
|
||||
|
||||
public List<Disk> getDisk() {
|
||||
return disk;
|
||||
}
|
||||
}
|
||||
|
|
@ -21,5 +21,6 @@ import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
|||
|
||||
@JsonSerialize(using = EmptyElementSerializer.class)
|
||||
public final class EmptyElement {
|
||||
public EmptyElement() {}
|
||||
public EmptyElement() {
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,14 +27,43 @@ public class HardwareInformation {
|
|||
private String uuid;
|
||||
private String version;
|
||||
|
||||
public String getManufacturer() { return manufacturer; }
|
||||
public void setManufacturer(String manufacturer) { this.manufacturer = manufacturer; }
|
||||
public String getProductName() { return productName; }
|
||||
public void setProductName(String productName) { this.productName = productName; }
|
||||
public String getSerialNumber() { return serialNumber; }
|
||||
public void setSerialNumber(String serialNumber) { this.serialNumber = serialNumber; }
|
||||
public String getUuid() { return uuid; }
|
||||
public void setUuid(String uuid) { this.uuid = uuid; }
|
||||
public String getVersion() { return version; }
|
||||
public void setVersion(String version) { this.version = version; }
|
||||
public String getManufacturer() {
|
||||
return manufacturer;
|
||||
}
|
||||
|
||||
public void setManufacturer(String manufacturer) {
|
||||
this.manufacturer = manufacturer;
|
||||
}
|
||||
|
||||
public String getProductName() {
|
||||
return productName;
|
||||
}
|
||||
|
||||
public void setProductName(String productName) {
|
||||
this.productName = productName;
|
||||
}
|
||||
|
||||
public String getSerialNumber() {
|
||||
return serialNumber;
|
||||
}
|
||||
|
||||
public void setSerialNumber(String serialNumber) {
|
||||
this.serialNumber = serialNumber;
|
||||
}
|
||||
|
||||
public String getUuid() {
|
||||
return uuid;
|
||||
}
|
||||
|
||||
public void setUuid(String uuid) {
|
||||
this.uuid = uuid;
|
||||
}
|
||||
|
||||
public String getVersion() {
|
||||
return version;
|
||||
}
|
||||
|
||||
public void setVersion(String version) {
|
||||
this.version = version;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,62 +46,217 @@ public class Host extends BaseDto {
|
|||
private Version version;
|
||||
private String vgpuPlacement;
|
||||
private Ref cluster;
|
||||
private Actions actions;
|
||||
private NamedList<Link> actions;
|
||||
private String name;
|
||||
private String comment;
|
||||
private List<Link> link;
|
||||
|
||||
// getters/setters (generate via IDE)
|
||||
public String getAddress() { return address; }
|
||||
public void setAddress(String address) { this.address = address; }
|
||||
public String getAutoNumaStatus() { return autoNumaStatus; }
|
||||
public void setAutoNumaStatus(String autoNumaStatus) { this.autoNumaStatus = autoNumaStatus; }
|
||||
public Certificate getCertificate() { return certificate; }
|
||||
public void setCertificate(Certificate certificate) { this.certificate = certificate; }
|
||||
public Cpu getCpu() { return cpu; }
|
||||
public void setCpu(Cpu cpu) { this.cpu = cpu; }
|
||||
public String getExternalStatus() { return externalStatus; }
|
||||
public void setExternalStatus(String externalStatus) { this.externalStatus = externalStatus; }
|
||||
public HardwareInformation getHardwareInformation() { return hardwareInformation; }
|
||||
public void setHardwareInformation(HardwareInformation hardwareInformation) { this.hardwareInformation = hardwareInformation; }
|
||||
public String getKdumpStatus() { return kdumpStatus; }
|
||||
public void setKdumpStatus(String kdumpStatus) { this.kdumpStatus = kdumpStatus; }
|
||||
public Version getLibvirtVersion() { return libvirtVersion; }
|
||||
public void setLibvirtVersion(Version libvirtVersion) { this.libvirtVersion = libvirtVersion; }
|
||||
public String getMaxSchedulingMemory() { return maxSchedulingMemory; }
|
||||
public void setMaxSchedulingMemory(String maxSchedulingMemory) { this.maxSchedulingMemory = maxSchedulingMemory; }
|
||||
public String getMemory() { return memory; }
|
||||
public void setMemory(String memory) { this.memory = memory; }
|
||||
public String getNumaSupported() { return numaSupported; }
|
||||
public void setNumaSupported(String numaSupported) { this.numaSupported = numaSupported; }
|
||||
public Os getOs() { return os; }
|
||||
public void setOs(Os os) { this.os = os; }
|
||||
public String getPort() { return port; }
|
||||
public void setPort(String port) { this.port = port; }
|
||||
public String getProtocol() { return protocol; }
|
||||
public void setProtocol(String protocol) { this.protocol = protocol; }
|
||||
public String getReinstallationRequired() { return reinstallationRequired; }
|
||||
public void setReinstallationRequired(String reinstallationRequired) { this.reinstallationRequired = reinstallationRequired; }
|
||||
public String getStatus() { return status; }
|
||||
public void setStatus(String status) { this.status = status; }
|
||||
public ApiSummary getSummary() { return summary; }
|
||||
public void setSummary(ApiSummary summary) { this.summary = summary; }
|
||||
public String getType() { return type; }
|
||||
public void setType(String type) { this.type = type; }
|
||||
public String getUpdateAvailable() { return updateAvailable; }
|
||||
public void setUpdateAvailable(String updateAvailable) { this.updateAvailable = updateAvailable; }
|
||||
public Version getVersion() { return version; }
|
||||
public void setVersion(Version version) { this.version = version; }
|
||||
public String getVgpuPlacement() { return vgpuPlacement; }
|
||||
public void setVgpuPlacement(String vgpuPlacement) { this.vgpuPlacement = vgpuPlacement; }
|
||||
public Ref getCluster() { return cluster; }
|
||||
public void setCluster(Ref cluster) { this.cluster = cluster; }
|
||||
public Actions getActions() { return actions; }
|
||||
public void setActions(Actions actions) { this.actions = actions; }
|
||||
public String getName() { return name; }
|
||||
public void setName(String name) { this.name = name; }
|
||||
public String getComment() { return comment; }
|
||||
public void setComment(String comment) { this.comment = comment; }
|
||||
public List<Link> getLink() { return link; }
|
||||
public void setLink(List<Link> link) { this.link = link; }
|
||||
public String getAddress() {
|
||||
return address;
|
||||
}
|
||||
|
||||
public void setAddress(String address) {
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public String getAutoNumaStatus() {
|
||||
return autoNumaStatus;
|
||||
}
|
||||
|
||||
public void setAutoNumaStatus(String autoNumaStatus) {
|
||||
this.autoNumaStatus = autoNumaStatus;
|
||||
}
|
||||
|
||||
public Certificate getCertificate() {
|
||||
return certificate;
|
||||
}
|
||||
|
||||
public void setCertificate(Certificate certificate) {
|
||||
this.certificate = certificate;
|
||||
}
|
||||
|
||||
public Cpu getCpu() {
|
||||
return cpu;
|
||||
}
|
||||
|
||||
public void setCpu(Cpu cpu) {
|
||||
this.cpu = cpu;
|
||||
}
|
||||
|
||||
public String getExternalStatus() {
|
||||
return externalStatus;
|
||||
}
|
||||
|
||||
public void setExternalStatus(String externalStatus) {
|
||||
this.externalStatus = externalStatus;
|
||||
}
|
||||
|
||||
public HardwareInformation getHardwareInformation() {
|
||||
return hardwareInformation;
|
||||
}
|
||||
|
||||
public void setHardwareInformation(HardwareInformation hardwareInformation) {
|
||||
this.hardwareInformation = hardwareInformation;
|
||||
}
|
||||
|
||||
public String getKdumpStatus() {
|
||||
return kdumpStatus;
|
||||
}
|
||||
|
||||
public void setKdumpStatus(String kdumpStatus) {
|
||||
this.kdumpStatus = kdumpStatus;
|
||||
}
|
||||
|
||||
public Version getLibvirtVersion() {
|
||||
return libvirtVersion;
|
||||
}
|
||||
|
||||
public void setLibvirtVersion(Version libvirtVersion) {
|
||||
this.libvirtVersion = libvirtVersion;
|
||||
}
|
||||
|
||||
public String getMaxSchedulingMemory() {
|
||||
return maxSchedulingMemory;
|
||||
}
|
||||
|
||||
public void setMaxSchedulingMemory(String maxSchedulingMemory) {
|
||||
this.maxSchedulingMemory = maxSchedulingMemory;
|
||||
}
|
||||
|
||||
public String getMemory() {
|
||||
return memory;
|
||||
}
|
||||
|
||||
public void setMemory(String memory) {
|
||||
this.memory = memory;
|
||||
}
|
||||
|
||||
public String getNumaSupported() {
|
||||
return numaSupported;
|
||||
}
|
||||
|
||||
public void setNumaSupported(String numaSupported) {
|
||||
this.numaSupported = numaSupported;
|
||||
}
|
||||
|
||||
public Os getOs() {
|
||||
return os;
|
||||
}
|
||||
|
||||
public void setOs(Os os) {
|
||||
this.os = os;
|
||||
}
|
||||
|
||||
public String getPort() {
|
||||
return port;
|
||||
}
|
||||
|
||||
public void setPort(String port) {
|
||||
this.port = port;
|
||||
}
|
||||
|
||||
public String getProtocol() {
|
||||
return protocol;
|
||||
}
|
||||
|
||||
public void setProtocol(String protocol) {
|
||||
this.protocol = protocol;
|
||||
}
|
||||
|
||||
public String getReinstallationRequired() {
|
||||
return reinstallationRequired;
|
||||
}
|
||||
|
||||
public void setReinstallationRequired(String reinstallationRequired) {
|
||||
this.reinstallationRequired = reinstallationRequired;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public ApiSummary getSummary() {
|
||||
return summary;
|
||||
}
|
||||
|
||||
public void setSummary(ApiSummary summary) {
|
||||
this.summary = summary;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getUpdateAvailable() {
|
||||
return updateAvailable;
|
||||
}
|
||||
|
||||
public void setUpdateAvailable(String updateAvailable) {
|
||||
this.updateAvailable = updateAvailable;
|
||||
}
|
||||
|
||||
public Version getVersion() {
|
||||
return version;
|
||||
}
|
||||
|
||||
public void setVersion(Version version) {
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public String getVgpuPlacement() {
|
||||
return vgpuPlacement;
|
||||
}
|
||||
|
||||
public void setVgpuPlacement(String vgpuPlacement) {
|
||||
this.vgpuPlacement = vgpuPlacement;
|
||||
}
|
||||
|
||||
public Ref getCluster() {
|
||||
return cluster;
|
||||
}
|
||||
|
||||
public void setCluster(Ref cluster) {
|
||||
this.cluster = cluster;
|
||||
}
|
||||
|
||||
public NamedList<Link> getActions() {
|
||||
return actions;
|
||||
}
|
||||
|
||||
public void setActions(NamedList<Link> actions) {
|
||||
this.actions = actions;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getComment() {
|
||||
return comment;
|
||||
}
|
||||
|
||||
public void setComment(String comment) {
|
||||
this.comment = comment;
|
||||
}
|
||||
|
||||
public List<Link> getLink() {
|
||||
return link;
|
||||
}
|
||||
|
||||
public void setLink(List<Link> link) {
|
||||
this.link = link;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,10 +31,27 @@ public class HostSummary {
|
|||
@JsonProperty("total")
|
||||
private String total;
|
||||
|
||||
public String getActive() { return active; }
|
||||
public void setActive(String active) { this.active = active; }
|
||||
public String getMigrating() { return migrating; }
|
||||
public void setMigrating(String migrating) { this.migrating = migrating; }
|
||||
public String getTotal() { return total; }
|
||||
public void setTotal(String total) { this.total = total; }
|
||||
public String getActive() {
|
||||
return active;
|
||||
}
|
||||
|
||||
public void setActive(String active) {
|
||||
this.active = active;
|
||||
}
|
||||
|
||||
public String getMigrating() {
|
||||
return migrating;
|
||||
}
|
||||
|
||||
public void setMigrating(String migrating) {
|
||||
this.migrating = migrating;
|
||||
}
|
||||
|
||||
public String getTotal() {
|
||||
return total;
|
||||
}
|
||||
|
||||
public void setTotal(String total) {
|
||||
this.total = total;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,33 +0,0 @@
|
|||
// Licensed to the Apache Software Foundation (ASF) under one
|
||||
// or more contributor license agreements. See the NOTICE file
|
||||
// distributed with this work for additional information
|
||||
// regarding copyright ownership. The ASF licenses this file
|
||||
// to you under the Apache License, Version 2.0 (the
|
||||
// "License"); you may not use this file except in compliance
|
||||
// with the License. You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing,
|
||||
// software distributed under the License is distributed on an
|
||||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
|
||||
package org.apache.cloudstack.veeam.api.dto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
public class Hosts {
|
||||
@JsonProperty("host")
|
||||
private List<Host> host;
|
||||
|
||||
public Hosts() {}
|
||||
public Hosts(List<Host> host) { this.host = host; }
|
||||
|
||||
public List<Host> getHost() { return host; }
|
||||
public void setHost(List<Host> host) { this.host = host; }
|
||||
}
|
||||
|
|
@ -40,7 +40,7 @@ public class ImageTransfer extends BaseDto {
|
|||
private Ref host;
|
||||
private Ref image;
|
||||
private Ref disk;
|
||||
private Actions actions;
|
||||
private NamedList<Link> actions;
|
||||
|
||||
@JacksonXmlElementWrapper(useWrapping = false)
|
||||
public List<Link> link;
|
||||
|
|
@ -157,11 +157,11 @@ public class ImageTransfer extends BaseDto {
|
|||
this.disk = disk;
|
||||
}
|
||||
|
||||
public Actions getActions() {
|
||||
public NamedList<Link> getActions() {
|
||||
return actions;
|
||||
}
|
||||
|
||||
public void setActions(Actions actions) {
|
||||
public void setActions(NamedList<Link> actions) {
|
||||
this.actions = actions;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,39 +0,0 @@
|
|||
// Licensed to the Apache Software Foundation (ASF) under one
|
||||
// or more contributor license agreements. See the NOTICE file
|
||||
// distributed with this work for additional information
|
||||
// regarding copyright ownership. The ASF licenses this file
|
||||
// to you under the Apache License, Version 2.0 (the
|
||||
// "License"); you may not use this file except in compliance
|
||||
// with the License. You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing,
|
||||
// software distributed under the License is distributed on an
|
||||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
|
||||
package org.apache.cloudstack.veeam.api.dto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
|
||||
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@JacksonXmlRootElement(localName = "image_transfers")
|
||||
public class ImageTransfers {
|
||||
@JsonProperty("image_transfer")
|
||||
private List<ImageTransfer> imageTransfer;
|
||||
|
||||
public List<ImageTransfer> getImageTransfer() {
|
||||
return imageTransfer;
|
||||
}
|
||||
|
||||
public void setImageTransfer(List<ImageTransfer> imageTransfer) {
|
||||
this.imageTransfer = imageTransfer;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
// Licensed to the Apache Software Foundation (ASF) under one
|
||||
// or more contributor license agreements. See the NOTICE file
|
||||
// distributed with this work for additional information
|
||||
// regarding copyright ownership. The ASF licenses this file
|
||||
// to you under the Apache License, Version 2.0 (the
|
||||
// "License"); you may not use this file except in compliance
|
||||
// with the License. You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing,
|
||||
// software distributed under the License is distributed on an
|
||||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
|
||||
package org.apache.cloudstack.veeam.api.dto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
|
||||
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class Ips {
|
||||
|
||||
@JacksonXmlElementWrapper(useWrapping = false)
|
||||
private List<Ip> ip;
|
||||
|
||||
public Ips(final List<Ip> ip) {
|
||||
this.ip = ip;
|
||||
}
|
||||
|
||||
public List<Ip> getIp() {
|
||||
return ip;
|
||||
}
|
||||
|
||||
public void setIp(List<Ip> ip) {
|
||||
this.ip = ip;
|
||||
}
|
||||
}
|
||||
|
|
@ -30,38 +30,88 @@ public class Job extends BaseDto {
|
|||
private Long endTime;
|
||||
private String status;
|
||||
private Ref owner;
|
||||
private Actions actions;
|
||||
private NamedList<Link> actions;
|
||||
private String description;
|
||||
private List<Link> link;
|
||||
|
||||
// getters and setters
|
||||
public String getAutoCleared() { return autoCleared; }
|
||||
public void setAutoCleared(String autoCleared) { this.autoCleared = autoCleared; }
|
||||
public String getAutoCleared() {
|
||||
return autoCleared;
|
||||
}
|
||||
|
||||
public String getExternal() { return external; }
|
||||
public void setExternal(String external) { this.external = external; }
|
||||
public void setAutoCleared(String autoCleared) {
|
||||
this.autoCleared = autoCleared;
|
||||
}
|
||||
|
||||
public Long getLastUpdated() { return lastUpdated; }
|
||||
public void setLastUpdated(Long lastUpdated) { this.lastUpdated = lastUpdated; }
|
||||
public String getExternal() {
|
||||
return external;
|
||||
}
|
||||
|
||||
public Long getStartTime() { return startTime; }
|
||||
public void setStartTime(Long startTime) { this.startTime = startTime; }
|
||||
public void setExternal(String external) {
|
||||
this.external = external;
|
||||
}
|
||||
|
||||
public Long getEndTime() { return endTime; }
|
||||
public void setEndTime(Long endTime) { this.endTime = endTime; }
|
||||
public Long getLastUpdated() {
|
||||
return lastUpdated;
|
||||
}
|
||||
|
||||
public String getStatus() { return status; }
|
||||
public void setStatus(String status) { this.status = status; }
|
||||
public void setLastUpdated(Long lastUpdated) {
|
||||
this.lastUpdated = lastUpdated;
|
||||
}
|
||||
|
||||
public Ref getOwner() { return owner; }
|
||||
public void setOwner(Ref owner) { this.owner = owner; }
|
||||
public Long getStartTime() {
|
||||
return startTime;
|
||||
}
|
||||
|
||||
public Actions getActions() { return actions; }
|
||||
public void setActions(Actions actions) { this.actions = actions; }
|
||||
public void setStartTime(Long startTime) {
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
public String getDescription() { return description; }
|
||||
public void setDescription(String description) { this.description = description; }
|
||||
public Long getEndTime() {
|
||||
return endTime;
|
||||
}
|
||||
|
||||
public List<Link> getLink() { return link; }
|
||||
public void setLink(List<Link> link) { this.link = link; }
|
||||
public void setEndTime(Long endTime) {
|
||||
this.endTime = endTime;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Ref getOwner() {
|
||||
return owner;
|
||||
}
|
||||
|
||||
public void setOwner(Ref owner) {
|
||||
this.owner = owner;
|
||||
}
|
||||
|
||||
public NamedList<Link> getActions() {
|
||||
return actions;
|
||||
}
|
||||
|
||||
public void setActions(NamedList<Link> actions) {
|
||||
this.actions = actions;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public List<Link> getLink() {
|
||||
return link;
|
||||
}
|
||||
|
||||
public void setLink(List<Link> link) {
|
||||
this.link = link;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,42 +0,0 @@
|
|||
// Licensed to the Apache Software Foundation (ASF) under one
|
||||
// or more contributor license agreements. See the NOTICE file
|
||||
// distributed with this work for additional information
|
||||
// regarding copyright ownershjob. The ASF licenses this file
|
||||
// to you under the Apache License, Version 2.0 (the
|
||||
// "License"); you may not use this file except in compliance
|
||||
// with the License. You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing,
|
||||
// software distributed under the License is distributed on an
|
||||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
|
||||
package org.apache.cloudstack.veeam.api.dto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
|
||||
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class Jobs {
|
||||
|
||||
@JacksonXmlElementWrapper(useWrapping = false)
|
||||
private List<Job> job;
|
||||
|
||||
public Jobs(final List<Job> job) {
|
||||
this.job = job;
|
||||
}
|
||||
|
||||
public List<Job> getJob() {
|
||||
return job;
|
||||
}
|
||||
|
||||
public void setJob(List<Job> job) {
|
||||
this.job = job;
|
||||
}
|
||||
}
|
||||
|
|
@ -24,6 +24,7 @@ import java.util.Map.Entry;
|
|||
|
||||
import com.fasterxml.jackson.annotation.JsonAnyGetter;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
|
||||
public class NamedList<T> {
|
||||
private final String name;
|
||||
|
|
@ -54,4 +55,9 @@ public class NamedList<T> {
|
|||
Entry<String, List<T>> e = map.entrySet().iterator().next();
|
||||
return new NamedList<>(e.getKey(), e.getValue());
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public List<T> getItems() {
|
||||
return items;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ public class Network extends BaseDto {
|
|||
private String mtu; // oVirt prints as string
|
||||
private String portIsolation; // "false"
|
||||
private String stp; // "false"
|
||||
private NetworkUsages usages; // { usage: ["vm"] }
|
||||
private NamedList<String> usages; // { usage: ["vm"] }
|
||||
private String vdsmName;
|
||||
|
||||
private Ref dataCenter;
|
||||
|
|
@ -39,37 +39,88 @@ public class Network extends BaseDto {
|
|||
@JsonProperty("link")
|
||||
private List<Link> link;
|
||||
|
||||
public Network() {}
|
||||
public Network() {
|
||||
}
|
||||
|
||||
// ---- getters / setters ----
|
||||
|
||||
public String getMtu() { return mtu; }
|
||||
public void setMtu(final String mtu) { this.mtu = mtu; }
|
||||
public String getMtu() {
|
||||
return mtu;
|
||||
}
|
||||
|
||||
public String getPortIsolation() { return portIsolation; }
|
||||
public void setPortIsolation(final String portIsolation) { this.portIsolation = portIsolation; }
|
||||
public void setMtu(final String mtu) {
|
||||
this.mtu = mtu;
|
||||
}
|
||||
|
||||
public String getStp() { return stp; }
|
||||
public void setStp(final String stp) { this.stp = stp; }
|
||||
public String getPortIsolation() {
|
||||
return portIsolation;
|
||||
}
|
||||
|
||||
public NetworkUsages getUsages() { return usages; }
|
||||
public void setUsages(final NetworkUsages usages) { this.usages = usages; }
|
||||
public void setPortIsolation(final String portIsolation) {
|
||||
this.portIsolation = portIsolation;
|
||||
}
|
||||
|
||||
public String getVdsmName() { return vdsmName; }
|
||||
public void setVdsmName(final String vdsmName) { this.vdsmName = vdsmName; }
|
||||
public String getStp() {
|
||||
return stp;
|
||||
}
|
||||
|
||||
public Ref getDataCenter() { return dataCenter; }
|
||||
public void setDataCenter(final Ref dataCenter) { this.dataCenter = dataCenter; }
|
||||
public void setStp(final String stp) {
|
||||
this.stp = stp;
|
||||
}
|
||||
|
||||
public String getName() { return name; }
|
||||
public void setName(final String name) { this.name = name; }
|
||||
public NamedList<String> getUsages() {
|
||||
return usages;
|
||||
}
|
||||
|
||||
public String getDescription() { return description; }
|
||||
public void setDescription(final String description) { this.description = description; }
|
||||
public void setUsages(final NamedList<String> usages) {
|
||||
this.usages = usages;
|
||||
}
|
||||
|
||||
public String getComment() { return comment; }
|
||||
public void setComment(final String comment) { this.comment = comment; }
|
||||
public String getVdsmName() {
|
||||
return vdsmName;
|
||||
}
|
||||
|
||||
public List<Link> getLink() { return link; }
|
||||
public void setLink(final List<Link> link) { this.link = link; }
|
||||
public void setVdsmName(final String vdsmName) {
|
||||
this.vdsmName = vdsmName;
|
||||
}
|
||||
|
||||
public Ref getDataCenter() {
|
||||
return dataCenter;
|
||||
}
|
||||
|
||||
public void setDataCenter(final Ref dataCenter) {
|
||||
this.dataCenter = dataCenter;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(final String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(final String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getComment() {
|
||||
return comment;
|
||||
}
|
||||
|
||||
public void setComment(final String comment) {
|
||||
this.comment = comment;
|
||||
}
|
||||
|
||||
public List<Link> getLink() {
|
||||
return link;
|
||||
}
|
||||
|
||||
public void setLink(final List<Link> link) {
|
||||
this.link = link;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,42 +0,0 @@
|
|||
// Licensed to the Apache Software Foundation (ASF) under one
|
||||
// or more contributor license agreements. See the NOTICE file
|
||||
// distributed with this work for additional information
|
||||
// regarding copyright ownership. The ASF licenses this file
|
||||
// to you under the Apache License, Version 2.0 (the
|
||||
// "License"); you may not use this file except in compliance
|
||||
// with the License. You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing,
|
||||
// software distributed under the License is distributed on an
|
||||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
|
||||
package org.apache.cloudstack.veeam.api.dto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class NetworkUsages {
|
||||
private List<String> usage;
|
||||
|
||||
public NetworkUsages() {
|
||||
}
|
||||
|
||||
public NetworkUsages(final List<String> usage) {
|
||||
this.usage = usage;
|
||||
}
|
||||
|
||||
public List<String> getUsage() {
|
||||
return usage;
|
||||
}
|
||||
|
||||
public void setUsage(final List<String> usage) {
|
||||
this.usage = usage;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
// Licensed to the Apache Software Foundation (ASF) under one
|
||||
// or more contributor license agreements. See the NOTICE file
|
||||
// distributed with this work for additional information
|
||||
// regarding copyright ownership. The ASF licenses this file
|
||||
// to you under the Apache License, Version 2.0 (the
|
||||
// "License"); you may not use this file except in compliance
|
||||
// with the License. You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing,
|
||||
// software distributed under the License is distributed on an
|
||||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
|
||||
package org.apache.cloudstack.veeam.api.dto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
public class Networks {
|
||||
@JsonProperty("network")
|
||||
private List<Network> network;
|
||||
|
||||
public Networks() {}
|
||||
public Networks(List<Network> network) { this.network = network; }
|
||||
|
||||
public List<Network> getNetwork() { return network; }
|
||||
public void setNetwork(List<Network> network) { this.network = network; }
|
||||
}
|
||||
|
|
@ -35,7 +35,7 @@ public class Nic extends BaseDto {
|
|||
public String synced;
|
||||
private Ref vnicProfile;
|
||||
private Vm vm;
|
||||
private ReportedDevices reportedDevices;
|
||||
private NamedList<ReportedDevice> reportedDevices;
|
||||
|
||||
public Nic() {
|
||||
}
|
||||
|
|
@ -112,11 +112,11 @@ public class Nic extends BaseDto {
|
|||
this.vm = vm;
|
||||
}
|
||||
|
||||
public ReportedDevices getReportedDevices() {
|
||||
public NamedList<ReportedDevice> getReportedDevices() {
|
||||
return reportedDevices;
|
||||
}
|
||||
|
||||
public void setReportedDevices(ReportedDevices reportedDevices) {
|
||||
public void setReportedDevices(NamedList<ReportedDevice> reportedDevices) {
|
||||
this.reportedDevices = reportedDevices;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,8 @@ public final class Nics {
|
|||
@JacksonXmlElementWrapper(useWrapping = false)
|
||||
public List<Nic> nic;
|
||||
|
||||
public Nics() {}
|
||||
public Nics() {
|
||||
}
|
||||
|
||||
public Nics(final List<Nic> nic) {
|
||||
this.nic = nic;
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ package org.apache.cloudstack.veeam.api.dto;
|
|||
public class ReportedDevice extends BaseDto {
|
||||
private String comment;
|
||||
private String description;
|
||||
private Ips ips;
|
||||
private NamedList<Ip> ips;
|
||||
private Mac Mac;
|
||||
private String name;
|
||||
private String type;
|
||||
|
|
@ -42,11 +42,11 @@ public class ReportedDevice extends BaseDto {
|
|||
this.description = description;
|
||||
}
|
||||
|
||||
public Ips getIps() {
|
||||
public NamedList<Ip> getIps() {
|
||||
return ips;
|
||||
}
|
||||
|
||||
public void setIps(Ips ips) {
|
||||
public void setIps(NamedList<Ip> ips) {
|
||||
this.ips = ips;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,42 +0,0 @@
|
|||
// Licensed to the Apache Software Foundation (ASF) under one
|
||||
// or more contributor license agreements. See the NOTICE file
|
||||
// distributed with this work for additional information
|
||||
// regarding copyright ownership. The ASF licenses this file
|
||||
// to you under the Apache License, Version 2.0 (the
|
||||
// "License"); you may not use this file except in compliance
|
||||
// with the License. You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing,
|
||||
// software distributed under the License is distributed on an
|
||||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
|
||||
package org.apache.cloudstack.veeam.api.dto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
|
||||
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class ReportedDevices {
|
||||
|
||||
@JacksonXmlElementWrapper(useWrapping = false)
|
||||
private List<ReportedDevice> reportedDevice;
|
||||
|
||||
public ReportedDevices(final List<ReportedDevice> reportedDevice) {
|
||||
this.reportedDevice = reportedDevice;
|
||||
}
|
||||
|
||||
public List<ReportedDevice> getReportedDevice() {
|
||||
return reportedDevice;
|
||||
}
|
||||
|
||||
public void setReportedDevice(List<ReportedDevice> reportedDevice) {
|
||||
this.reportedDevice = reportedDevice;
|
||||
}
|
||||
}
|
||||
|
|
@ -30,13 +30,14 @@ public class Snapshot extends BaseDto {
|
|||
private String persistMemorystate;
|
||||
private String snapshotStatus;
|
||||
private String snapshotType;
|
||||
private Actions actions;
|
||||
private NamedList<Link> actions;
|
||||
private String description;
|
||||
@JacksonXmlElementWrapper(useWrapping = false)
|
||||
private List<Link> link;
|
||||
private Vm vm;
|
||||
|
||||
public Snapshot() {}
|
||||
public Snapshot() {
|
||||
}
|
||||
|
||||
public Long getDate() {
|
||||
return date;
|
||||
|
|
@ -70,11 +71,11 @@ public class Snapshot extends BaseDto {
|
|||
this.snapshotType = snapshotType;
|
||||
}
|
||||
|
||||
public Actions getActions() {
|
||||
public NamedList<Link> getActions() {
|
||||
return actions;
|
||||
}
|
||||
|
||||
public void setActions(final Actions actions) {
|
||||
public void setActions(final NamedList<Link> actions) {
|
||||
this.actions = actions;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,41 +0,0 @@
|
|||
// Licensed to the Apache Software Foundation (ASF) under one
|
||||
// or more contributor license agreements. See the NOTICE file
|
||||
// distributed with this work for additional information
|
||||
// regarding copyright ownership. The ASF licenses this file
|
||||
// to you under the Apache License, Version 2.0 (the
|
||||
// "License"); you may not use this file except in compliance
|
||||
// with the License. You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing,
|
||||
// software distributed under the License is distributed on an
|
||||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
|
||||
package org.apache.cloudstack.veeam.api.dto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
|
||||
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@JacksonXmlRootElement(localName = "snapshots")
|
||||
public final class Snapshots {
|
||||
|
||||
@JsonProperty("snapshot")
|
||||
@JacksonXmlElementWrapper(useWrapping = false)
|
||||
public List<Snapshot> snapshot;
|
||||
|
||||
public Snapshots() {}
|
||||
|
||||
public Snapshots(final List<Snapshot> snapshot) {
|
||||
this.snapshot = snapshot;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -45,8 +45,8 @@ public final class StorageDomain extends BaseDto {
|
|||
private String supportsDiscard;
|
||||
private String supportsDiscardZeroesData;
|
||||
private Storage storage;
|
||||
private DataCenters dataCenters;
|
||||
private Actions actions;
|
||||
private NamedList<DataCenter> dataCenters;
|
||||
private NamedList<Link> actions;
|
||||
@JacksonXmlElementWrapper(useWrapping = false)
|
||||
private List<Link> link;
|
||||
|
||||
|
|
@ -210,19 +210,19 @@ public final class StorageDomain extends BaseDto {
|
|||
this.storage = storage;
|
||||
}
|
||||
|
||||
public DataCenters getDataCenters() {
|
||||
public NamedList<DataCenter> getDataCenters() {
|
||||
return dataCenters;
|
||||
}
|
||||
|
||||
public void setDataCenters(DataCenters dataCenters) {
|
||||
public void setDataCenters(NamedList<DataCenter> dataCenters) {
|
||||
this.dataCenters = dataCenters;
|
||||
}
|
||||
|
||||
public Actions getActions() {
|
||||
public NamedList<Link> getActions() {
|
||||
return actions;
|
||||
}
|
||||
|
||||
public void setActions(Actions actions) {
|
||||
public void setActions(NamedList<Link> actions) {
|
||||
this.actions = actions;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,42 +0,0 @@
|
|||
// Licensed to the Apache Software Foundation (ASF) under one
|
||||
// or more contributor license agreements. See the NOTICE file
|
||||
// distributed with this work for additional information
|
||||
// regarding copyright ownership. The ASF licenses this file
|
||||
// to you under the Apache License, Version 2.0 (the
|
||||
// "License"); you may not use this file except in compliance
|
||||
// with the License. You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing,
|
||||
// software distributed under the License is distributed on an
|
||||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
|
||||
package org.apache.cloudstack.veeam.api.dto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
|
||||
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@JacksonXmlRootElement(localName = "storage_domains")
|
||||
public final class StorageDomains {
|
||||
|
||||
@JsonProperty("storage_domain")
|
||||
@JacksonXmlElementWrapper(useWrapping = false)
|
||||
private List<StorageDomain> storageDomain;
|
||||
|
||||
public List<StorageDomain> getStorageDomain() {
|
||||
return storageDomain;
|
||||
}
|
||||
|
||||
public void setStorageDomain(List<StorageDomain> storageDomain) {
|
||||
this.storageDomain = storageDomain;
|
||||
}
|
||||
}
|
||||
|
|
@ -28,7 +28,8 @@ public final class Version {
|
|||
private String minor;
|
||||
private String revision;
|
||||
|
||||
public Version() {}
|
||||
public Version() {
|
||||
}
|
||||
|
||||
public String getBuild() {
|
||||
return build;
|
||||
|
|
|
|||
|
|
@ -48,11 +48,11 @@ public final class Vm extends BaseDto {
|
|||
private String stateless; // true|false
|
||||
private String type; // "server"
|
||||
private String origin; // "ovirt"
|
||||
private Actions actions; // actions.link[]
|
||||
private NamedList<Link> actions; // actions.link[]
|
||||
@JacksonXmlElementWrapper(useWrapping = false)
|
||||
private List<Link> link; // related resources
|
||||
private EmptyElement tags; // empty <tags/>
|
||||
private DiskAttachments diskAttachments;
|
||||
private NamedList<DiskAttachment> diskAttachments;
|
||||
private Nics nics;
|
||||
private VmInitialization initialization;
|
||||
|
||||
|
|
@ -200,11 +200,11 @@ public final class Vm extends BaseDto {
|
|||
this.origin = origin;
|
||||
}
|
||||
|
||||
public Actions getActions() {
|
||||
public NamedList<Link> getActions() {
|
||||
return actions;
|
||||
}
|
||||
|
||||
public void setActions(Actions actions) {
|
||||
public void setActions(NamedList<Link> actions) {
|
||||
this.actions = actions;
|
||||
}
|
||||
|
||||
|
|
@ -224,11 +224,11 @@ public final class Vm extends BaseDto {
|
|||
this.tags = tags;
|
||||
}
|
||||
|
||||
public DiskAttachments getDiskAttachments() {
|
||||
public NamedList<DiskAttachment> getDiskAttachments() {
|
||||
return diskAttachments;
|
||||
}
|
||||
|
||||
public void setDiskAttachments(DiskAttachments diskAttachments) {
|
||||
public void setDiskAttachments(NamedList<DiskAttachment> diskAttachments) {
|
||||
this.diskAttachments = diskAttachments;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,45 +0,0 @@
|
|||
// Licensed to the Apache Software Foundation (ASF) under one
|
||||
// or more contributor license agreements. See the NOTICE file
|
||||
// distributed with this work for additional information
|
||||
// regarding copyright ownership. The ASF licenses this file
|
||||
// to you under the Apache License, Version 2.0 (the
|
||||
// "License"); you may not use this file except in compliance
|
||||
// with the License. You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing,
|
||||
// software distributed under the License is distributed on an
|
||||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
|
||||
package org.apache.cloudstack.veeam.api.dto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
|
||||
|
||||
/**
|
||||
* Required list response:
|
||||
* { "vm": [ {..}, {..} ] }
|
||||
*/
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@JsonPropertyOrder({ "vm" })
|
||||
@JacksonXmlRootElement(localName = "vms")
|
||||
public final class Vms {
|
||||
@JsonProperty("vm")
|
||||
@JacksonXmlElementWrapper(useWrapping = false)
|
||||
public List<Vm> vm;
|
||||
|
||||
public Vms() {}
|
||||
|
||||
public Vms(final List<Vm> vm) {
|
||||
this.vm = vm;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,49 +0,0 @@
|
|||
// Licensed to the Apache Software Foundation (ASF) under one
|
||||
// or more contributor license agreements. See the NOTICE file
|
||||
// distributed with this work for additional information
|
||||
// regarding copyright ownership. The ASF licenses this file
|
||||
// to you under the Apache License, Version 2.0 (the
|
||||
// "License"); you may not use this file except in compliance
|
||||
// with the License. You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing,
|
||||
// software distributed under the License is distributed on an
|
||||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
|
||||
package org.apache.cloudstack.veeam.api.dto;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
/**
|
||||
* Root container for /ovirt-engine/api/vnicprofiles
|
||||
*/
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class VnicProfiles {
|
||||
|
||||
@JsonProperty("vnic_profile")
|
||||
private List<VnicProfile> vnicProfile;
|
||||
|
||||
public VnicProfiles() {
|
||||
}
|
||||
|
||||
public VnicProfiles(final List<VnicProfile> vnicProfile) {
|
||||
this.vnicProfile = vnicProfile;
|
||||
}
|
||||
|
||||
public List<VnicProfile> getVnicProfile() {
|
||||
return vnicProfile;
|
||||
}
|
||||
|
||||
public void setVnicProfile(final List<VnicProfile> vnicProfile) {
|
||||
this.vnicProfile = vnicProfile;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue