Skip to content

Commit 487b289

Browse files
committed
<fix>[volume]: <description
APIImpact Resolves: ZSV-1 Change-Id: I656979726c736267776c7262716969726874716d
1 parent 3419ae9 commit 487b289

12 files changed

Lines changed: 575 additions & 3 deletions

File tree

header/src/main/java/org/zstack/header/host/GetFileDownloadProgressReply.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
import org.zstack.header.message.MessageReply;
44

5+
import java.util.Map;
6+
57
public class GetFileDownloadProgressReply extends MessageReply {
68
private boolean completed;
79
private int progress;
@@ -13,6 +15,8 @@ public class GetFileDownloadProgressReply extends MessageReply {
1315
private long lastOpTime;
1416
private boolean supportSuspend;
1517
private String md5sum;
18+
private String unzipInstallPath;
19+
private Map<String, Long> unzipFiles;
1620

1721
public boolean isCompleted() {
1822
return completed;
@@ -85,4 +89,20 @@ public String getMd5sum() {
8589
public void setMd5sum(String md5sum) {
8690
this.md5sum = md5sum;
8791
}
92+
93+
public String getUnzipInstallPath() {
94+
return unzipInstallPath;
95+
}
96+
97+
public void setUnzipInstallPath(String unzipInstallPath) {
98+
this.unzipInstallPath = unzipInstallPath;
99+
}
100+
101+
public Map<String, Long> getUnzipFiles() {
102+
return unzipFiles;
103+
}
104+
105+
public void setUnzipFiles(Map<String, Long> unzipFiles) {
106+
this.unzipFiles = unzipFiles;
107+
}
88108
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
package org.zstack.header.image;
2+
3+
import org.zstack.header.message.NeedReplyMessage;
4+
import org.zstack.header.storage.backup.BackupStorageMessage;
5+
6+
import java.util.List;
7+
8+
public class DeleteFilesOnBackupStorageHostMsg extends NeedReplyMessage implements BackupStorageMessage {
9+
private String backupStorageUuid;
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 List<String> getFilesPath() {
22+
return filesPath;
23+
}
24+
25+
public void setFilesPath(List<String> filesPath) {
26+
this.filesPath = filesPath;
27+
}
28+
}
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
package org.zstack.header.image;
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: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
package org.zstack.header.image;
2+
3+
import org.zstack.header.log.NoLogging;
4+
import org.zstack.header.message.NeedReplyMessage;
5+
import org.zstack.header.storage.backup.BackupStorageMessage;
6+
7+
public class UploadFileToBackupStorageHostMsg extends NeedReplyMessage implements BackupStorageMessage {
8+
private String backupStorageUuid;
9+
private String taskUuid;
10+
@NoLogging(type = NoLogging.Type.Uri)
11+
private String url;
12+
private String installPath;
13+
14+
@Override
15+
public String getBackupStorageUuid() {
16+
return backupStorageUuid;
17+
}
18+
19+
public void setBackupStorageUuid(String backupStorageUuid) {
20+
this.backupStorageUuid = backupStorageUuid;
21+
}
22+
23+
public String getTaskUuid() {
24+
return taskUuid;
25+
}
26+
27+
public void setTaskUuid(String taskUuid) {
28+
this.taskUuid = taskUuid;
29+
}
30+
31+
public String getUrl() {
32+
return url;
33+
}
34+
35+
public void setUrl(String url) {
36+
this.url = url;
37+
}
38+
39+
public String getInstallPath() {
40+
return installPath;
41+
}
42+
43+
public void setInstallPath(String installPath) {
44+
this.installPath = installPath;
45+
}
46+
}
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
package org.zstack.header.image;
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 UploadFileToBackupStorageHostReply 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+
private String hostname;
17+
private String sshUsername;
18+
@NoLogging
19+
private String sshPassword;
20+
private Integer sshPort;
21+
22+
public String getMd5sum() {
23+
return md5sum;
24+
}
25+
26+
public void setMd5sum(String md5sum) {
27+
this.md5sum = md5sum;
28+
}
29+
30+
public long getSize() {
31+
return size;
32+
}
33+
34+
public void setSize(long size) {
35+
this.size = size;
36+
}
37+
38+
public String getDirectUploadUrl() {
39+
return directUploadUrl;
40+
}
41+
42+
public void setDirectUploadUrl(String directUploadUrl) {
43+
this.directUploadUrl = directUploadUrl;
44+
}
45+
46+
public String getUnzipInstallPath() {
47+
return unzipInstallPath;
48+
}
49+
50+
public void setUnzipInstallPath(String unzipInstallPath) {
51+
this.unzipInstallPath = unzipInstallPath;
52+
}
53+
54+
public Map<String, Long> getFilesSize() {
55+
return filesSize;
56+
}
57+
58+
public void setFilesSize(Map<String, Long> filesSize) {
59+
this.filesSize = filesSize;
60+
}
61+
62+
public String getHostname() {
63+
return hostname;
64+
}
65+
66+
public void setHostname(String hostname) {
67+
this.hostname = hostname;
68+
}
69+
70+
public String getSshUsername() {
71+
return sshUsername;
72+
}
73+
74+
public void setSshUsername(String sshUsername) {
75+
this.sshUsername = sshUsername;
76+
}
77+
78+
public String getSshPassword() {
79+
return sshPassword;
80+
}
81+
82+
public void setSshPassword(String sshPassword) {
83+
this.sshPassword = sshPassword;
84+
}
85+
86+
public Integer getSshPort() {
87+
return sshPort;
88+
}
89+
90+
public void setSshPort(Integer sshPort) {
91+
this.sshPort = sshPort;
92+
}
93+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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 taskUuid;
8+
private String hostname;
9+
10+
@Override
11+
public String getBackupStorageUuid() {
12+
return backupStorageUuid;
13+
}
14+
15+
public void setBackupStorageUuid(String backupStorageUuid) {
16+
this.backupStorageUuid = backupStorageUuid;
17+
}
18+
19+
public String getTaskUuid() {
20+
return taskUuid;
21+
}
22+
23+
public void setTaskUuid(String taskUuid) {
24+
this.taskUuid = taskUuid;
25+
}
26+
27+
public String getHostname() {
28+
return hostname;
29+
}
30+
31+
public void setHostname(String hostname) {
32+
this.hostname = hostname;
33+
}
34+
}
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
package org.zstack.header.storage.backup;
2+
3+
import org.zstack.header.message.MessageReply;
4+
5+
public class GetFileDownloadProgressReply extends MessageReply {
6+
private boolean completed;
7+
private int progress;
8+
9+
private long size;
10+
private long actualSize;
11+
private long downloadSize;
12+
private String installPath;
13+
private String format;
14+
private long lastOpTime;
15+
private boolean supportSuspend;
16+
17+
public boolean isCompleted() {
18+
return completed;
19+
}
20+
21+
public void setCompleted(boolean completed) {
22+
this.completed = completed;
23+
}
24+
25+
public int getProgress() {
26+
return progress;
27+
}
28+
29+
public void setProgress(int progress) {
30+
this.progress = progress;
31+
}
32+
33+
public long getSize() {
34+
return size;
35+
}
36+
37+
public void setSize(long size) {
38+
this.size = size;
39+
}
40+
41+
public long getActualSize() {
42+
return actualSize;
43+
}
44+
45+
public void setActualSize(long actualSize) {
46+
this.actualSize = actualSize;
47+
}
48+
49+
public boolean isDownloadComplete() {
50+
return actualSize > 0 && actualSize == downloadSize;
51+
}
52+
53+
public String getInstallPath() {
54+
return installPath;
55+
}
56+
57+
public void setInstallPath(String installPath) {
58+
this.installPath = installPath;
59+
}
60+
61+
public String getFormat() {
62+
return format;
63+
}
64+
65+
public void setFormat(String format) {
66+
this.format = format;
67+
}
68+
69+
public long getLastOpTime() {
70+
return lastOpTime;
71+
}
72+
73+
public void setLastOpTime(long lastOpTime) {
74+
this.lastOpTime = lastOpTime;
75+
}
76+
77+
public long getDownloadSize() {
78+
return downloadSize;
79+
}
80+
81+
public void setDownloadSize(long downloadSize) {
82+
this.downloadSize = downloadSize;
83+
}
84+
85+
public boolean isSupportSuspend() {
86+
return supportSuspend;
87+
}
88+
89+
public void setSupportSuspend(boolean supportSuspend) {
90+
this.supportSuspend = supportSuspend;
91+
}
92+
}

0 commit comments

Comments
 (0)