Skip to content

Commit f2f5fa0

Browse files
committed
<fix>[volume]: <description
APIImpact Resolves: ZSV-1 Change-Id: I656979726c736267776c7262716969726874716d
1 parent 13b74e6 commit f2f5fa0

18 files changed

Lines changed: 1031 additions & 2 deletions
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
package org.zstack.header.storage.backup;
2+
3+
import org.zstack.header.message.NeedReplyMessage;
4+
5+
public class CopyFileFromBackupStorageHostMsg extends NeedReplyMessage implements BackupStorageMessage {
6+
private String backupStorageUuid;
7+
private String backupStorageHostUuid;
8+
private String dstHostname;
9+
private String dstSshPassword;
10+
private String dstSshUsername;
11+
private int dstSshPort;
12+
private String dstFilePath;
13+
private String targetFilePath;
14+
15+
@Override
16+
public String getBackupStorageUuid() {
17+
return backupStorageUuid;
18+
}
19+
20+
public void setBackupStorageUuid(String backupStorageUuid) {
21+
this.backupStorageUuid = backupStorageUuid;
22+
}
23+
24+
public String getBackupStorageHostUuid() {
25+
return backupStorageHostUuid;
26+
}
27+
28+
public void setBackupStorageHostUuid(String backupStorageHostUuid) {
29+
this.backupStorageHostUuid = backupStorageHostUuid;
30+
}
31+
32+
public String getDstHostname() {
33+
return dstHostname;
34+
}
35+
36+
public void setDstHostname(String dstHostname) {
37+
this.dstHostname = dstHostname;
38+
}
39+
40+
public String getDstSshPassword() {
41+
return dstSshPassword;
42+
}
43+
44+
public void setDstSshPassword(String dstSshPassword) {
45+
this.dstSshPassword = dstSshPassword;
46+
}
47+
48+
public String getDstSshUsername() {
49+
return dstSshUsername;
50+
}
51+
52+
public void setDstSshUsername(String dstSshUsername) {
53+
this.dstSshUsername = dstSshUsername;
54+
}
55+
56+
public int getDstSshPort() {
57+
return dstSshPort;
58+
}
59+
60+
public void setDstSshPort(int dstSshPort) {
61+
this.dstSshPort = dstSshPort;
62+
}
63+
64+
public String getDstFilePath() {
65+
return dstFilePath;
66+
}
67+
68+
public void setDstFilePath(String dstFilePath) {
69+
this.dstFilePath = dstFilePath;
70+
}
71+
72+
public String getTargetFilePath() {
73+
return targetFilePath;
74+
}
75+
76+
public void setTargetFilePath(String targetFilePath) {
77+
this.targetFilePath = targetFilePath;
78+
}
79+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
package org.zstack.header.storage.backup;
2+
3+
import org.zstack.header.message.MessageReply;
4+
5+
public class CopyFileFromBackupStorageHostReply extends MessageReply {
6+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
package org.zstack.header.storage.backup;
2+
3+
import org.zstack.header.message.NeedReplyMessage;
4+
5+
import java.util.List;
6+
7+
public class DeleteFilesOnBackupStorageHostMsg extends NeedReplyMessage implements BackupStorageMessage {
8+
private String backupStorageUuid;
9+
private String backupStorageHostUuid;
10+
private List<String> filesPath;
11+
12+
@Override
13+
public String getBackupStorageUuid() {
14+
return backupStorageUuid;
15+
}
16+
17+
public void setBackupStorageUuid(String backupStorageUuid) {
18+
this.backupStorageUuid = backupStorageUuid;
19+
}
20+
21+
public String getBackupStorageHostUuid() {
22+
return backupStorageHostUuid;
23+
}
24+
25+
public void setBackupStorageHostUuid(String backupStorageHostUuid) {
26+
this.backupStorageHostUuid = backupStorageHostUuid;
27+
}
28+
29+
public List<String> getFilesPath() {
30+
return filesPath;
31+
}
32+
33+
public void setFilesPath(List<String> filesPath) {
34+
this.filesPath = filesPath;
35+
}
36+
}
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
package org.zstack.header.storage.backup;
2+
3+
import org.zstack.header.log.NoLogging;
4+
import org.zstack.header.message.MessageReply;
5+
6+
import java.util.Map;
7+
8+
public class DeleteFilesOnBackupStorageHostReply extends MessageReply {
9+
private String md5sum;
10+
private long size;
11+
@NoLogging(type = NoLogging.Type.Uri)
12+
private String directUploadUrl;
13+
private String unzipInstallPath;
14+
private Map<String, Long> filesSize;
15+
16+
public String getMd5sum() {
17+
return md5sum;
18+
}
19+
20+
public void setMd5sum(String md5sum) {
21+
this.md5sum = md5sum;
22+
}
23+
24+
public long getSize() {
25+
return size;
26+
}
27+
28+
public void setSize(long size) {
29+
this.size = size;
30+
}
31+
32+
public String getDirectUploadUrl() {
33+
return directUploadUrl;
34+
}
35+
36+
public void setDirectUploadUrl(String directUploadUrl) {
37+
this.directUploadUrl = directUploadUrl;
38+
}
39+
40+
public String getUnzipInstallPath() {
41+
return unzipInstallPath;
42+
}
43+
44+
public void setUnzipInstallPath(String unzipInstallPath) {
45+
this.unzipInstallPath = unzipInstallPath;
46+
}
47+
48+
public Map<String, Long> getFilesSize() {
49+
return filesSize;
50+
}
51+
52+
public void setFilesSize(Map<String, Long> filesSize) {
53+
this.filesSize = filesSize;
54+
}
55+
}
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
package org.zstack.header.storage.backup;
2+
3+
import org.zstack.header.message.NeedReplyMessage;
4+
5+
public class GetFileDownloadProgressMsg extends NeedReplyMessage implements BackupStorageMessage {
6+
private String backupStorageUuid;
7+
private String backupStorageHostUuid;
8+
private String taskUuid;
9+
private String hostname;
10+
11+
@Override
12+
public String getBackupStorageUuid() {
13+
return backupStorageUuid;
14+
}
15+
16+
public void setBackupStorageUuid(String backupStorageUuid) {
17+
this.backupStorageUuid = backupStorageUuid;
18+
}
19+
20+
public String getBackupStorageHostUuid() {
21+
return backupStorageHostUuid;
22+
}
23+
24+
public void setBackupStorageHostUuid(String backupStorageHostUuid) {
25+
this.backupStorageHostUuid = backupStorageHostUuid;
26+
}
27+
28+
public String getTaskUuid() {
29+
return taskUuid;
30+
}
31+
32+
public void setTaskUuid(String taskUuid) {
33+
this.taskUuid = taskUuid;
34+
}
35+
36+
public String getHostname() {
37+
return hostname;
38+
}
39+
40+
public void setHostname(String hostname) {
41+
this.hostname = hostname;
42+
}
43+
}
Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
package org.zstack.header.storage.backup;
2+
3+
import org.zstack.header.message.MessageReply;
4+
5+
import java.util.Map;
6+
7+
public class GetFileDownloadProgressReply extends MessageReply {
8+
private boolean completed;
9+
private int progress;
10+
11+
private long size;
12+
private long actualSize;
13+
private long downloadSize;
14+
private String installPath;
15+
private long lastOpTime;
16+
private boolean supportSuspend;
17+
private String md5sum;
18+
19+
private String unzipInstallPath;
20+
private Map<String, Long> unzipFiles;
21+
22+
public boolean isCompleted() {
23+
return completed;
24+
}
25+
26+
public void setCompleted(boolean completed) {
27+
this.completed = completed;
28+
}
29+
30+
public int getProgress() {
31+
return progress;
32+
}
33+
34+
public void setProgress(int progress) {
35+
this.progress = progress;
36+
}
37+
38+
public long getSize() {
39+
return size;
40+
}
41+
42+
public void setSize(long size) {
43+
this.size = size;
44+
}
45+
46+
public long getActualSize() {
47+
return actualSize;
48+
}
49+
50+
public void setActualSize(long actualSize) {
51+
this.actualSize = actualSize;
52+
}
53+
54+
public boolean isDownloadComplete() {
55+
return actualSize > 0 && actualSize == downloadSize;
56+
}
57+
58+
public String getInstallPath() {
59+
return installPath;
60+
}
61+
62+
public void setInstallPath(String installPath) {
63+
this.installPath = installPath;
64+
}
65+
66+
public String getFormat() {
67+
return format;
68+
}
69+
70+
public void setFormat(String format) {
71+
this.format = format;
72+
}
73+
74+
public long getLastOpTime() {
75+
return lastOpTime;
76+
}
77+
78+
public void setLastOpTime(long lastOpTime) {
79+
this.lastOpTime = lastOpTime;
80+
}
81+
82+
public long getDownloadSize() {
83+
return downloadSize;
84+
}
85+
86+
public void setDownloadSize(long downloadSize) {
87+
this.downloadSize = downloadSize;
88+
}
89+
90+
public boolean isSupportSuspend() {
91+
return supportSuspend;
92+
}
93+
94+
public void setSupportSuspend(boolean supportSuspend) {
95+
this.supportSuspend = supportSuspend;
96+
}
97+
98+
public String getMd5sum() {
99+
return md5sum;
100+
}
101+
102+
public void setMd5sum(String md5sum) {
103+
this.md5sum = md5sum;
104+
}
105+
106+
public String getUnzipInstallPath() {
107+
return unzipInstallPath;
108+
}
109+
110+
public void setUnzipInstallPath(String unzipInstallPath) {
111+
this.unzipInstallPath = unzipInstallPath;
112+
}
113+
114+
public Map<String, Long> getUnzipFiles() {
115+
return unzipFiles;
116+
}
117+
118+
public void setUnzipFiles(Map<String, Long> unzipFiles) {
119+
this.unzipFiles = unzipFiles;
120+
}
121+
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
package org.zstack.header.storage.backup;
2+
3+
import org.zstack.header.log.NoLogging;
4+
import org.zstack.header.message.NeedReplyMessage;
5+
6+
public class UploadFileToBackupStorageHostMsg extends NeedReplyMessage implements BackupStorageMessage {
7+
private String backupStorageUuid;
8+
private String taskUuid;
9+
@NoLogging(type = NoLogging.Type.Uri)
10+
private String url;
11+
private String installPath;
12+
13+
@Override
14+
public String getBackupStorageUuid() {
15+
return backupStorageUuid;
16+
}
17+
18+
public void setBackupStorageUuid(String backupStorageUuid) {
19+
this.backupStorageUuid = backupStorageUuid;
20+
}
21+
22+
public String getTaskUuid() {
23+
return taskUuid;
24+
}
25+
26+
public void setTaskUuid(String taskUuid) {
27+
this.taskUuid = taskUuid;
28+
}
29+
30+
public String getUrl() {
31+
return url;
32+
}
33+
34+
public void setUrl(String url) {
35+
this.url = url;
36+
}
37+
38+
public String getInstallPath() {
39+
return installPath;
40+
}
41+
42+
public void setInstallPath(String installPath) {
43+
this.installPath = installPath;
44+
}
45+
}

0 commit comments

Comments
 (0)