Skip to content
Merged
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
ecc953f
pom.xml: add veeam
weizhouapache Oct 20, 2023
7bd8562
Veeam: import powershell module which is available since Veeam 11
weizhouapache Oct 25, 2023
1459cc4
Veeam: silently ignore the warning messages when import Veeam module
weizhouapache Oct 25, 2023
8ea34d6
Veeam: fix issue when assign vm to backup offerings
weizhouapache Oct 25, 2023
7a3ddf7
Veeam: add marvin test
weizhouapache Oct 26, 2023
3672104
veeam: force delete backup
weizhouapache Oct 27, 2023
02c04b2
backup: enable group-delete action on UI
weizhouapache Nov 2, 2023
3756420
veeam: fix authorization failure in veeam 12a
weizhouapache Nov 3, 2023
08d8725
veeam: update integration test
weizhouapache Nov 3, 2023
5601116
veeam: fix exception if backup name has space
weizhouapache Nov 3, 2023
108d296
veeam: remove offering as last step in cleanup
weizhouapache Nov 4, 2023
6007808
veeam: add zone setting backup.plugin.veeam.version
weizhouapache Nov 4, 2023
a2265cb
veeam: fix update integration test
weizhouapache Nov 4, 2023
574672b
veeam: fix backup metrics in veeam12
weizhouapache Nov 6, 2023
b7f3252
veeam: remove RestorePoint/RestorePoints class
weizhouapache Nov 7, 2023
a457a11
veeam: add integration/marvin for backup schedule
weizhouapache Nov 7, 2023
bd8d331
veeam: add integration/marvin for restoreVolumeFromBackupAndAttachToVM
weizhouapache Nov 14, 2023
82337b1
veeam: fix EOF test/integration/smoke/test_backup_recovery_veeam.py
weizhouapache Nov 14, 2023
706ab9e
veeam: consider that powershell commands return null
weizhouapache Nov 15, 2023
2a1b23d
veeam: update default veeam.version to null and use VeeamAPI by default
weizhouapache Nov 15, 2023
c91cd61
veeam: update integration test as Daan comments
weizhouapache Nov 15, 2023
1d6d9d5
veeam: reformat commands in getBackupMetricsLegacy method
weizhouapache Nov 16, 2023
33fccda
Veeam: get server version via PS commands
weizhouapache Nov 16, 2023
7473e64
veeam: honor global/zone setting backup.plugin.veeam.version
weizhouapache Nov 16, 2023
ea59349
Veeam: add unit tests for getVeeamServerVersion
weizhouapache Nov 16, 2023
722b35e
plugins/pom.xml: remove backup/veeam as it depends on cloud-plugin-hy…
weizhouapache Nov 16, 2023
617a4c2
Veeam: update unit tests
weizhouapache Dec 8, 2023
ea84af9
[Veeam] restored VMs without NICs (#6282)
SadiJr Jul 3, 2023
2818366
veeam: fix inconsistent display in popup and vm details
weizhouapache Jan 5, 2024
6f021b7
Veeam: add interval type for backup schedules
weizhouapache Jan 9, 2024
bb0ec5e
veeam: support datetime without milliseconds
weizhouapache Jan 9, 2024
abec342
veeam: add event when backup is started/completed
weizhouapache Jan 10, 2024
5935410
veeam: add events when restoring backup is started/completed or fail
weizhouapache Jan 10, 2024
d392a6b
veeam: throw exception if restore session fails
weizhouapache Jan 10, 2024
597897d
veeam: set default value of backup.plugin.veeam.version to 0
weizhouapache Jan 11, 2024
00e8d2f
backup: add removed to BackupVO
weizhouapache Jan 15, 2024
3392552
veeam: add zone settings for polling veeam task
weizhouapache Jan 15, 2024
9d7d5fd
veeam: fix check task interval
weizhouapache Jan 15, 2024
6013e54
veeam: Prepare for restoring VM on VMware
weizhouapache Jan 18, 2024
f1386b8
veeam: remove CBT info from vmdk for all disks as the first disk migh…
weizhouapache Jan 18, 2024
1670f86
veeam: remove CBT info only if restore backup fails
weizhouapache Jan 18, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ public class VeeamBackupProvider extends AdapterBase implements BackupProvider,
"backup.plugin.veeam.url", "https://localhost:9398/api/",
"The Veeam backup and recovery URL.", true, ConfigKey.Scope.Zone);

