Skip to content

Commit

Permalink
Merge branch 'v1.2.x' of github.com:gomorpheus/morpheus-plugin-core i…
Browse files Browse the repository at this point in the history
…nto v1.2.x
  • Loading branch information
davydotcom committed Nov 25, 2024
2 parents b53d72e + cf04841 commit 6bafb7a
Show file tree
Hide file tree
Showing 6 changed files with 354 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<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
*/
Single<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
*/
Single<ServiceResponse> copyToServer(ComputeServer server, String fileName, String filePath, InputStream sourceStream, Long contentLength, Long timeout, Boolean autoExpand);
}
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Original file line number Diff line number Diff line change
Expand Up @@ -659,6 +659,7 @@ public enum Status {
START_REQUESTED,
INITIALIZING,
IN_PROGRESS,
FLATTENING,
CANCEL_REQUESTED,
CANCELLED,
SUCCEEDED,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<NetAddress> addresses = new ArrayList<>();

protected List<ComputeServerInterface> 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;
Expand Down Expand Up @@ -406,4 +406,13 @@ void setIpv6Address(String ipv6Address) {
this.addresses.add(new NetAddress(NetAddress.AddressType.IPV6,ipAddress));
}
}

public List<ComputeServerInterface> getInterfaces() {
return interfaces;
}

public void setInterfaces(List<ComputeServerInterface> interfaces) {
this.interfaces = interfaces;
markDirty("interfaces", interfaces);
}
}
Loading

0 comments on commit 6bafb7a

Please sign in to comment.