Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions build/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,11 @@
<artifactId>zce-x-plugin</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.zstack</groupId>
<artifactId>zmigrate-plugin</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.zstack</groupId>
<artifactId>zsv</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion conf/errorCodes/SoftwarePackagePlugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<prefix>SoftwarePackage</prefix>

<code>
<id>2000</id>
<id>1000</id>
<description>Failed to upload software package</description>
</code>
</error>
63 changes: 63 additions & 0 deletions conf/errorCodes/ZMigratePlugin.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<error>
<prefix>ZMigrate</prefix>

<code>
<id>1000</id>
<description>ZMigrate generic error</description>
</code>

<code>
<id>1001</id>
<description>Failed to create account in ZMigrate</description>
</code>

<code>
<id>1002</id>
<description>Failed to verify platform connection</description>
</code>

<code>
<id>1003</id>
<description>Failed to verify gateway connection</description>
</code>

<code>
<id>1004</id>
<description>Failed to register ZSV to ZMigrate</description>
</code>

<code>
<id>1005</id>
<description>Failed to register gateway to ZMigrate</description>
</code>

<code>
<id>1006</id>
<description>Failed to get licenses from ZMigrate</description>
</code>

<code>
<id>1007</id>
<description>Failed to get platform information</description>
</code>

<code>
<id>1008</id>
<description>Failed to get migration jobs</description>
</code>

<code>
<id>1009</id>
<description>Failed to get ZMigrate management server information</description>
</code>

<code>
<id>1010</id>
<description>Failed to get gateway server information</description>
</code>

<code>
<id>1011</id>
<description>Failed to get encrypt key</description>
</code>
</error>
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package org.zstack.header.storage.backup;

import org.zstack.header.message.CancelMessage;

public class CancelDownloadFileOnBackupStorageHostMsg extends CancelMessage implements BackupStorageMessage {
private String backupStorageUuid;
private String backupStorageHostUuid;

@Override
public String getBackupStorageUuid() {
return backupStorageUuid;
}

public void setBackupStorageUuid(String backupStorageUuid) {
this.backupStorageUuid = backupStorageUuid;
}

public String getBackupStorageHostUuid() {
return backupStorageHostUuid;
}

public void setBackupStorageHostUuid(String backupStorageHostUuid) {
this.backupStorageHostUuid = backupStorageHostUuid;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package org.zstack.header.storage.backup;

import org.zstack.header.message.MessageReply;

public class CancelDownloadFileOnBackupStorageHostReply extends MessageReply {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package org.zstack.header.storage.backup;

import org.zstack.header.message.NeedReplyMessage;

import java.util.ArrayList;
import java.util.List;

public class DeleteFilesOnBackupStorageHostMsg extends NeedReplyMessage implements BackupStorageMessage {
private String backupStorageUuid;
private String backupStorageHostUuid;
private List<String> filesPath = new ArrayList<>();

@Override
public String getBackupStorageUuid() {
return backupStorageUuid;
}

public void setBackupStorageUuid(String backupStorageUuid) {
this.backupStorageUuid = backupStorageUuid;
}

public String getBackupStorageHostUuid() {
return backupStorageHostUuid;
}

public void setBackupStorageHostUuid(String backupStorageHostUuid) {
this.backupStorageHostUuid = backupStorageHostUuid;
}

public List<String> getFilesPath() {
return filesPath;
}

public void setFilesPath(List<String> filesPath) {
this.filesPath = filesPath;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package org.zstack.header.storage.backup;

import org.zstack.header.message.MessageReply;

public class DeleteFilesOnBackupStorageHostReply extends MessageReply {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
package org.zstack.header.storage.backup;

import org.zstack.header.message.NeedReplyMessage;

public class GetFileDownloadProgressFromBackupStorageHostMsg extends NeedReplyMessage implements BackupStorageMessage {
private String backupStorageUuid;
private String backupStorageHostUuid;
private String taskUuid;
private String hostname;

@Override
public String getBackupStorageUuid() {
return backupStorageUuid;
}

public void setBackupStorageUuid(String backupStorageUuid) {
this.backupStorageUuid = backupStorageUuid;
}

public String getBackupStorageHostUuid() {
return backupStorageHostUuid;
}

public void setBackupStorageHostUuid(String backupStorageHostUuid) {
this.backupStorageHostUuid = backupStorageHostUuid;
}

public String getTaskUuid() {
return taskUuid;
}

public void setTaskUuid(String taskUuid) {
this.taskUuid = taskUuid;
}

public String getHostname() {
return hostname;
}

public void setHostname(String hostname) {
this.hostname = hostname;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
package org.zstack.header.storage.backup;

import org.zstack.header.message.MessageReply;

import java.util.Map;

public class GetFileDownloadProgressFromBackupStorageHostReply extends MessageReply {
private boolean completed;
private int progress;

private long size;
private long actualSize;
private long downloadSize;
private String installPath;
private long lastOpTime;
private boolean supportSuspend;
private String md5sum;
private String format;

private String unzipInstallPath;
private Map<String, Long> filesSize;

public boolean isCompleted() {
return completed;
}

public void setCompleted(boolean completed) {
this.completed = completed;
}

public int getProgress() {
return progress;
}

public void setProgress(int progress) {
this.progress = progress;
}

public long getSize() {
return size;
}

public void setSize(long size) {
this.size = size;
}

public long getActualSize() {
return actualSize;
}

public void setActualSize(long actualSize) {
this.actualSize = actualSize;
}

public String getInstallPath() {
return installPath;
}

public void setInstallPath(String installPath) {
this.installPath = installPath;
}

public String getFormat() {
return format;
}

public void setFormat(String format) {
this.format = format;
}

public long getLastOpTime() {
return lastOpTime;
}

public void setLastOpTime(long lastOpTime) {
this.lastOpTime = lastOpTime;
}

public long getDownloadSize() {
return downloadSize;
}

public void setDownloadSize(long downloadSize) {
this.downloadSize = downloadSize;
}

public boolean isSupportSuspend() {
return supportSuspend;
}

public void setSupportSuspend(boolean supportSuspend) {
this.supportSuspend = supportSuspend;
}

public String getMd5sum() {
return md5sum;
}

public void setMd5sum(String md5sum) {
this.md5sum = md5sum;
}

public String getUnzipInstallPath() {
return unzipInstallPath;
}

public void setUnzipInstallPath(String unzipInstallPath) {
this.unzipInstallPath = unzipInstallPath;
}

public Map<String, Long> getFilesSize() {
return filesSize;
}

public void setFilesSize(Map<String, Long> filesSize) {
this.filesSize = filesSize;
}
}
Loading