public ConfigKey<Integer> VeeamVersion = new ConfigKey<>("Advanced", Integer.class,
"backup.plugin.veeam.version", "",
"The version of Veeam backup and recovery.", true, ConfigKey.Scope.Zone);

private ConfigKey<String> VeeamUsername = new ConfigKey<>("Advanced", String.class,
"backup.plugin.veeam.username", "administrator",
"The Veeam backup and recovery username.", true, ConfigKey.Scope.Zone);
Expand Down Expand Up @@ -92,7 +96,7 @@ public class VeeamBackupProvider extends AdapterBase implements BackupProvider,

protected VeeamClient getClient(final Long zoneId) {
try {
return new VeeamClient(VeeamUrl.valueIn(zoneId), VeeamUsername.valueIn(zoneId), VeeamPassword.valueIn(zoneId),
return new VeeamClient(VeeamUrl.valueIn(zoneId), VeeamVersion.valueIn(zoneId), VeeamUsername.valueIn(zoneId), VeeamPassword.valueIn(zoneId),
VeeamValidateSSLSecurity.valueIn(zoneId), VeeamApiRequestTimeout.valueIn(zoneId), VeeamRestoreTimeout.valueIn(zoneId));
} catch (URISyntaxException e) {
throw new CloudRuntimeException("Failed to parse Veeam API URL: " + e.getMessage());
Expand Down Expand Up @@ -349,6 +353,7 @@ public String getConfigComponentName() {
public ConfigKey<?>[] getConfigKeys() {
return new ConfigKey[]{
VeeamUrl,
VeeamVersion,
VeeamUsername,
VeeamPassword,
VeeamValidateSSLSecurity,
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.

package org.apache.cloudstack.backup.veeam.api;

import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;

import java.util.List;

@JacksonXmlRootElement(localName = "BackupFile")
public class BackupFile {
@JacksonXmlProperty(localName = "Type", isAttribute = true)
private String type;

@JacksonXmlProperty(localName = "Href", isAttribute = true)
private String href;

@JacksonXmlProperty(localName = "Name", isAttribute = true)
private String name;

@JacksonXmlProperty(localName = "UID", isAttribute = true)
private String uid;

@JacksonXmlProperty(localName = "Link")
@JacksonXmlElementWrapper(localName = "Links")
private List<Link> link;

@JacksonXmlProperty(localName = "FilePath")
private String filePath;

@JacksonXmlProperty(localName = "BackupSize")
private String backupSize;

@JacksonXmlProperty(localName = "DataSize")
private String dataSize;

@JacksonXmlProperty(localName = "DeduplicationRatio")
private String deduplicationRatio;

@JacksonXmlProperty(localName = "CompressRatio")
private String compressRatio;

@JacksonXmlProperty(localName = "CreationTimeUtc")
private String creationTimeUtc;

@JacksonXmlProperty(localName = "FileType")
private String fileType;

public String getType() {
return type;
}

public void setType(String type) {
this.type = type;
}

public String getHref() {
return href;
}

public void setHref(String href) {
this.href = href;
}

public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}

public String getUid() {
return uid;
}

public void setUid(String uid) {
this.uid = uid;
}

public List<Link> getLink() {
return link;
}

public void setLink(List<Link> link) {
this.link = link;
}

public String getFilePath() {
return filePath;
}

public void setFilePath(String filePath) {
this.filePath = filePath;
}

public String getBackupSize() {
return backupSize;
}

public void setBackupSize(String backupSize) {
this.backupSize = backupSize;
}

public String getDataSize() {
return dataSize;
}

public void setDataSize(String dataSize) {
this.dataSize = dataSize;
}

public String getDeduplicationRatio() {
return deduplicationRatio;
}

public void setDeduplicationRatio(String deduplicationRatio) {
this.deduplicationRatio = deduplicationRatio;
}

public String getCompressRatio() {
return compressRatio;
}

public void setCompressRatio(String compressRatio) {
this.compressRatio = compressRatio;
}

public String getCreationTimeUtc() {
return creationTimeUtc;
}

public void setCreationTimeUtc(String creationTimeUtc) {
this.creationTimeUtc = creationTimeUtc;
}

public String getFileType() {
return fileType;
}

public void setFileType(String fileType) {
this.fileType = fileType;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.

package org.apache.cloudstack.backup.veeam.api;

import java.util.List;

import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;

@JacksonXmlRootElement(localName = "BackupFiles")
public class BackupFiles {
@JacksonXmlProperty(localName = "BackupFile")
@JacksonXmlElementWrapper(localName = "BackupFile", useWrapping = false)
private List<BackupFile> backupFiles;

public List<BackupFile> getBackupFiles() {
return backupFiles;
}

public void setBackupFiles(List<BackupFile> backupFiles) {
this.backupFiles = backupFiles;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.

package org.apache.cloudstack.backup.veeam.api;

import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;

import java.util.List;

@JacksonXmlRootElement(localName = "VmRestorePoint")
public class VmRestorePoint {
@JacksonXmlProperty(localName = "Type", isAttribute = true)
private String type;

@JacksonXmlProperty(localName = "Href", isAttribute = true)
private String href;

@JacksonXmlProperty(localName = "Name", isAttribute = true)
private String name;

@JacksonXmlProperty(localName = "UID", isAttribute = true)
private String uid;

@JacksonXmlProperty(localName = "VmDisplayName", isAttribute = true)
private String vmDisplayName;

@JacksonXmlProperty(localName = "Link")
@JacksonXmlElementWrapper(localName = "Links")
private List<Link> link;

@JacksonXmlProperty(localName = "CreationTimeUTC")
private String creationTimeUtc;

@JacksonXmlProperty(localName = "VmName")
private String vmName;

@JacksonXmlProperty(localName = "Algorithm")
private String algorithm;

@JacksonXmlProperty(localName = "PointType")
private String pointType;

@JacksonXmlProperty(localName = "HierarchyObjRef")
private String hierarchyObjRef;

public String getType() {
return type;
}

public void setType(String type) {
this.type = type;
}

public String getHref() {
return href;
}

public void setHref(String href) {
this.href = href;
}

public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}

public String getUid() {
return uid;
}

public void setUid(String uid) {
this.uid = uid;
}

public String getVmDisplayName() {
return vmDisplayName;
}

public void setVmDisplayName(String vmDisplayName) {
this.vmDisplayName = vmDisplayName;
}

public List<Link> getLink() {
return link;
}

public void setLink(List<Link> link) {
this.link = link;
}

public String getCreationTimeUtc() {
return creationTimeUtc;
}

public void setCreationTimeUtc(String creationTimeUtc) {
this.creationTimeUtc = creationTimeUtc;
}

public String getVmName() {
return vmName;
}

public void setVmName(String vmName) {
this.vmName = vmName;
}

public String getAlgorithm() {
return algorithm;
}

public void setAlgorithm(String algorithm) {
this.algorithm = algorithm;
}

public String getPointType() {
return pointType;
}

public void setPointType(String pointType) {
this.pointType = pointType;
}

public String getHierarchyObjRef() {
return hierarchyObjRef;
}

public void setHierarchyObjRef(String hierarchyObjRef) {
this.hierarchyObjRef = hierarchyObjRef;
}
}
Loading