diff --git a/morpheus-plugin-api/src/main/java/com/morpheusdata/core/MorpheusFileCopyService.java b/morpheus-plugin-api/src/main/java/com/morpheusdata/core/MorpheusFileCopyService.java index 80957866..1d1b2b38 100644 --- a/morpheus-plugin-api/src/main/java/com/morpheusdata/core/MorpheusFileCopyService.java +++ b/morpheus-plugin-api/src/main/java/com/morpheusdata/core/MorpheusFileCopyService.java @@ -11,11 +11,36 @@ public interface MorpheusFileCopyService { /** * Copy a file to the target server. * @param server The target server - * @param fileName name of the copied file + * @param fileName name of the copied file for the file copy request URL. * @param filePath path on the server, including the file name (/some/path/file.txt), to place the file copy. * @param sourceStream source {@link InputStream} to copy to the server * @param contentLength size of the file to be copied * @return {@link ServiceResponse} containing the success status of the copy operation */ Single copyToServer(ComputeServer server, String fileName, String filePath, InputStream sourceStream, Long contentLength); + + /** + * Copy a file to the target server. + * @param server The target server + * @param fileName name of the copied file for the file copy request URL. + * @param filePath path on the server, including the file name (/some/path/file.txt), to place the file copy. + * @param sourceStream source {@link InputStream} to copy to the server + * @param contentLength size of the file to be copied + * @param timeout max timeout to initialize the copy operation + * @return {@link ServiceResponse} containing the success status of the copy operation + */ + Single copyToServer(ComputeServer server, String fileName, String filePath, InputStream sourceStream, Long contentLength, Long timeout); + + /** + * Copy a file to the target server. + * @param server The target server + * @param fileName name of the copied file for the file copy request URL. + * @param filePath path on the server, including the file name (/some/path/file.txt), to place the file copy. + * @param sourceStream source {@link InputStream} to copy to the server + * @param contentLength size of the file to be copied + * @param timeout max timeout to initialize the copy operation + * @param autoExpand automatically expand .tar.gz compressed files during upload + * @return {@link ServiceResponse} containing the success status of the copy operation + */ + Single copyToServer(ComputeServer server, String fileName, String filePath, InputStream sourceStream, Long contentLength, Long timeout, Boolean autoExpand); } diff --git a/morpheus-plugin-api/src/main/java/com/morpheusdata/core/synchronous/MorpheusSynchronousFileCopyService.java b/morpheus-plugin-api/src/main/java/com/morpheusdata/core/synchronous/MorpheusSynchronousFileCopyService.java index 28d3d2fc..d77a9ce8 100644 --- a/morpheus-plugin-api/src/main/java/com/morpheusdata/core/synchronous/MorpheusSynchronousFileCopyService.java +++ b/morpheus-plugin-api/src/main/java/com/morpheusdata/core/synchronous/MorpheusSynchronousFileCopyService.java @@ -10,11 +10,36 @@ public interface MorpheusSynchronousFileCopyService { /** * Copy a file to the target server. * @param server The target server - * @param fileName name of the copied file + * @param fileName name of the copied file for the file copy request URL. * @param filePath path on the server, including the file name (/some/path/file.txt), to place the file copy. * @param sourceStream source {@link InputStream} to copy to the server * @param contentLength size of the file to be copied * @return {@link ServiceResponse} containing the success status of the copy operation */ ServiceResponse copyToServer(ComputeServer server, String fileName, String filePath, InputStream sourceStream, Long contentLength); + + /** + * Copy a file to the target server. + * @param server The target server + * @param fileName name of the copied file for the file copy request URL. + * @param filePath path on the server, including the file name (/some/path/file.txt), to place the file copy. + * @param sourceStream source {@link InputStream} to copy to the server + * @param contentLength size of the file to be copied + * @param timeout max timeout to initialize the copy operation + * @return {@link ServiceResponse} containing the success status of the copy operation + */ + ServiceResponse copyToServer(ComputeServer server, String fileName, String filePath, InputStream sourceStream, Long contentLength, Long timeout); + + /** + * Copy a file to the target server. + * @param server The target server + * @param fileName name of the copied file for the file copy request URL. + * @param filePath path on the server, including the file name (/some/path/file.txt), to place the file copy. + * @param sourceStream source {@link InputStream} to copy to the server + * @param contentLength size of the file to be copied + * @param timeout max timeout to initialize the copy operation + * @param autoExpand automatically expand .tar.gz compressed files during upload + * @return {@link ServiceResponse} containing the success status of the copy operation + */ + ServiceResponse copyToServer(ComputeServer server, String fileName, String filePath, InputStream sourceStream, Long contentLength, Long timeout, Boolean autoExpand); } diff --git a/morpheus-plugin-api/src/main/java/com/morpheusdata/model/BackupResult.java b/morpheus-plugin-api/src/main/java/com/morpheusdata/model/BackupResult.java index eb80ad42..bdd28ff4 100644 --- a/morpheus-plugin-api/src/main/java/com/morpheusdata/model/BackupResult.java +++ b/morpheus-plugin-api/src/main/java/com/morpheusdata/model/BackupResult.java @@ -659,6 +659,7 @@ public enum Status { START_REQUESTED, INITIALIZING, IN_PROGRESS, + FLATTENING, CANCEL_REQUESTED, CANCELLED, SUCCEEDED, diff --git a/morpheus-plugin-api/src/main/java/com/morpheusdata/model/ComputeServerInterface.java b/morpheus-plugin-api/src/main/java/com/morpheusdata/model/ComputeServerInterface.java index 2ef1c817..54577ab7 100644 --- a/morpheus-plugin-api/src/main/java/com/morpheusdata/model/ComputeServerInterface.java +++ b/morpheus-plugin-api/src/main/java/com/morpheusdata/model/ComputeServerInterface.java @@ -55,16 +55,16 @@ public class ComputeServerInterface extends MorpheusModel { @JsonSerialize(using= ModelAsIdOnlySerializer.class) protected NetworkSubnet subnet; // public NetworkGroup networkGroup; -protected String networkPosition; + protected String networkPosition; protected Integer displayOrder = 0; @JsonSerialize(using= ModelAsIdOnlySerializer.class) protected NetworkPool networkPool; @JsonSerialize(using= ModelAsIdOnlySerializer.class) protected NetworkDomain networkDomain; protected List addresses = new ArrayList<>(); - + protected List interfaces = new ArrayList<>(); public ComputeServerInterfaceType type; -protected String ipMode; //dhcp/static/pool + protected String ipMode; //dhcp/static/pool protected Boolean replaceHostRecord; protected String macAddress; protected String externalType; @@ -406,4 +406,13 @@ void setIpv6Address(String ipv6Address) { this.addresses.add(new NetAddress(NetAddress.AddressType.IPV6,ipAddress)); } } + + public List getInterfaces() { + return interfaces; + } + + public void setInterfaces(List interfaces) { + this.interfaces = interfaces; + markDirty("interfaces", interfaces); + } } diff --git a/morpheus-plugin-api/src/main/java/com/morpheusdata/model/StorageVolume.java b/morpheus-plugin-api/src/main/java/com/morpheusdata/model/StorageVolume.java index 3003992a..6a19a792 100644 --- a/morpheus-plugin-api/src/main/java/com/morpheusdata/model/StorageVolume.java +++ b/morpheus-plugin-api/src/main/java/com/morpheusdata/model/StorageVolume.java @@ -35,6 +35,7 @@ public class StorageVolume extends StorageVolumeIdentityProjection { @JsonSerialize(using= ModelAsIdOnlySerializer.class) protected Account account; protected Long cloudId; + protected String description; protected String deviceName = "/dev/sda"; protected String deviceDisplayName; protected Long maxStorage = 0l; @@ -42,7 +43,6 @@ public class StorageVolume extends StorageVolumeIdentityProjection { protected StorageVolumeType type; protected Integer displayOrder = 0; protected Boolean rootVolume = false; - protected String internalId; protected String unitNumber; protected DatastoreIdentity datastore; protected Integer maxIOPS; @@ -58,7 +58,6 @@ public class StorageVolume extends StorageVolumeIdentityProjection { protected Long refId; protected String regionCode; protected String status = "provisioned"; - protected String uuid = java.util.UUID.randomUUID().toString(); protected String sourceSnapshotId; protected String poolName; protected String volumeName; @@ -67,6 +66,28 @@ public class StorageVolume extends StorageVolumeIdentityProjection { @JsonSerialize(using= ModelAsIdOnlySerializer.class) protected StorageGroup storageGroup; + protected String volumeType = "disk"; + protected String volumePath; + protected String diskType; + protected String StatusMessage; + protected String sourceId; + protected Boolean active = true; + protected Boolean resizeable = true; + protected Boolean planResizable = true; + protected Boolean readOnly = false; + protected Boolean online = true; + protected Boolean isExported = false; + protected Boolean isAssigned = false; + protected String provisionType; + protected String copyType; + protected String fiberWwn; + protected String imageType; + protected String sourceImage; + protected String fileName; + protected String claimName; + protected String sharePath; + protected String diskMode; + protected String wwn; @JsonSerialize(using= ModelAsIdOnlySerializer.class) public Account getAccount() { @@ -148,21 +169,7 @@ public void setRootVolume(Boolean rootVolume) { this.rootVolume = rootVolume; } - /** - * An internal ID for this StorageVolume. Not controlled by Morpheus. - * @return internalId - */ - public String getInternalId() { - return internalId; - } - /** - * An internal ID for this StorageVolume. Not controlled by Morpheus. - * @param internalId internalId - */ - public void setInternalId(String internalId) { - this.internalId = internalId; - } /** * The unit number @@ -331,15 +338,6 @@ public void setRegionCode(String regionCode) { public void setStatus(String status) { this.status = status; } - public String getUuid() { - return uuid; - } - - public void setUuid(String uuid) { - this.uuid = uuid; - markDirty("uuid", uuid); - } - public String getSourceSnapshotId() { return sourceSnapshotId; } @@ -397,4 +395,211 @@ public void setVolumeName(String volumeName) { this.volumeName = volumeName; markDirty("volumeName", volumeName); } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + markDirty("description", description, this.description); + } + + public String getVolumeType() { + return volumeType; + } + + public void setVolumeType(String volumeType) { + this.volumeType = volumeType; + markDirty("volumeType", volumeType, this.volumeType); + } + + public String getVolumePath() { + return volumePath; + } + + public void setVolumePath(String volumePath) { + this.volumePath = volumePath; + markDirty("volumePath", volumePath, this.volumePath); + } + + public String getDiskType() { + return diskType; + } + + public void setDiskType(String diskType) { + this.diskType = diskType; + markDirty("diskType", diskType, this.diskType); + } + + public String getStatusMessage() { + return StatusMessage; + } + + public void setStatusMessage(String statusMessage) { + StatusMessage = statusMessage; + markDirty("StatusMessage", statusMessage, this.StatusMessage); + } + + public String getSourceId() { + return sourceId; + } + + public void setSourceId(String sourceId) { + this.sourceId = sourceId; + markDirty("sourceId", sourceId, this.sourceId); + } + + public Boolean getActive() { + return active; + } + + public void setActive(Boolean active) { + this.active = active; + markDirty("active", active, this.active); + } + + public Boolean getResizeable() { + return resizeable; + } + + public void setResizeable(Boolean resizeable) { + this.resizeable = resizeable; + markDirty("resizeable", resizeable, this.resizeable); + } + + public Boolean getPlanResizable() { + return planResizable; + } + + public void setPlanResizable(Boolean planResizable) { + this.planResizable = planResizable; + markDirty("planResizable", planResizable, this.planResizable); + } + + public Boolean getReadOnly() { + return readOnly; + } + + public void setReadOnly(Boolean readOnly) { + this.readOnly = readOnly; + markDirty("readOnly", readOnly, this.readOnly); + } + + public Boolean getOnline() { + return online; + } + + public void setOnline(Boolean online) { + this.online = online; + markDirty("online", online, this.online); + } + + public Boolean getExported() { + return isExported; + } + + public void setExported(Boolean exported) { + isExported = exported; + markDirty("isExported", exported, this.isExported); + } + + public Boolean getAssigned() { + return isAssigned; + } + + public void setAssigned(Boolean assigned) { + isAssigned = assigned; + markDirty("isAssigned", assigned, this.isAssigned); + } + + public String getProvisionType() { + return provisionType; + } + + public void setProvisionType(String provisionType) { + this.provisionType = provisionType; + markDirty("provisionType", provisionType, this.provisionType); + } + + public String getCopyType() { + return copyType; + } + + public void setCopyType(String copyType) { + this.copyType = copyType; + markDirty("copyType", copyType, this.copyType); + } + + public String getFiberWwn() { + return fiberWwn; + } + + public void setFiberWwn(String fiberWwn) { + this.fiberWwn = fiberWwn; + markDirty("fiberWwn", fiberWwn, this.fiberWwn); + } + + public String getWwn() { + return wwn; + } + + public void setWwn(String wwn) { + this.wwn = wwn; + markDirty("wwn", wwn, this.wwn); + } + + public String getImageType() { + return imageType; + } + + public void setImageType(String imageType) { + this.imageType = imageType; + markDirty("imageType", imageType, this.imageType); + } + + public String getSourceImage() { + return sourceImage; + } + + public void setSourceImage(String sourceImage) { + this.sourceImage = sourceImage; + markDirty("sourceImage", sourceImage, this.sourceImage); + } + + public String getFileName() { + return fileName; + } + + public void setFileName(String fileName) { + this.fileName = fileName; + markDirty("fileName", fileName, this.fileName); + } + + public String getClaimName() { + return claimName; + } + + public void setClaimName(String claimName) { + this.claimName = claimName; + markDirty("claimName", claimName, this.claimName); + } + + public String getSharePath() { + return sharePath; + } + + public void setSharePath(String sharePath) { + this.sharePath = sharePath; + markDirty("sharePath", sharePath, this.sharePath); + } + + public String getDiskMode() { + return diskMode; + } + + public void setDiskMode(String diskMode) { + this.diskMode = diskMode; + markDirty("diskMode", diskMode, this.diskMode); + } } diff --git a/morpheus-plugin-api/src/main/java/com/morpheusdata/model/projection/StorageVolumeIdentityProjection.java b/morpheus-plugin-api/src/main/java/com/morpheusdata/model/projection/StorageVolumeIdentityProjection.java index cfe74832..88e0b418 100644 --- a/morpheus-plugin-api/src/main/java/com/morpheusdata/model/projection/StorageVolumeIdentityProjection.java +++ b/morpheus-plugin-api/src/main/java/com/morpheusdata/model/projection/StorageVolumeIdentityProjection.java @@ -26,9 +26,24 @@ * @since 0.9.0 */ public class StorageVolumeIdentityProjection extends MorpheusIdentityModel { + + protected String uuid = java.util.UUID.randomUUID().toString(); protected String externalId; + protected String internalId; + protected String uniqueId; protected String name; + protected String shortName; protected String storageVolumeTypeCode; + protected String category; + + public String getUuid() { + return uuid; + } + + public void setUuid(String uuid) { + this.uuid = uuid; + markDirty("uuid", uuid); + } public String getExternalId() { return externalId; @@ -54,4 +69,48 @@ public void setStorageVolumeTypeCode(String code) { this.storageVolumeTypeCode = code; markDirty("storageVolumeTypeCode", code); } + + /** + * An internal ID for this StorageVolume. Not controlled by Morpheus. + * @return internalId + */ + public String getInternalId() { + return internalId; + } + + /** + * An internal ID for this StorageVolume. Not controlled by Morpheus. + * @param internalId internalId + */ + public void setInternalId(String internalId) { + this.internalId = internalId; + } + + + public String getShortName() { + return shortName; + } + + public void setShortName(String shortName) { + this.shortName = shortName; + markDirty("shortName", shortName, this.shortName); + } + + public String getCategory() { + return category; + } + + public void setCategory(String category) { + this.category = category; + markDirty("category", category, this.category); + } + + public String getUniqueId() { + return uniqueId; + } + + public void setUniqueId(String uniqueId) { + this.uniqueId = uniqueId; + markDirty("uniqueId", uniqueId, this.uniqueId); + } }