fix compile

This commit is contained in:
Edison Su 2013-01-25 10:24:25 -08:00
parent cb25eed37a
commit a18baf8c83
4 changed files with 11 additions and 11 deletions

View File

@ -54,8 +54,8 @@ import com.cloud.agent.api.Command;
import com.cloud.agent.api.storage.DeleteVolumeCommand;
import com.cloud.hypervisor.xen.resource.CitrixResourceBase.SRType;
import com.cloud.utils.exception.CloudRuntimeException;
import com.cloud.utils.storage.encoding.DataStore;
import com.cloud.utils.storage.encoding.DecodedDataObject;
import com.cloud.utils.storage.encoding.DecodedDataStore;
import com.cloud.utils.storage.encoding.Decoder;
import com.xensource.xenapi.Connection;
import com.xensource.xenapi.Host;
@ -144,7 +144,7 @@ public class XenServerStorageResource {
try {
obj = Decoder.decode(uriString);
DataStore store = obj.getStore();
DecodedDataStore store = obj.getStore();
if (obj.getObjType().equalsIgnoreCase("template") && store.getRole().equalsIgnoreCase("image")) {
return getTemplateSize(cmd, obj.getPath());
}
@ -223,7 +223,7 @@ public class XenServerStorageResource {
}
}
protected SR getNfsSR(Connection conn, DataStore store) {
protected SR getNfsSR(Connection conn, DecodedDataStore store) {
Map<String, String> deviceConfig = new HashMap<String, String>();
String uuid = store.getUuid();
@ -409,7 +409,7 @@ public class XenServerStorageResource {
try {
DecodedDataObject obj = Decoder.decode(storeUrl);
DataStore store = obj.getStore();
DecodedDataStore store = obj.getStore();
if (store.getScheme().equalsIgnoreCase("nfs")) {
SR sr = getNfsSR(conn, store);
} else if (store.getScheme().equalsIgnoreCase("iscsi")) {
@ -570,7 +570,7 @@ public class XenServerStorageResource {
Connection conn = hypervisorResource.getConnection();
try {
DecodedDataObject obj = Decoder.decode(dataStoreUri);
DataStore store = obj.getStore();
DecodedDataStore store = obj.getStore();
SR sr = hypervisorResource.getStorageRepository(conn, store.getUuid());
hypervisorResource.setupHeartbeatSr(conn, sr, false);
long capacity = sr.getPhysicalSize(conn);

View File

@ -23,13 +23,13 @@ public class DecodedDataObject {
private Long size;
private String name;
private String path;
private EncodedDataStore store;
private DecodedDataStore store;
public DecodedDataObject(String objType,
Long size,
String name,
String path,
EncodedDataStore store) {
DecodedDataStore store) {
this.objType = objType;
this.size = size;
this.path = path;
@ -52,7 +52,7 @@ public class DecodedDataObject {
return this.path;
}
public EncodedDataStore getStore() {
public DecodedDataStore getStore() {
return this.store;
}
}

View File

@ -18,7 +18,7 @@
*/
package com.cloud.utils.storage.encoding;
public class EncodedDataStore {
public class DecodedDataStore {
private final String role;
private final String uuid;
private final String providerName;
@ -27,7 +27,7 @@ public class EncodedDataStore {
private final String server;
private final String path;
public EncodedDataStore(String role,
public DecodedDataStore(String role,
String uuid,
String providerName,
String scheme,

View File

@ -43,7 +43,7 @@ public class Decoder {
public static DecodedDataObject decode(String url) throws URISyntaxException {
URI uri = new URI(url);
Map<String, String> params = getParameters(uri);
EncodedDataStore store = new EncodedDataStore(params.get(EncodingType.ROLE.toString()),
DecodedDataStore store = new DecodedDataStore(params.get(EncodingType.ROLE.toString()),
params.get(EncodingType.STOREUUID.toString()),
params.get(EncodingType.PROVIDERNAME.toString()),
uri.getScheme(),