You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ke...@apache.org on 2013/02/02 00:27:32 UTC
[2/50] [abbrv] git commit: refs/heads/master - fix compile
fix compile
Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/a18baf8c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/a18baf8c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/a18baf8c
Branch: refs/heads/master
Commit: a18baf8c83ccae0cf61e49915b25b2ca244f398f
Parents: cb25eed
Author: Edison Su <su...@gmail.com>
Authored: Fri Jan 25 10:24:25 2013 -0800
Committer: Edison Su <su...@gmail.com>
Committed: Fri Jan 25 10:24:25 2013 -0800
----------------------------------------------------------------------
.../xen/resource/XenServerStorageResource.java | 10 +-
.../utils/storage/encoding/DecodedDataObject.java | 6 +-
.../utils/storage/encoding/DecodedDataStore.java | 73 +++++++++++++++
.../com/cloud/utils/storage/encoding/Decoder.java | 2 +-
.../utils/storage/encoding/EncodedDataStore.java | 73 ---------------
5 files changed, 82 insertions(+), 82 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/a18baf8c/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServerStorageResource.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServerStorageResource.java b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServerStorageResource.java
index 06367af..70660d2 100644
--- a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServerStorageResource.java
+++ b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServerStorageResource.java
@@ -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);
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/a18baf8c/utils/src/com/cloud/utils/storage/encoding/DecodedDataObject.java
----------------------------------------------------------------------
diff --git a/utils/src/com/cloud/utils/storage/encoding/DecodedDataObject.java b/utils/src/com/cloud/utils/storage/encoding/DecodedDataObject.java
index a046459..70e6703 100644
--- a/utils/src/com/cloud/utils/storage/encoding/DecodedDataObject.java
+++ b/utils/src/com/cloud/utils/storage/encoding/DecodedDataObject.java
@@ -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;
}
}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/a18baf8c/utils/src/com/cloud/utils/storage/encoding/DecodedDataStore.java
----------------------------------------------------------------------
diff --git a/utils/src/com/cloud/utils/storage/encoding/DecodedDataStore.java b/utils/src/com/cloud/utils/storage/encoding/DecodedDataStore.java
new file mode 100644
index 0000000..3fb9626
--- /dev/null
+++ b/utils/src/com/cloud/utils/storage/encoding/DecodedDataStore.java
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.cloud.utils.storage.encoding;
+
+public class DecodedDataStore {
+ private final String role;
+ private final String uuid;
+ private final String providerName;
+ private final String scheme;
+ private final String url;
+ private final String server;
+ private final String path;
+
+ public DecodedDataStore(String role,
+ String uuid,
+ String providerName,
+ String scheme,
+ String url,
+ String server,
+ String path) {
+ this.role = role;
+ this.uuid = uuid;
+ this.providerName = providerName;
+ this.scheme = scheme;
+ this.url = url;
+ this.server = server;
+ this.path = path;
+ }
+
+ public String getRole() {
+ return this.role;
+ }
+
+ public String getUuid() {
+ return this.uuid;
+ }
+
+ public String getProviderName() {
+ return this.providerName;
+ }
+
+ public String getScheme() {
+ return this.scheme;
+ }
+
+ public String getUrl() {
+ return this.url;
+ }
+
+ public String getServer() {
+ return this.server;
+ }
+
+ public String getPath() {
+ return this.path;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/a18baf8c/utils/src/com/cloud/utils/storage/encoding/Decoder.java
----------------------------------------------------------------------
diff --git a/utils/src/com/cloud/utils/storage/encoding/Decoder.java b/utils/src/com/cloud/utils/storage/encoding/Decoder.java
index 1c89d4b..fe74a04 100644
--- a/utils/src/com/cloud/utils/storage/encoding/Decoder.java
+++ b/utils/src/com/cloud/utils/storage/encoding/Decoder.java
@@ -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(),
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/a18baf8c/utils/src/com/cloud/utils/storage/encoding/EncodedDataStore.java
----------------------------------------------------------------------
diff --git a/utils/src/com/cloud/utils/storage/encoding/EncodedDataStore.java b/utils/src/com/cloud/utils/storage/encoding/EncodedDataStore.java
deleted file mode 100644
index 30668d8..0000000
--- a/utils/src/com/cloud/utils/storage/encoding/EncodedDataStore.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package com.cloud.utils.storage.encoding;
-
-public class EncodedDataStore {
- private final String role;
- private final String uuid;
- private final String providerName;
- private final String scheme;
- private final String url;
- private final String server;
- private final String path;
-
- public EncodedDataStore(String role,
- String uuid,
- String providerName,
- String scheme,
- String url,
- String server,
- String path) {
- this.role = role;
- this.uuid = uuid;
- this.providerName = providerName;
- this.scheme = scheme;
- this.url = url;
- this.server = server;
- this.path = path;
- }
-
- public String getRole() {
- return this.role;
- }
-
- public String getUuid() {
- return this.uuid;
- }
-
- public String getProviderName() {
- return this.providerName;
- }
-
- public String getScheme() {
- return this.scheme;
- }
-
- public String getUrl() {
- return this.url;
- }
-
- public String getServer() {
- return this.server;
- }
-
- public String getPath() {
- return this.path;
- }
-}