Skip to content

Commit a36dcfb

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

9 files changed

Lines changed: 406 additions & 0 deletions

File tree

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: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
package org.zstack.header.image;
2+
3+
import org.zstack.header.log.NoLogging;
4+
import org.zstack.header.message.MessageReply;
5+
6+
public class UploadFileToBackupStorageHostReply extends MessageReply {
7+
private String md5sum;
8+
private long size;
9+
@NoLogging(type = NoLogging.Type.Uri)
10+
private String directUploadUrl;
11+
private String unzipInstallPath;
12+
13+
public String getMd5sum() {
14+
return md5sum;
15+
}
16+
17+
public void setMd5sum(String md5sum) {
18+
this.md5sum = md5sum;
19+
}
20+
21+
public long getSize() {
22+
return size;
23+
}
24+
25+
public void setSize(long size) {
26+
this.size = size;
27+
}
28+
29+
public String getDirectUploadUrl() {
30+
return directUploadUrl;
31+
}
32+
33+
public void setDirectUploadUrl(String directUploadUrl) {
34+
this.directUploadUrl = directUploadUrl;
35+
}
36+
37+
public String getUnzipInstallPath() {
38+
return unzipInstallPath;
39+
}
40+
41+
public void setUnzipInstallPath(String unzipInstallPath) {
42+
this.unzipInstallPath = unzipInstallPath;
43+
}
44+
}
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)