Skip to content

Commit 25a6234

Browse files
sudisonAnthony Xu
authored andcommitted
fix build
1 parent 578d2f6 commit 25a6234

9 files changed

Lines changed: 132 additions & 111 deletions

File tree

api/src/com/cloud/storage/StoragePool.java

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818

1919
import java.util.Date;
2020

21-
import com.cloud.hypervisor.Hypervisor;
2221
import org.apache.cloudstack.api.Identity;
2322
import org.apache.cloudstack.api.InternalIdentity;
2423

24+
import com.cloud.hypervisor.Hypervisor;
2525
import com.cloud.storage.Storage.StoragePoolType;
2626

2727
public interface StoragePool extends Identity, InternalIdentity {
@@ -99,13 +99,9 @@ public interface StoragePool extends Identity, InternalIdentity {
9999

100100
Long getPodId();
101101

102-
/**
103-
* @return
104-
*/
105-
String getStorageProviderName();
106-
107-
boolean isInMaintenance();
102+
String getStorageProviderName();
108103

109-
Hypervisor.HypervisorType getHypervisor();
104+
boolean isInMaintenance();
110105

106+
Hypervisor.HypervisorType getHypervisor();
111107
}

core/test/org/apache/cloudstack/api/agent/test/BackupSnapshotCommandTest.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828

2929
import com.cloud.agent.api.BackupSnapshotCommand;
3030
import com.cloud.agent.api.to.SwiftTO;
31+
import com.cloud.hypervisor.Hypervisor;
3132
import com.cloud.storage.Storage.StoragePoolType;
3233
import com.cloud.storage.StoragePool;
3334
import com.cloud.storage.StoragePoolStatus;
@@ -145,7 +146,14 @@ public String getStorageProviderName() {
145146
public boolean isInMaintenance() {
146147
// TODO Auto-generated method stub
147148
return false;
148-
};
149+
}
150+
151+
@Override
152+
public Hypervisor.HypervisorType getHypervisor() {
153+
return null; //To change body of implemented methods use File | Settings | File Templates.
154+
}
155+
156+
;
149157
};
150158

151159
BackupSnapshotCommand bsc = new BackupSnapshotCommand("http://secondary.Storage.Url", 101L, 102L, 103L, 104L, 105L, "vPath", pool,

core/test/org/apache/cloudstack/api/agent/test/CheckNetworkAnswerTest.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
import com.cloud.agent.api.CheckNetworkCommand;
3333
import com.cloud.agent.api.storage.ResizeVolumeCommand;
3434
import com.cloud.agent.api.to.StorageFilerTO;
35+
import com.cloud.hypervisor.Hypervisor;
3536
import com.cloud.storage.Storage;
3637
import com.cloud.storage.StoragePool;
3738
import com.cloud.storage.StoragePoolStatus;
@@ -184,7 +185,14 @@ public String getStorageProviderName() {
184185
public boolean isInMaintenance() {
185186
// TODO Auto-generated method stub
186187
return false;
187-
};
188+
}
189+
190+
@Override
191+
public Hypervisor.HypervisorType getHypervisor() {
192+
return null; //To change body of implemented methods use File | Settings | File Templates.
193+
}
194+
195+
;
188196
};
189197

190198
Long newSize = 4194304L;

core/test/org/apache/cloudstack/api/agent/test/SnapshotCommandTest.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
import org.junit.Test;
2929

3030
import com.cloud.agent.api.SnapshotCommand;
31+
import com.cloud.hypervisor.Hypervisor;
3132
import com.cloud.storage.Storage.StoragePoolType;
3233
import com.cloud.storage.StoragePool;
3334
import com.cloud.storage.StoragePoolStatus;
@@ -146,7 +147,14 @@ public String getStorageProviderName() {
146147
public boolean isInMaintenance() {
147148
// TODO Auto-generated method stub
148149
return false;
149-
};
150+
}
151+
152+
@Override
153+
public Hypervisor.HypervisorType getHypervisor() {
154+
return null; //To change body of implemented methods use File | Settings | File Templates.
155+
}
156+
157+
;
150158
};
151159

152160
SnapshotCommand ssc = new SnapshotCommand(pool, "http://secondary.Storage.Url", "420fa39c-4ef1-a83c-fd93-46dc1ff515ae", "snapshotName", 101L, 102L, 103L);

engine/storage/volume/src/org/apache/cloudstack/storage/datastore/PrimaryDataStoreImpl.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@
2424

2525
import javax.inject.Inject;
2626

27-
import org.apache.log4j.Logger;
28-
2927
import org.apache.cloudstack.engine.subsystem.api.storage.ClusterScope;
3028
import org.apache.cloudstack.engine.subsystem.api.storage.DataObject;
3129
import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreDriver;
@@ -47,6 +45,7 @@
4745
import org.apache.cloudstack.storage.datastore.db.StoragePoolVO;
4846
import org.apache.cloudstack.storage.to.PrimaryDataStoreTO;
4947
import org.apache.cloudstack.storage.volume.VolumeObject;
48+
import org.apache.log4j.Logger;
5049

5150
import com.cloud.agent.api.to.DataObjectType;
5251
import com.cloud.agent.api.to.DataStoreTO;
@@ -391,6 +390,11 @@ public boolean isInMaintenance() {
391390
getStatus() == StoragePoolStatus.ErrorInMaintenance || getRemoved() != null;
392391
}
393392

393+
@Override
394+
public HypervisorType getHypervisor() {
395+
return pdsv.getHypervisor();
396+
}
397+
394398
@Override
395399
public String getStorageProviderName() {
396400
return pdsv.getStorageProviderName();

plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XcpOssResource.java

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
import java.util.Set;
2424

2525
import javax.ejb.Local;
26-
import javax.ws.rs.HEAD;
2726

2827
import org.apache.log4j.Logger;
2928
import org.apache.xmlrpc.XmlRpcException;
@@ -118,13 +117,13 @@ protected StartupStorageCommand initializeLocalSR(Connection conn) {
118117

119118
@Override
120119
protected String getGuestOsType(String stdType, boolean bootFromCD) {
121-
if (stdType.equalsIgnoreCase("Debian GNU/Linux 6(64-bit)")) {
122-
return "Debian Squeeze 6.0 (64-bit)";
123-
} else if (stdType.equalsIgnoreCase("CentOS 5.6 (64-bit)")) {
120+
if (stdType.equalsIgnoreCase("Debian GNU/Linux 6(64-bit)")) {
121+
return "Debian Squeeze 6.0 (64-bit)";
122+
} else if (stdType.equalsIgnoreCase("CentOS 5.6 (64-bit)")) {
124123
return "CentOS 5 (64-bit)";
125124
} else {
126-
return CitrixHelper.getXcpGuestOsType(stdType);
127-
}
125+
return CitrixHelper.getXcpGuestOsType(stdType);
126+
}
128127
}
129128

130129
@Override
@@ -177,7 +176,7 @@ protected NetworkUsageAnswer execute(NetworkUsageCommand cmd) {
177176
@Override
178177
public Answer executeRequest(Command cmd) {
179178
if (cmd instanceof NetworkUsageCommand) {
180-
return execute((NetworkUsageCommand)cmd);
179+
return execute((NetworkUsageCommand) cmd);
181180
} else {
182181
return super.executeRequest(cmd);
183182
}

0 commit comments

Comments
 (0)