Skip to content

Commit f6913b5

Browse files
committed
Removed files that are no longer used and further separated out the files in the core project
1 parent ad2777c commit f6913b5

9 files changed

Lines changed: 27 additions & 96 deletions

File tree

File renamed without changes.

core/src/com/cloud/agent/api/downloadSnapshotFromSwiftCommand.java renamed to core/src/com/cloud/agent/api/DownloadSnapshotFromSwiftCommand.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,17 @@
2222
/**
2323
* This currently assumes that both primary and secondary storage are mounted on the XenServer.
2424
*/
25-
public class downloadSnapshotFromSwiftCommand extends SnapshotCommand {
25+
public class DownloadSnapshotFromSwiftCommand extends SnapshotCommand {
2626
@LogLevel(Log4jLevel.Off)
2727
private SwiftTO _swift;
2828

2929
private String _parent;
3030

31-
protected downloadSnapshotFromSwiftCommand() {
31+
protected DownloadSnapshotFromSwiftCommand() {
3232

3333
}
3434

35-
public downloadSnapshotFromSwiftCommand(SwiftTO swift, String secondaryStorageUrl, Long dcId, Long accountId, Long volumeId, String parent, String BackupUuid, int wait) {
35+
public DownloadSnapshotFromSwiftCommand(SwiftTO swift, String secondaryStorageUrl, Long dcId, Long accountId, Long volumeId, String parent, String BackupUuid, int wait) {
3636

3737
super(null, secondaryStorageUrl, BackupUuid, "", dcId, accountId, volumeId);
3838
setParent(parent);

core/src/com/cloud/agent/api/downloadTemplateFromSwiftToSecondaryStorageCommand.java renamed to core/src/com/cloud/agent/api/DownloadTemplateFromSwiftToSecondaryStorageCommand.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
*
2525
*/
2626

27-
public class downloadTemplateFromSwiftToSecondaryStorageCommand extends Command {
27+
public class DownloadTemplateFromSwiftToSecondaryStorageCommand extends Command {
2828
@LogLevel(Log4jLevel.Off)
2929
private SwiftTO swift;
3030
private String secondaryStorageUrl;
@@ -34,11 +34,11 @@ public class downloadTemplateFromSwiftToSecondaryStorageCommand extends Command
3434
private Long templateId;
3535
private String path;
3636

37-
protected downloadTemplateFromSwiftToSecondaryStorageCommand() {
37+
protected DownloadTemplateFromSwiftToSecondaryStorageCommand() {
3838

3939
}
4040

41-
public downloadTemplateFromSwiftToSecondaryStorageCommand(SwiftTO swift, String secondaryStorageUrl, Long dcId, Long accountId, Long templateId, String path, int wait) {
41+
public DownloadTemplateFromSwiftToSecondaryStorageCommand(SwiftTO swift, String secondaryStorageUrl, Long dcId, Long accountId, Long templateId, String path, int wait) {
4242

4343
this.swift = swift;
4444
this.secondaryStorageUrl = secondaryStorageUrl;

core/src/com/cloud/agent/api/uploadTemplateToSwiftFromSecondaryStorageCommand.java renamed to core/src/com/cloud/agent/api/UploadTemplateToSwiftFromSecondaryStorageCommand.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
*
2525
*/
2626

27-
public class uploadTemplateToSwiftFromSecondaryStorageCommand extends Command {
27+
public class UploadTemplateToSwiftFromSecondaryStorageCommand extends Command {
2828
@LogLevel(Log4jLevel.Off)
2929
private SwiftTO swift;
3030
private String secondaryStorageUrl;
@@ -33,11 +33,11 @@ public class uploadTemplateToSwiftFromSecondaryStorageCommand extends Command {
3333
private Long accountId;
3434
private Long templateId;
3535

36-
protected uploadTemplateToSwiftFromSecondaryStorageCommand() {
36+
protected UploadTemplateToSwiftFromSecondaryStorageCommand() {
3737

3838
}
3939

40-
public uploadTemplateToSwiftFromSecondaryStorageCommand(SwiftTO swift, String secondaryStorageUrl, Long dcId, Long accountId, Long templateId, int wait) {
40+
public UploadTemplateToSwiftFromSecondaryStorageCommand(SwiftTO swift, String secondaryStorageUrl, Long dcId, Long accountId, Long templateId, int wait) {
4141

4242
this.swift = swift;
4343
this.secondaryStorageUrl = secondaryStorageUrl;

core/src/com/cloud/storage/SecondaryStorage.java

Lines changed: 0 additions & 30 deletions
This file was deleted.

core/src/com/cloud/storage/SecondaryStorageLayer.java

Lines changed: 0 additions & 39 deletions
This file was deleted.

server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
import com.cloud.agent.api.DeleteSnapshotBackupCommand;
4949
import com.cloud.agent.api.DeleteSnapshotsDirCommand;
5050
import com.cloud.agent.api.DownloadSnapshotFromS3Command;
51-
import com.cloud.agent.api.downloadSnapshotFromSwiftCommand;
51+
import com.cloud.agent.api.DownloadSnapshotFromSwiftCommand;
5252
import com.cloud.agent.api.to.S3TO;
5353
import com.cloud.agent.api.to.SwiftTO;
5454
import com.cloud.alert.AlertManager;
@@ -384,7 +384,7 @@ public void downloadSnapshotsFromSwift(SnapshotVO ss) {
384384
String parent = null;
385385
try {
386386
for (String backupUuid : BackupUuids) {
387-
downloadSnapshotFromSwiftCommand cmd = new downloadSnapshotFromSwiftCommand(swift, secondaryStoragePoolUrl, dcId, accountId, volumeId, parent, backupUuid, _backupsnapshotwait);
387+
DownloadSnapshotFromSwiftCommand cmd = new DownloadSnapshotFromSwiftCommand(swift, secondaryStoragePoolUrl, dcId, accountId, volumeId, parent, backupUuid, _backupsnapshotwait);
388388
Answer answer = _agentMgr.sendToSSVM(dcId, cmd);
389389
if ((answer == null) || !answer.getResult()) {
390390
throw new CloudRuntimeException("downloadSnapshotsFromSwift failed ");

server/src/com/cloud/template/TemplateManagerImpl.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@
7575
import com.cloud.agent.api.Answer;
7676
import com.cloud.agent.api.AttachIsoCommand;
7777
import com.cloud.agent.api.ComputeChecksumCommand;
78-
import com.cloud.agent.api.downloadTemplateFromSwiftToSecondaryStorageCommand;
79-
import com.cloud.agent.api.uploadTemplateToSwiftFromSecondaryStorageCommand;
78+
import com.cloud.agent.api.DownloadTemplateFromSwiftToSecondaryStorageCommand;
79+
import com.cloud.agent.api.UploadTemplateToSwiftFromSecondaryStorageCommand;
8080
import com.cloud.agent.api.storage.DestroyCommand;
8181
import com.cloud.agent.api.storage.PrimaryStorageDownloadAnswer;
8282
import com.cloud.agent.api.storage.PrimaryStorageDownloadCommand;
@@ -579,7 +579,7 @@ String downloadTemplateFromSwiftToSecondaryStorage(long dcId, long templateId){
579579
return errMsg;
580580
}
581581

582-
downloadTemplateFromSwiftToSecondaryStorageCommand cmd = new downloadTemplateFromSwiftToSecondaryStorageCommand(swift, secHost.getName(), dcId, template.getAccountId(), templateId,
582+
DownloadTemplateFromSwiftToSecondaryStorageCommand cmd = new DownloadTemplateFromSwiftToSecondaryStorageCommand(swift, secHost.getName(), dcId, template.getAccountId(), templateId,
583583
tmpltSwift.getPath(), _primaryStorageDownloadWait);
584584
try {
585585
Answer answer = _agentMgr.sendToSSVM(dcId, cmd);
@@ -628,7 +628,7 @@ String uploadTemplateToSwiftFromSecondaryStorage(VMTemplateHostVO templateHostRe
628628
return errMsg;
629629
}
630630

631-
uploadTemplateToSwiftFromSecondaryStorageCommand cmd = new uploadTemplateToSwiftFromSecondaryStorageCommand(swift, secHost.getName(), secHost.getDataCenterId(), template.getAccountId(),
631+
UploadTemplateToSwiftFromSecondaryStorageCommand cmd = new UploadTemplateToSwiftFromSecondaryStorageCommand(swift, secHost.getName(), secHost.getDataCenterId(), template.getAccountId(),
632632
templateId, _primaryStorageDownloadWait);
633633
Answer answer = null;
634634
try {

services/secondary-storage/src/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@
8080
import com.cloud.agent.api.StartupCommand;
8181
import com.cloud.agent.api.StartupSecondaryStorageCommand;
8282
import com.cloud.agent.api.UploadTemplateToS3FromSecondaryStorageCommand;
83-
import com.cloud.agent.api.downloadSnapshotFromSwiftCommand;
84-
import com.cloud.agent.api.downloadTemplateFromSwiftToSecondaryStorageCommand;
85-
import com.cloud.agent.api.uploadTemplateToSwiftFromSecondaryStorageCommand;
83+
import com.cloud.agent.api.DownloadSnapshotFromSwiftCommand;
84+
import com.cloud.agent.api.DownloadTemplateFromSwiftToSecondaryStorageCommand;
85+
import com.cloud.agent.api.UploadTemplateToSwiftFromSecondaryStorageCommand;
8686
import com.cloud.agent.api.storage.CreateEntityDownloadURLCommand;
8787
import com.cloud.agent.api.storage.DeleteEntityDownloadURLCommand;
8888
import com.cloud.agent.api.storage.DeleteTemplateCommand;
@@ -190,20 +190,20 @@ public Answer executeRequest(Command cmd) {
190190
return execute((ListTemplateCommand)cmd);
191191
} else if (cmd instanceof ListVolumeCommand){
192192
return execute((ListVolumeCommand)cmd);
193-
}else if (cmd instanceof downloadSnapshotFromSwiftCommand){
194-
return execute((downloadSnapshotFromSwiftCommand)cmd);
193+
}else if (cmd instanceof DownloadSnapshotFromSwiftCommand){
194+
return execute((DownloadSnapshotFromSwiftCommand)cmd);
195195
} else if (cmd instanceof DownloadSnapshotFromS3Command) {
196196
return execute((DownloadSnapshotFromS3Command) cmd);
197197
} else if (cmd instanceof DeleteSnapshotBackupCommand){
198198
return execute((DeleteSnapshotBackupCommand)cmd);
199199
} else if (cmd instanceof DeleteSnapshotsDirCommand){
200200
return execute((DeleteSnapshotsDirCommand)cmd);
201-
} else if (cmd instanceof downloadTemplateFromSwiftToSecondaryStorageCommand) {
202-
return execute((downloadTemplateFromSwiftToSecondaryStorageCommand) cmd);
201+
} else if (cmd instanceof DownloadTemplateFromSwiftToSecondaryStorageCommand) {
202+
return execute((DownloadTemplateFromSwiftToSecondaryStorageCommand) cmd);
203203
} else if (cmd instanceof DownloadTemplateFromS3ToSecondaryStorageCommand) {
204204
return execute((DownloadTemplateFromS3ToSecondaryStorageCommand) cmd);
205-
} else if (cmd instanceof uploadTemplateToSwiftFromSecondaryStorageCommand) {
206-
return execute((uploadTemplateToSwiftFromSecondaryStorageCommand) cmd);
205+
} else if (cmd instanceof UploadTemplateToSwiftFromSecondaryStorageCommand) {
206+
return execute((UploadTemplateToSwiftFromSecondaryStorageCommand) cmd);
207207
} else if (cmd instanceof UploadTemplateToS3FromSecondaryStorageCommand) {
208208
return execute((UploadTemplateToS3FromSecondaryStorageCommand) cmd);
209209
} else if (cmd instanceof DeleteObjectFromSwiftCommand) {
@@ -281,7 +281,7 @@ public String determineFileName(final String key) {
281281

282282
}
283283

284-
private Answer execute(downloadTemplateFromSwiftToSecondaryStorageCommand cmd) {
284+
private Answer execute(DownloadTemplateFromSwiftToSecondaryStorageCommand cmd) {
285285
SwiftTO swift = cmd.getSwift();
286286
String secondaryStorageUrl = cmd.getSecondaryStorageUrl();
287287
Long accountId = cmd.getAccountId();
@@ -324,7 +324,7 @@ private Answer execute(downloadTemplateFromSwiftToSecondaryStorageCommand cmd) {
324324
}
325325
}
326326

327-
private Answer execute(uploadTemplateToSwiftFromSecondaryStorageCommand cmd) {
327+
private Answer execute(UploadTemplateToSwiftFromSecondaryStorageCommand cmd) {
328328
SwiftTO swift = cmd.getSwift();
329329
String secondaryStorageUrl = cmd.getSecondaryStorageUrl();
330330
Long accountId = cmd.getAccountId();
@@ -769,7 +769,7 @@ private String determineSnapshotLocalDirectory(
769769
SNAPSHOT_ROOT_DIR, accountId, volumeId);
770770
}
771771

772-
public Answer execute(downloadSnapshotFromSwiftCommand cmd){
772+
public Answer execute(DownloadSnapshotFromSwiftCommand cmd){
773773
SwiftTO swift = cmd.getSwift();
774774
String secondaryStorageUrl = cmd.getSecondaryStorageUrl();
775775
Long accountId = cmd.getAccountId();

0 commit comments

Comments
 (0)