Skip to content

Commit 3a9d688

Browse files
author
Alex Huang
committed
Removed useless code
1 parent 94ec7bf commit 3a9d688

4 files changed

Lines changed: 10 additions & 368 deletions

File tree

server/src/com/cloud/api/doc/Command.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,16 +68,18 @@ public void setResponse(ArrayList<Argument> response) {
6868

6969
public Argument getReqArgByName(String name){
7070
for (Argument a : this.getRequest()) {
71-
if (a.getName().equals(name))
72-
return a;
71+
if (a.getName().equals(name)) {
72+
return a;
73+
}
7374
}
7475
return null;
7576
}
7677

7778
public Argument getResArgByName(String name){
7879
for (Argument a : this.getResponse()) {
79-
if (a.getName().equals(name))
80-
return a;
80+
if (a.getName().equals(name)) {
81+
return a;
82+
}
8183
}
8284
return null;
8385
}

server/src/com/cloud/ha/StorageFence.java

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

server/src/com/cloud/storage/StorageManager.java

Lines changed: 0 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -36,75 +36,12 @@
3636
import com.cloud.user.Account;
3737
import com.cloud.utils.Pair;
3838
import com.cloud.utils.component.Manager;
39-
import com.cloud.utils.exception.ExecutionException;
4039
import com.cloud.vm.DiskProfile;
4140
import com.cloud.vm.VMInstanceVO;
4241
import com.cloud.vm.VirtualMachine;
4342
import com.cloud.vm.VirtualMachineProfile;
4443

4544
public interface StorageManager extends Manager {
46-
47-
48-
VolumeVO allocateIsoInstalledVm(VMInstanceVO vm, VMTemplateVO template, DiskOfferingVO rootOffering, Long size, DataCenterVO dc, Account account);
49-
50-
/**
51-
* Calls the storage agent and makes the volumes sharable with this host.
52-
*
53-
* @param vm vm that owns the volumes
54-
* @param vols volumes to share
55-
* @param host host to share the volumes to.
56-
* @param cancelPrevious cancel the previous shares?
57-
* @return true if works.
58-
*
59-
* @throws StorageUnavailableException if the storage server is unavailable.
60-
*/
61-
boolean share(VMInstanceVO vm, List<VolumeVO> vols, HostVO host, boolean cancelPrevious) throws StorageUnavailableException;
62-
63-
List<VolumeVO> prepare(VMInstanceVO vm, HostVO host);
64-
65-
/**
66-
* Calls the storage server to unshare volumes to the host.
67-
*
68-
* @param vm vm that owns the volumes.
69-
* @param vols volumes to remove from share.
70-
* @param host host to unshare the volumes to.
71-
* @return true if it worked; false if not.
72-
*/
73-
boolean unshare(VMInstanceVO vm, List<VolumeVO> vols, HostVO host);
74-
75-
/**
76-
* unshares the storage volumes of a certain vm to the host.
77-
*
78-
* @param vm vm to unshare.
79-
* @param host host.
80-
* @return List<VolumeVO> if succeeded. null if not.
81-
*/
82-
List<VolumeVO> unshare(VMInstanceVO vm, HostVO host);
83-
84-
/**
85-
* Creates volumes for a particular VM.
86-
* @param account account to create volumes for.
87-
* @param vm vm to create the volumes for.
88-
* @param template template the root volume is based on.
89-
* @param dc datacenter to put this.
90-
* @param pod pod to put this.
91-
* @param offering service offering of the vm.
92-
* @param diskOffering disk offering of the vm.
93-
* @param avoids storage pools to avoid.
94-
* @param size : size of the volume if defined
95-
* @return List of VolumeVO
96-
*/
97-
List<VolumeVO> create(Account account, VMInstanceVO vm, VMTemplateVO template, DataCenterVO dc, HostPodVO pod, ServiceOfferingVO offering, DiskOfferingVO diskOffering, long size) throws StorageUnavailableException, ExecutionException;
98-
99-
/**
100-
* Get the storage ip address to connect to.
101-
* @param vm vm to run.
102-
* @param host host to run it on.
103-
* @param storage storage that contains the vm.
104-
* @return ip address if it can be determined. null if not.
105-
*/
106-
String chooseStorageIp(VMInstanceVO vm, Host host, Host storage);
107-
10845
boolean canVmRestartOnAnotherServer(long vmId);
10946

11047
/** Returns the absolute path of the specified ISO
@@ -135,16 +72,6 @@ public interface StorageManager extends Manager {
13572
*/
13673
public HostVO getSecondaryStorageHost(long zoneId);
13774

138-
/**
139-
* Create the volumes for a user VM based on service offering in a particular data center
140-
*
141-
* @return true if successful
142-
*/
143-
public long createUserVM(Account account, VMInstanceVO vm,
144-
VMTemplateVO template, DataCenterVO dc, HostPodVO pod,
145-
ServiceOfferingVO offering, DiskOfferingVO diskOffering,
146-
List<StoragePoolVO> avoids, long size);
147-
14875
/**
14976
* This method sends the given command on all the hosts in the primary storage pool given until is succeeds on any one.
15077
* If the command doesn't succeed on any, it return null. All exceptions are swallowed. Any errors are expected be be in
@@ -240,14 +167,6 @@ VolumeVO createVolume(VolumeVO volume, VMInstanceVO vm, VMTemplateVO template, D
240167
*/
241168
void cleanupStorage(boolean recurring);
242169

243-
/**
244-
* Find all of the storage pools needed for this vm.
245-
*
246-
* @param vmId id of the vm.
247-
* @return List of StoragePoolVO
248-
*/
249-
StoragePoolVO getStoragePoolForVm(long vmId);
250-
251170
String getPrimaryStorageNameLabel(VolumeVO volume);
252171

253172
/**
@@ -270,7 +189,6 @@ VolumeVO createVolume(VolumeVO volume, VMInstanceVO vm, VMTemplateVO template, D
270189

271190

272191
void prepare(VirtualMachineProfile<? extends VirtualMachine> vm, DeployDestination dest) throws StorageUnavailableException, InsufficientStorageCapacityException, ConcurrentOperationException;
273-
//void release(VirtualMachineProfile<? extends VirtualMachine> vm);
274192

275193
void release(VirtualMachineProfile<? extends VMInstanceVO> profile);
276194

0 commit comments

Comments
 (0)