Skip to content

Commit ec3bd01

Browse files
authored
Merge pull request #775 from Dajeong-Park/cvt-hci
[Mold Europa] Commvault 백업 메커니즘 변경 및 rbd 지원
2 parents 28d6e91 + b15a31f commit ec3bd01

12 files changed

Lines changed: 1697 additions & 1208 deletions

File tree

Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
//
2+
// Licensed to the Apache Software Foundation (ASF) under one
3+
// or more contributor license agreements. See the NOTICE file
4+
// distributed with this work for additional information
5+
// regarding copyright ownership. The ASF licenses this file
6+
// to you under the Apache License, Version 2.0 (the
7+
// "License"); you may not use this file except in compliance
8+
// with the License. You may obtain a copy of the License at
9+
//
10+
// http://www.apache.org/licenses/LICENSE-2.0
11+
//
12+
// Unless required by applicable law or agreed to in writing,
13+
// software distributed under the License is distributed on an
14+
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
// KIND, either express or implied. See the License for the
16+
// specific language governing permissions and limitations
17+
// under the License.
18+
//
19+
20+
package org.apache.cloudstack.backup;
21+
22+
import com.cloud.agent.api.Command;
23+
import com.cloud.agent.api.LogLevel;
24+
import com.cloud.vm.VirtualMachine;
25+
import org.apache.cloudstack.storage.to.PrimaryDataStoreTO;
26+
27+
import java.util.List;
28+
29+
public class CommvaultRestoreBackupCommand extends Command {
30+
private String vmName;
31+
private String backupPath;
32+
private List<String> backupVolumesUUIDs;
33+
private List<PrimaryDataStoreTO> restoreVolumePools;
34+
private List<String> restoreVolumePaths;
35+
private String diskType;
36+
private Boolean vmExists;
37+
private String restoreVolumeUUID;
38+
private VirtualMachine.State vmState;
39+
private Integer timeout;
40+
private String cacheMode;
41+
private String hostName;
42+
43+
protected CommvaultRestoreBackupCommand() {
44+
super();
45+
}
46+
47+
public String getVmName() {
48+
return vmName;
49+
}
50+
51+
public void setVmName(String vmName) {
52+
this.vmName = vmName;
53+
}
54+
55+
public String getBackupPath() {
56+
return backupPath;
57+
}
58+
59+
public void setBackupPath(String backupPath) {
60+
this.backupPath = backupPath;
61+
}
62+
63+
public List<PrimaryDataStoreTO> getRestoreVolumePools() {
64+
return restoreVolumePools;
65+
}
66+
67+
public void setRestoreVolumePools(List<PrimaryDataStoreTO> restoreVolumePools) {
68+
this.restoreVolumePools = restoreVolumePools;
69+
}
70+
71+
public List<String> getRestoreVolumePaths() {
72+
return restoreVolumePaths;
73+
}
74+
75+
public void setRestoreVolumePaths(List<String> restoreVolumePaths) {
76+
this.restoreVolumePaths = restoreVolumePaths;
77+
}
78+
79+
public Boolean isVmExists() {
80+
return vmExists;
81+
}
82+
83+
public void setVmExists(Boolean vmExists) {
84+
this.vmExists = vmExists;
85+
}
86+
87+
public String getDiskType() {
88+
return diskType;
89+
}
90+
91+
public void setDiskType(String diskType) {
92+
this.diskType = diskType;
93+
}
94+
95+
public String getRestoreVolumeUUID() {
96+
return restoreVolumeUUID;
97+
}
98+
99+
public void setRestoreVolumeUUID(String restoreVolumeUUID) {
100+
this.restoreVolumeUUID = restoreVolumeUUID;
101+
}
102+
103+
public VirtualMachine.State getVmState() {
104+
return vmState;
105+
}
106+
107+
public void setVmState(VirtualMachine.State vmState) {
108+
this.vmState = vmState;
109+
}
110+
111+
@LogLevel(LogLevel.Log4jLevel.Off)
112+
private String mountOptions;
113+
@Override
114+
115+
public boolean executeInSequence() {
116+
return true;
117+
}
118+
119+
public List<String> getBackupVolumesUUIDs() {
120+
return backupVolumesUUIDs;
121+
}
122+
123+
public void setBackupVolumesUUIDs(List<String> backupVolumesUUIDs) {
124+
this.backupVolumesUUIDs = backupVolumesUUIDs;
125+
}
126+
127+
public Integer getTimeout() {
128+
return this.timeout == null ? 0 : this.timeout;
129+
}
130+
131+
public void setTimeout(Integer timeout) {
132+
this.timeout = timeout;
133+
}
134+
135+
public String getCacheMode() {
136+
return cacheMode;
137+
}
138+
139+
public void setCacheMode(String cacheMode) {
140+
this.cacheMode = cacheMode;
141+
}
142+
143+
public String getHostName() {
144+
return hostName;
145+
}
146+
147+
public void setHostName(String hostName) {
148+
this.hostName = hostName;
149+
}
150+
}
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
//
2+
// Licensed to the Apache Software Foundation (ASF) under one
3+
// or more contributor license agreements. See the NOTICE file
4+
// distributed with this work for additional information
5+
// regarding copyright ownership. The ASF licenses this file
6+
// to you under the Apache License, Version 2.0 (the
7+
// "License"); you may not use this file except in compliance
8+
// with the License. You may obtain a copy of the License at
9+
//
10+
// http://www.apache.org/licenses/LICENSE-2.0
11+
//
12+
// Unless required by applicable law or agreed to in writing,
13+
// software distributed under the License is distributed on an
14+
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
// KIND, either express or implied. See the License for the
16+
// specific language governing permissions and limitations
17+
// under the License.
18+
//
19+
20+
package org.apache.cloudstack.backup;
21+
22+
import com.cloud.agent.api.Command;
23+
import org.apache.cloudstack.storage.to.PrimaryDataStoreTO;
24+
25+
import java.util.List;
26+
27+
public class CommvaultTakeBackupCommand extends Command {
28+
private String vmName;
29+
private String backupPath;
30+
private List<PrimaryDataStoreTO> volumePools;
31+
private List<String> volumePaths;
32+
private Boolean quiesce;
33+
34+
public CommvaultTakeBackupCommand(String vmName, String backupPath) {
35+
super();
36+
this.vmName = vmName;
37+
this.backupPath = backupPath;
38+
}
39+
40+
public String getVmName() {
41+
return vmName;
42+
}
43+
44+
public void setVmName(String vmName) {
45+
this.vmName = vmName;
46+
}
47+
48+
public String getBackupPath() {
49+
return backupPath;
50+
}
51+
52+
public void setBackupPath(String backupPath) {
53+
this.backupPath = backupPath;
54+
}
55+
56+
public List<PrimaryDataStoreTO> getVolumePools() {
57+
return volumePools;
58+
}
59+
60+
public void setVolumePools(List<PrimaryDataStoreTO> volumePools) {
61+
this.volumePools = volumePools;
62+
}
63+
64+
public List<String> getVolumePaths() {
65+
return volumePaths;
66+
}
67+
68+
public void setVolumePaths(List<String> volumePaths) {
69+
this.volumePaths = volumePaths;
70+
}
71+
72+
public Boolean getQuiesce() {
73+
return quiesce;
74+
}
75+
76+
public void setQuiesce(Boolean quiesce) {
77+
this.quiesce = quiesce;
78+
}
79+
80+
@Override
81+
public boolean executeInSequence() {
82+
return true;
83+
}
84+
}

0 commit comments

Comments
 (0)