cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mc...@apache.org
Subject git commit: updated refs/heads/master to c8cafb9
Date Fri, 26 Jul 2013 22:08:10 GMT
Updated Branches:
  refs/heads/master f5e5b39c9 -> c8cafb91a


CLOUDSTACK-3818: NFS Cache Improperly Named.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/c8cafb91
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/c8cafb91
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/c8cafb91

Branch: refs/heads/master
Commit: c8cafb91a7f4e6be94fdcf98e21f87548fe6ce0a
Parents: f5e5b39
Author: Min Chen <min.chen@citrix.com>
Authored: Fri Jul 26 14:51:42 2013 -0700
Committer: Min Chen <min.chen@citrix.com>
Committed: Fri Jul 26 15:07:45 2013 -0700

----------------------------------------------------------------------
 api/src/com/cloud/storage/StorageService.java   |   8 +-
 .../admin/storage/CreateCacheStoreCmd.java      | 135 -------------------
 .../storage/CreateSecondaryStagingStoreCmd.java | 135 +++++++++++++++++++
 .../admin/storage/DeleteCacheStoreCmd.java      |  79 -----------
 .../storage/DeleteSecondaryStagingStoreCmd.java |  79 +++++++++++
 .../admin/storage/ListCacheStoresCmd.java       | 104 --------------
 .../storage/ListSecondaryStagingStoresCmd.java  | 104 ++++++++++++++
 .../apache/cloudstack/query/QueryService.java   |   4 +-
 client/tomcatconf/commands.properties.in        |   6 +-
 .../allocator/StorageCacheRandomAllocator.java  |   2 +-
 .../vmware/manager/VmwareManagerImpl.java       |   4 +-
 .../com/cloud/api/query/QueryManagerImpl.java   |   6 +-
 .../com/cloud/server/ManagementServerImpl.java  |  12 +-
 .../com/cloud/storage/StorageManagerImpl.java   |   8 +-
 tools/apidoc/gen_toc.py                         |   6 +-
 tools/marvin/marvin/deployDataCenter.py         |   4 +-
 16 files changed, 348 insertions(+), 348 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c8cafb91/api/src/com/cloud/storage/StorageService.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/storage/StorageService.java b/api/src/com/cloud/storage/StorageService.java
index 7c5b0a7..1ae1d3a 100644
--- a/api/src/com/cloud/storage/StorageService.java
+++ b/api/src/com/cloud/storage/StorageService.java
@@ -20,9 +20,9 @@ import java.net.UnknownHostException;
 
 import org.apache.cloudstack.api.command.admin.storage.AddImageStoreCmd;
 import org.apache.cloudstack.api.command.admin.storage.CancelPrimaryStorageMaintenanceCmd;
-import org.apache.cloudstack.api.command.admin.storage.CreateCacheStoreCmd;
+import org.apache.cloudstack.api.command.admin.storage.CreateSecondaryStagingStoreCmd;
 import org.apache.cloudstack.api.command.admin.storage.CreateStoragePoolCmd;
-import org.apache.cloudstack.api.command.admin.storage.DeleteCacheStoreCmd;
+import org.apache.cloudstack.api.command.admin.storage.DeleteSecondaryStagingStoreCmd;
 import org.apache.cloudstack.api.command.admin.storage.DeleteImageStoreCmd;
 import org.apache.cloudstack.api.command.admin.storage.DeletePoolCmd;
 import org.apache.cloudstack.api.command.admin.storage.UpdateStoragePoolCmd;
@@ -50,7 +50,7 @@ public interface StorageService{
     StoragePool createPool(CreateStoragePoolCmd cmd) throws ResourceInUseException, IllegalArgumentException,
     UnknownHostException, ResourceUnavailableException;
 
-    ImageStore createCacheStore(CreateCacheStoreCmd cmd);
+    ImageStore createSecondaryStagingStore(CreateSecondaryStagingStoreCmd cmd);
 
     /**
      * Delete the storage pool
@@ -93,7 +93,7 @@ public interface StorageService{
 
     boolean deleteImageStore(DeleteImageStoreCmd cmd);
 
-    boolean deleteCacheStore(DeleteCacheStoreCmd cmd);
+    boolean deleteSecondaryStagingStore(DeleteSecondaryStagingStoreCmd cmd);
 
     ImageStore discoverImageStore(AddImageStoreCmd cmd) throws IllegalArgumentException,
DiscoveryException, InvalidParameterValueException;
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c8cafb91/api/src/org/apache/cloudstack/api/command/admin/storage/CreateCacheStoreCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/storage/CreateCacheStoreCmd.java
b/api/src/org/apache/cloudstack/api/command/admin/storage/CreateCacheStoreCmd.java
deleted file mode 100644
index f94207f..0000000
--- a/api/src/org/apache/cloudstack/api/command/admin/storage/CreateCacheStoreCmd.java
+++ /dev/null
@@ -1,135 +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 org.apache.cloudstack.api.command.admin.storage;
-
-import com.cloud.storage.ImageStore;
-import com.cloud.user.Account;
-import org.apache.cloudstack.api.APICommand;
-import org.apache.cloudstack.api.ApiConstants;
-import org.apache.cloudstack.api.ApiErrorCode;
-import org.apache.cloudstack.api.BaseCmd;
-import org.apache.cloudstack.api.Parameter;
-import org.apache.cloudstack.api.ServerApiException;
-import org.apache.cloudstack.api.response.ImageStoreResponse;
-import org.apache.cloudstack.api.response.ZoneResponse;
-import org.apache.log4j.Logger;
-
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-@APICommand(name = "createCacheStore", description="create cache store.", responseObject=ImageStoreResponse.class)
-public class CreateCacheStoreCmd extends BaseCmd {
-    public static final Logger s_logger = Logger.getLogger(AddImageStoreCmd.class.getName());
-    private static final String s_name = "createcachestoreresponse";
-
-    /////////////////////////////////////////////////////
-    //////////////// API parameters /////////////////////
-    /////////////////////////////////////////////////////
-
-    @Parameter(name=ApiConstants.URL, type=CommandType.STRING, required=true, description="the
URL for the cache store")
-    private String url;
-
-    @Parameter(name=ApiConstants.ZONE_ID, type=CommandType.UUID, entityType=ZoneResponse.class,
-            description="the Zone ID for the image store")
-    private Long zoneId;
-
-
-    @Parameter(name=ApiConstants.DETAILS, type=CommandType.MAP, description="the details
for the image store")
-    private Map<String, String> details;
-
-    @Parameter(name=ApiConstants.SCOPE, type=CommandType.STRING,
-            required=false, description="the scope of the image store: zone only for now")
-    private String scope;
-
-    @Parameter(name=ApiConstants.PROVIDER, type=CommandType.STRING,
-            required=false, description="the cache store provider name")
-    private String providerName;
-
-    /////////////////////////////////////////////////////
-    /////////////////// Accessors ///////////////////////
-    /////////////////////////////////////////////////////
-
-    public String getUrl() {
-        return url;
-    }
-
-    public Long getZoneId() {
-        return zoneId;
-    }
-
-     public Map<String, String> getDetails() {
-         Map<String, String> detailsMap = null;
-         if (details != null && !details.isEmpty()) {
-             detailsMap = new HashMap<String, String>();
-             Collection<?> props = details.values();
-             Iterator<?> iter = props.iterator();
-             while (iter.hasNext()) {
-                 HashMap<String, String> detail = (HashMap<String, String>) iter.next();
-                 String key = detail.get("key");
-                 String value = detail.get("value");
-                 detailsMap.put(key, value);
-             }
-         }
-         return detailsMap;
-    }
-
-    public String getScope() {
-        return this.scope;
-     }
-
-    public String getProviderName() {
-        return this.providerName;
-    }
-
-
-    /////////////////////////////////////////////////////
-    /////////////// API Implementation///////////////////
-    /////////////////////////////////////////////////////
-
-    @Override
-    public String getCommandName() {
-        return s_name;
-    }
-
-    @Override
-    public long getEntityOwnerId() {
-        return Account.ACCOUNT_ID_SYSTEM;
-    }
-
-    @Override
-    public void execute(){
-        try{
-            ImageStore result = _storageService.createCacheStore(this);
-            ImageStoreResponse storeResponse = null;
-            if (result != null ) {
-                    storeResponse = _responseGenerator.createImageStoreResponse(result);
-                    storeResponse.setResponseName(getCommandName());
-                    storeResponse.setObjectName("secondarystorage");
-                    this.setResponseObject(storeResponse);
-            } else {
-                throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to add
secondary storage");
-            }
-        } catch (Exception ex) {
-            s_logger.warn("Exception: ", ex);
-            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, ex.getMessage());
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c8cafb91/api/src/org/apache/cloudstack/api/command/admin/storage/CreateSecondaryStagingStoreCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/storage/CreateSecondaryStagingStoreCmd.java
b/api/src/org/apache/cloudstack/api/command/admin/storage/CreateSecondaryStagingStoreCmd.java
new file mode 100644
index 0000000..deaf6d9
--- /dev/null
+++ b/api/src/org/apache/cloudstack/api/command/admin/storage/CreateSecondaryStagingStoreCmd.java
@@ -0,0 +1,135 @@
+/*
+ * 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 org.apache.cloudstack.api.command.admin.storage;
+
+import com.cloud.storage.ImageStore;
+import com.cloud.user.Account;
+import org.apache.cloudstack.api.APICommand;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.ApiErrorCode;
+import org.apache.cloudstack.api.BaseCmd;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.cloudstack.api.ServerApiException;
+import org.apache.cloudstack.api.response.ImageStoreResponse;
+import org.apache.cloudstack.api.response.ZoneResponse;
+import org.apache.log4j.Logger;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+@APICommand(name = "createSecondaryStagingStore", description = "create secondary staging
store.", responseObject = ImageStoreResponse.class)
+public class CreateSecondaryStagingStoreCmd extends BaseCmd {
+    public static final Logger s_logger = Logger.getLogger(AddImageStoreCmd.class.getName());
+    private static final String s_name = "createsecondarystagingstoreresponse";
+
+    /////////////////////////////////////////////////////
+    //////////////// API parameters /////////////////////
+    /////////////////////////////////////////////////////
+
+    @Parameter(name = ApiConstants.URL, type = CommandType.STRING, required = true, description
= "the URL for the staging store")
+    private String url;
+
+    @Parameter(name=ApiConstants.ZONE_ID, type=CommandType.UUID, entityType=ZoneResponse.class,
+ description = "the Zone ID for the staging store")
+    private Long zoneId;
+
+
+    @Parameter(name = ApiConstants.DETAILS, type = CommandType.MAP, description = "the details
for the staging store")
+    private Map<String, String> details;
+
+    @Parameter(name=ApiConstants.SCOPE, type=CommandType.STRING,
+ required = false, description = "the scope of the staging store: zone only for now")
+    private String scope;
+
+    @Parameter(name=ApiConstants.PROVIDER, type=CommandType.STRING,
+ required = false, description = "the staging store provider name")
+    private String providerName;
+
+    /////////////////////////////////////////////////////
+    /////////////////// Accessors ///////////////////////
+    /////////////////////////////////////////////////////
+
+    public String getUrl() {
+        return url;
+    }
+
+    public Long getZoneId() {
+        return zoneId;
+    }
+
+    public Map<String, String> getDetails() {
+        Map<String, String> detailsMap = null;
+        if (details != null && !details.isEmpty()) {
+            detailsMap = new HashMap<String, String>();
+            Collection<?> props = details.values();
+            Iterator<?> iter = props.iterator();
+            while (iter.hasNext()) {
+                HashMap<String, String> detail = (HashMap<String, String>) iter.next();
+                String key = detail.get("key");
+                String value = detail.get("value");
+                detailsMap.put(key, value);
+            }
+        }
+        return detailsMap;
+    }
+
+    public String getScope() {
+        return this.scope;
+    }
+
+    public String getProviderName() {
+        return this.providerName;
+    }
+
+
+    /////////////////////////////////////////////////////
+    /////////////// API Implementation///////////////////
+    /////////////////////////////////////////////////////
+
+    @Override
+    public String getCommandName() {
+        return s_name;
+    }
+
+    @Override
+    public long getEntityOwnerId() {
+        return Account.ACCOUNT_ID_SYSTEM;
+    }
+
+    @Override
+    public void execute(){
+        try{
+            ImageStore result = _storageService.createSecondaryStagingStore(this);
+            ImageStoreResponse storeResponse = null;
+            if (result != null ) {
+                storeResponse = _responseGenerator.createImageStoreResponse(result);
+                storeResponse.setResponseName(getCommandName());
+                storeResponse.setObjectName("secondarystorage");
+                this.setResponseObject(storeResponse);
+            } else {
+                throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to add
secondary storage");
+            }
+        } catch (Exception ex) {
+            s_logger.warn("Exception: ", ex);
+            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, ex.getMessage());
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c8cafb91/api/src/org/apache/cloudstack/api/command/admin/storage/DeleteCacheStoreCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/storage/DeleteCacheStoreCmd.java
b/api/src/org/apache/cloudstack/api/command/admin/storage/DeleteCacheStoreCmd.java
deleted file mode 100644
index 01d3385..0000000
--- a/api/src/org/apache/cloudstack/api/command/admin/storage/DeleteCacheStoreCmd.java
+++ /dev/null
@@ -1,79 +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 org.apache.cloudstack.api.command.admin.storage;
-
-import org.apache.cloudstack.api.APICommand;
-import org.apache.cloudstack.api.ApiConstants;
-import org.apache.cloudstack.api.ApiErrorCode;
-import org.apache.cloudstack.api.BaseCmd;
-import org.apache.cloudstack.api.Parameter;
-import org.apache.cloudstack.api.ServerApiException;
-import org.apache.cloudstack.api.response.ImageStoreResponse;
-import org.apache.cloudstack.api.response.SuccessResponse;
-import org.apache.log4j.Logger;
-
-import com.cloud.user.Account;
-
-@APICommand(name = "deleteCacheStore", description = "Deletes a cache store .", responseObject
= SuccessResponse.class, since = "4.2.0")
-public class DeleteCacheStoreCmd extends BaseCmd {
-    public static final Logger s_logger = Logger.getLogger(DeleteCacheStoreCmd.class.getName());
-
-    private static final String s_name = "deletecachestoreresponse";
-
-    // ///////////////////////////////////////////////////
-    // ////////////// API parameters /////////////////////
-    // ///////////////////////////////////////////////////
-
-    @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = ImageStoreResponse.class,
- required = true, description = "the cache store ID")
-    private Long id;
-
-
-    // ///////////////////////////////////////////////////
-    // ///////////////// Accessors ///////////////////////
-    // ///////////////////////////////////////////////////
-
-    public Long getId() {
-        return id;
-    }
-
-
-    // ///////////////////////////////////////////////////
-    // ///////////// API Implementation///////////////////
-    // ///////////////////////////////////////////////////
-
-    @Override
-    public String getCommandName() {
-        return s_name;
-    }
-
-    @Override
-    public long getEntityOwnerId() {
-        return Account.ACCOUNT_ID_SYSTEM;
-    }
-
-    @Override
-    public void execute() {
-        boolean result = _storageService.deleteCacheStore(this);
-        if (result) {
-            SuccessResponse response = new SuccessResponse(getCommandName());
-            this.setResponseObject(response);
-        } else {
-            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete image
store");
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c8cafb91/api/src/org/apache/cloudstack/api/command/admin/storage/DeleteSecondaryStagingStoreCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/storage/DeleteSecondaryStagingStoreCmd.java
b/api/src/org/apache/cloudstack/api/command/admin/storage/DeleteSecondaryStagingStoreCmd.java
new file mode 100644
index 0000000..ed3ebd8
--- /dev/null
+++ b/api/src/org/apache/cloudstack/api/command/admin/storage/DeleteSecondaryStagingStoreCmd.java
@@ -0,0 +1,79 @@
+// 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 org.apache.cloudstack.api.command.admin.storage;
+
+import org.apache.cloudstack.api.APICommand;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.ApiErrorCode;
+import org.apache.cloudstack.api.BaseCmd;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.cloudstack.api.ServerApiException;
+import org.apache.cloudstack.api.response.ImageStoreResponse;
+import org.apache.cloudstack.api.response.SuccessResponse;
+import org.apache.log4j.Logger;
+
+import com.cloud.user.Account;
+
+@APICommand(name = "deleteSecondaryStagingStore", description = "Deletes a secondary staging
store .", responseObject = SuccessResponse.class, since = "4.2.0")
+public class DeleteSecondaryStagingStoreCmd extends BaseCmd {
+    public static final Logger s_logger = Logger.getLogger(DeleteSecondaryStagingStoreCmd.class.getName());
+
+    private static final String s_name = "deletesecondarystagingstoreresponse";
+
+    // ///////////////////////////////////////////////////
+    // ////////////// API parameters /////////////////////
+    // ///////////////////////////////////////////////////
+
+    @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = ImageStoreResponse.class,
+            required = true, description = "the staging store ID")
+    private Long id;
+
+
+    // ///////////////////////////////////////////////////
+    // ///////////////// Accessors ///////////////////////
+    // ///////////////////////////////////////////////////
+
+    public Long getId() {
+        return id;
+    }
+
+
+    // ///////////////////////////////////////////////////
+    // ///////////// API Implementation///////////////////
+    // ///////////////////////////////////////////////////
+
+    @Override
+    public String getCommandName() {
+        return s_name;
+    }
+
+    @Override
+    public long getEntityOwnerId() {
+        return Account.ACCOUNT_ID_SYSTEM;
+    }
+
+    @Override
+    public void execute() {
+        boolean result = _storageService.deleteSecondaryStagingStore(this);
+        if (result) {
+            SuccessResponse response = new SuccessResponse(getCommandName());
+            this.setResponseObject(response);
+        } else {
+            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete secondary
staging store");
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c8cafb91/api/src/org/apache/cloudstack/api/command/admin/storage/ListCacheStoresCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/storage/ListCacheStoresCmd.java
b/api/src/org/apache/cloudstack/api/command/admin/storage/ListCacheStoresCmd.java
deleted file mode 100644
index 3909e8e..0000000
--- a/api/src/org/apache/cloudstack/api/command/admin/storage/ListCacheStoresCmd.java
+++ /dev/null
@@ -1,104 +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 org.apache.cloudstack.api.command.admin.storage;
-
-import org.apache.cloudstack.api.APICommand;
-import org.apache.cloudstack.api.ApiConstants;
-import org.apache.cloudstack.api.BaseListCmd;
-import org.apache.cloudstack.api.Parameter;
-import org.apache.cloudstack.api.response.ImageStoreResponse;
-import org.apache.cloudstack.api.response.ListResponse;
-import org.apache.cloudstack.api.response.ZoneResponse;
-import org.apache.log4j.Logger;
-
-@APICommand(name = "listCacheStores", description="Lists cache stores.", responseObject=ImageStoreResponse.class,
since = "4.2.0")
-public class ListCacheStoresCmd extends BaseListCmd {
-    public static final Logger s_logger = Logger.getLogger(ListCacheStoresCmd.class.getName());
-
-    private static final String s_name = "listcachestoreresponse";
-
-    /////////////////////////////////////////////////////
-    //////////////// API parameters /////////////////////
-    /////////////////////////////////////////////////////
-
-    @Parameter(name=ApiConstants.NAME, type=CommandType.STRING, description="the name of
the cache store")
-    private String storeName;
-
-    @Parameter(name=ApiConstants.PROTOCOL, type=CommandType.STRING, description="the cache
store protocol")
-    private String protocol;
-
-    @Parameter(name=ApiConstants.PROVIDER, type=CommandType.STRING, description="the cache
store provider")
-    private String provider;
-
-    @Parameter(name=ApiConstants.ZONE_ID, type=CommandType.UUID, entityType = ZoneResponse.class,
-            description="the Zone ID for the cache store")
-    private Long zoneId;
-
-    @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType = ImageStoreResponse.class,
-            description="the ID of the cache store")
-    private Long id;
-
-    /////////////////////////////////////////////////////
-    /////////////////// Accessors ///////////////////////
-    /////////////////////////////////////////////////////
-
-
-
-    public Long getZoneId() {
-        return zoneId;
-    }
-
-    public String getStoreName() {
-        return storeName;
-    }
-
-    public String getProtocol() {
-        return protocol;
-    }
-
-    public Long getId() {
-        return id;
-    }
-
-    public String getProvider() {
-        return provider;
-    }
-
-    public void setProvider(String provider) {
-        this.provider = provider;
-    }
-
-    /////////////////////////////////////////////////////
-    /////////////// API Implementation///////////////////
-    /////////////////////////////////////////////////////
-
-
-
-
-    @Override
-    public String getCommandName() {
-        return s_name;
-    }
-
-
-    @Override
-    public void execute(){
-        ListResponse<ImageStoreResponse> response = _queryService.searchForCacheStores(this);
-        response.setResponseName(getCommandName());
-        this.setResponseObject(response);
-    }
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c8cafb91/api/src/org/apache/cloudstack/api/command/admin/storage/ListSecondaryStagingStoresCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/storage/ListSecondaryStagingStoresCmd.java
b/api/src/org/apache/cloudstack/api/command/admin/storage/ListSecondaryStagingStoresCmd.java
new file mode 100644
index 0000000..2f81fb4
--- /dev/null
+++ b/api/src/org/apache/cloudstack/api/command/admin/storage/ListSecondaryStagingStoresCmd.java
@@ -0,0 +1,104 @@
+// 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 org.apache.cloudstack.api.command.admin.storage;
+
+import org.apache.cloudstack.api.APICommand;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.BaseListCmd;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.cloudstack.api.response.ImageStoreResponse;
+import org.apache.cloudstack.api.response.ListResponse;
+import org.apache.cloudstack.api.response.ZoneResponse;
+import org.apache.log4j.Logger;
+
+@APICommand(name = "listSecondaryStagingStores", description = "Lists secondary staging stores.",
responseObject = ImageStoreResponse.class, since = "4.2.0")
+public class ListSecondaryStagingStoresCmd extends BaseListCmd {
+    public static final Logger s_logger = Logger.getLogger(ListSecondaryStagingStoresCmd.class.getName());
+
+    private static final String s_name = "listsecondarystagingstoreresponse";
+
+    /////////////////////////////////////////////////////
+    //////////////// API parameters /////////////////////
+    /////////////////////////////////////////////////////
+
+    @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "the name
of the staging store")
+    private String storeName;
+
+    @Parameter(name = ApiConstants.PROTOCOL, type = CommandType.STRING, description = "the
staging store protocol")
+    private String protocol;
+
+    @Parameter(name = ApiConstants.PROVIDER, type = CommandType.STRING, description = "the
staging store provider")
+    private String provider;
+
+    @Parameter(name=ApiConstants.ZONE_ID, type=CommandType.UUID, entityType = ZoneResponse.class,
+ description = "the Zone ID for the staging store")
+    private Long zoneId;
+
+    @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType = ImageStoreResponse.class,
+ description = "the ID of the staging store")
+    private Long id;
+
+    /////////////////////////////////////////////////////
+    /////////////////// Accessors ///////////////////////
+    /////////////////////////////////////////////////////
+
+
+
+    public Long getZoneId() {
+        return zoneId;
+    }
+
+    public String getStoreName() {
+        return storeName;
+    }
+
+    public String getProtocol() {
+        return protocol;
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    public String getProvider() {
+        return provider;
+    }
+
+    public void setProvider(String provider) {
+        this.provider = provider;
+    }
+
+    /////////////////////////////////////////////////////
+    /////////////// API Implementation///////////////////
+    /////////////////////////////////////////////////////
+
+
+
+
+    @Override
+    public String getCommandName() {
+        return s_name;
+    }
+
+
+    @Override
+    public void execute(){
+        ListResponse<ImageStoreResponse> response = _queryService.searchForSecondaryStagingStores(this);
+        response.setResponseName(getCommandName());
+        this.setResponseObject(response);
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c8cafb91/api/src/org/apache/cloudstack/query/QueryService.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/query/QueryService.java b/api/src/org/apache/cloudstack/query/QueryService.java
index da843a9..a203564 100644
--- a/api/src/org/apache/cloudstack/query/QueryService.java
+++ b/api/src/org/apache/cloudstack/query/QueryService.java
@@ -20,7 +20,7 @@ import org.apache.cloudstack.affinity.AffinityGroupResponse;
 import org.apache.cloudstack.api.command.admin.host.ListHostsCmd;
 import org.apache.cloudstack.api.command.admin.internallb.ListInternalLBVMsCmd;
 import org.apache.cloudstack.api.command.admin.router.ListRoutersCmd;
-import org.apache.cloudstack.api.command.admin.storage.ListCacheStoresCmd;
+import org.apache.cloudstack.api.command.admin.storage.ListSecondaryStagingStoresCmd;
 import org.apache.cloudstack.api.command.admin.storage.ListImageStoresCmd;
 import org.apache.cloudstack.api.command.admin.storage.ListStoragePoolsCmd;
 import org.apache.cloudstack.api.command.admin.user.ListUsersCmd;
@@ -81,7 +81,7 @@ public interface QueryService {
 
     public ListResponse<ImageStoreResponse> searchForImageStores(ListImageStoresCmd
cmd);
 
-    public ListResponse<ImageStoreResponse> searchForCacheStores(ListCacheStoresCmd
cmd);
+    public ListResponse<ImageStoreResponse> searchForSecondaryStagingStores(ListSecondaryStagingStoresCmd
cmd);
 
     public ListResponse<AccountResponse> searchForAccounts(ListAccountsCmd cmd);
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c8cafb91/client/tomcatconf/commands.properties.in
----------------------------------------------------------------------
diff --git a/client/tomcatconf/commands.properties.in b/client/tomcatconf/commands.properties.in
index 729dd23..fe3e4d9 100644
--- a/client/tomcatconf/commands.properties.in
+++ b/client/tomcatconf/commands.properties.in
@@ -250,9 +250,9 @@ listS3s=1
 addImageStore=1
 listImageStores=1
 deleteImageStore=1
-createCacheStore=1
-listCacheStores=1
-#deleteCacheStore=1
+createSecondaryStagingStore=1
+listSecondaryStagingStores=1
+deleteSecondaryStagingStore=1
 
 #### host commands
 addHost=3

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c8cafb91/engine/storage/cache/src/org/apache/cloudstack/storage/cache/allocator/StorageCacheRandomAllocator.java
----------------------------------------------------------------------
diff --git a/engine/storage/cache/src/org/apache/cloudstack/storage/cache/allocator/StorageCacheRandomAllocator.java
b/engine/storage/cache/src/org/apache/cloudstack/storage/cache/allocator/StorageCacheRandomAllocator.java
index f244a03..3b434d1 100644
--- a/engine/storage/cache/src/org/apache/cloudstack/storage/cache/allocator/StorageCacheRandomAllocator.java
+++ b/engine/storage/cache/src/org/apache/cloudstack/storage/cache/allocator/StorageCacheRandomAllocator.java
@@ -46,7 +46,7 @@ public class StorageCacheRandomAllocator implements StorageCacheAllocator
{
 
         List<DataStore> cacheStores = dataStoreMgr.getImageCacheStores(scope);
         if (cacheStores.size() <= 0) {
-            s_logger.debug("Can't find cache storage in zone: " + scope.getScopeId());
+            s_logger.debug("Can't find staging storage in zone: " + scope.getScopeId());
             return null;
         }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c8cafb91/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java
b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java
index 07e0fc0..0df2cd3 100755
--- a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java
+++ b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java
@@ -472,12 +472,12 @@ public class VmwareManagerImpl extends ManagerBase implements VmwareManager,
Vmw
 
         if (secUrl == null) {
             // we are using non-NFS image store, then use cache storage instead
-            s_logger.info("Secondary storage is not NFS, we need to use cache storage");
+            s_logger.info("Secondary storage is not NFS, we need to use staging storage");
             DataStore cacheStore = _dataStoreMgr.getImageCacheStore(dcId);
             if (cacheStore != null) {
                 secUrl = cacheStore.getUri();
             } else {
-                s_logger.warn("No cache storage is found when non-NFS secondary storage is
used");
+                s_logger.warn("No staging storage is found when non-NFS secondary storage
is used");
             }
         }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c8cafb91/server/src/com/cloud/api/query/QueryManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/QueryManagerImpl.java b/server/src/com/cloud/api/query/QueryManagerImpl.java
index 33327db..45f1c69 100644
--- a/server/src/com/cloud/api/query/QueryManagerImpl.java
+++ b/server/src/com/cloud/api/query/QueryManagerImpl.java
@@ -34,7 +34,7 @@ import org.apache.cloudstack.api.BaseListProjectAndAccountResourcesCmd;
 import org.apache.cloudstack.api.command.admin.host.ListHostsCmd;
 import org.apache.cloudstack.api.command.admin.internallb.ListInternalLBVMsCmd;
 import org.apache.cloudstack.api.command.admin.router.ListRoutersCmd;
-import org.apache.cloudstack.api.command.admin.storage.ListCacheStoresCmd;
+import org.apache.cloudstack.api.command.admin.storage.ListSecondaryStagingStoresCmd;
 import org.apache.cloudstack.api.command.admin.storage.ListImageStoresCmd;
 import org.apache.cloudstack.api.command.admin.storage.ListStoragePoolsCmd;
 import org.apache.cloudstack.api.command.admin.user.ListUsersCmd;
@@ -2107,7 +2107,7 @@ public class QueryManagerImpl extends ManagerBase implements QueryService
{
     }
 
     @Override
-    public ListResponse<ImageStoreResponse> searchForCacheStores(ListCacheStoresCmd
cmd) {
+    public ListResponse<ImageStoreResponse> searchForSecondaryStagingStores(ListSecondaryStagingStoresCmd
cmd) {
         Pair<List<ImageStoreJoinVO>, Integer> result = searchForCacheStoresInternal(cmd);
         ListResponse<ImageStoreResponse> response = new ListResponse<ImageStoreResponse>();
 
@@ -2117,7 +2117,7 @@ public class QueryManagerImpl extends ManagerBase implements QueryService
{
         return response;
     }
 
-    private Pair<List<ImageStoreJoinVO>, Integer> searchForCacheStoresInternal(ListCacheStoresCmd
cmd) {
+    private Pair<List<ImageStoreJoinVO>, Integer> searchForCacheStoresInternal(ListSecondaryStagingStoresCmd
cmd) {
 
         Long zoneId = _accountMgr.checkAccessAndSpecifyAuthority(CallContext.current().getCallingAccount(),
cmd.getZoneId());
         Object id = cmd.getId();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c8cafb91/server/src/com/cloud/server/ManagementServerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/server/ManagementServerImpl.java b/server/src/com/cloud/server/ManagementServerImpl.java
index 0bdb114..ecb8f85 100755
--- a/server/src/com/cloud/server/ManagementServerImpl.java
+++ b/server/src/com/cloud/server/ManagementServerImpl.java
@@ -146,13 +146,13 @@ import org.apache.cloudstack.api.command.admin.router.UpgradeRouterCmd;
 import org.apache.cloudstack.api.command.admin.storage.AddImageStoreCmd;
 import org.apache.cloudstack.api.command.admin.storage.AddS3Cmd;
 import org.apache.cloudstack.api.command.admin.storage.CancelPrimaryStorageMaintenanceCmd;
-import org.apache.cloudstack.api.command.admin.storage.CreateCacheStoreCmd;
+import org.apache.cloudstack.api.command.admin.storage.CreateSecondaryStagingStoreCmd;
 import org.apache.cloudstack.api.command.admin.storage.CreateStoragePoolCmd;
-import org.apache.cloudstack.api.command.admin.storage.DeleteCacheStoreCmd;
+import org.apache.cloudstack.api.command.admin.storage.DeleteSecondaryStagingStoreCmd;
 import org.apache.cloudstack.api.command.admin.storage.DeleteImageStoreCmd;
 import org.apache.cloudstack.api.command.admin.storage.DeletePoolCmd;
 import org.apache.cloudstack.api.command.admin.storage.FindStoragePoolsForMigrationCmd;
-import org.apache.cloudstack.api.command.admin.storage.ListCacheStoresCmd;
+import org.apache.cloudstack.api.command.admin.storage.ListSecondaryStagingStoresCmd;
 import org.apache.cloudstack.api.command.admin.storage.ListImageStoresCmd;
 import org.apache.cloudstack.api.command.admin.storage.ListS3sCmd;
 import org.apache.cloudstack.api.command.admin.storage.ListStoragePoolsCmd;
@@ -2798,9 +2798,9 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe
         cmdList.add(AddImageStoreCmd.class);
         cmdList.add(ListImageStoresCmd.class);
         cmdList.add(DeleteImageStoreCmd.class);
-        cmdList.add(CreateCacheStoreCmd.class);
-        cmdList.add(ListCacheStoresCmd.class);
-        cmdList.add(DeleteCacheStoreCmd.class);
+        cmdList.add(CreateSecondaryStagingStoreCmd.class);
+        cmdList.add(ListSecondaryStagingStoresCmd.class);
+        cmdList.add(DeleteSecondaryStagingStoreCmd.class);
         cmdList.add(CreateApplicationLoadBalancerCmd.class);
         cmdList.add(ListApplicationLoadBalancersCmd.class);
         cmdList.add(DeleteApplicationLoadBalancerCmd.class);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c8cafb91/server/src/com/cloud/storage/StorageManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/storage/StorageManagerImpl.java b/server/src/com/cloud/storage/StorageManagerImpl.java
index 25aee8c..20d5a62 100755
--- a/server/src/com/cloud/storage/StorageManagerImpl.java
+++ b/server/src/com/cloud/storage/StorageManagerImpl.java
@@ -46,9 +46,9 @@ import org.springframework.stereotype.Component;
 
 import org.apache.cloudstack.api.command.admin.storage.AddImageStoreCmd;
 import org.apache.cloudstack.api.command.admin.storage.CancelPrimaryStorageMaintenanceCmd;
-import org.apache.cloudstack.api.command.admin.storage.CreateCacheStoreCmd;
+import org.apache.cloudstack.api.command.admin.storage.CreateSecondaryStagingStoreCmd;
 import org.apache.cloudstack.api.command.admin.storage.CreateStoragePoolCmd;
-import org.apache.cloudstack.api.command.admin.storage.DeleteCacheStoreCmd;
+import org.apache.cloudstack.api.command.admin.storage.DeleteSecondaryStagingStoreCmd;
 import org.apache.cloudstack.api.command.admin.storage.DeleteImageStoreCmd;
 import org.apache.cloudstack.api.command.admin.storage.DeletePoolCmd;
 import org.apache.cloudstack.api.command.admin.storage.UpdateStoragePoolCmd;
@@ -1797,7 +1797,7 @@ public class StorageManagerImpl extends ManagerBase implements StorageManager,
C
     }
 
     @Override
-    public ImageStore createCacheStore(CreateCacheStoreCmd cmd) {
+    public ImageStore createSecondaryStagingStore(CreateSecondaryStagingStoreCmd cmd) {
         String providerName = cmd.getProviderName();
         DataStoreProvider storeProvider = _dataStoreProviderMgr.getDataStoreProvider(providerName);
 
@@ -1865,7 +1865,7 @@ public class StorageManagerImpl extends ManagerBase implements StorageManager,
C
     }
 
     @Override
-    public boolean deleteCacheStore(DeleteCacheStoreCmd cmd) {
+    public boolean deleteSecondaryStagingStore(DeleteSecondaryStagingStoreCmd cmd) {
         long storeId = cmd.getId();
         User caller = _accountMgr.getActiveUser(CallContext.current().getCallingUserId());
         // Verify that cache store exists

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c8cafb91/tools/apidoc/gen_toc.py
----------------------------------------------------------------------
diff --git a/tools/apidoc/gen_toc.py b/tools/apidoc/gen_toc.py
index 93328c3..506169c 100644
--- a/tools/apidoc/gen_toc.py
+++ b/tools/apidoc/gen_toc.py
@@ -145,9 +145,9 @@ known_categories = {
     'addImageStore': 'Image Store',
     'listImageStore': 'Image Store',
     'deleteImageStore': 'Image Store',
-    'createCacheStore': 'Image Store',
-    'deleteCacheStore': 'Image Store',
-    'listCacheStores': 'Image Store',
+    'createSecondaryStagingStore': 'Image Store',
+    'deleteSecondaryStagingStore': 'Image Store',
+    'listSecondaryStagingStores': 'Image Store',
     'InternalLoadBalancer': 'Internal LB',
 	'DeploymentPlanners': 'Configuration',
     'PortableIp': 'Portable IP',

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c8cafb91/tools/marvin/marvin/deployDataCenter.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/deployDataCenter.py b/tools/marvin/marvin/deployDataCenter.py
index 279d4ee..ac07fa6 100644
--- a/tools/marvin/marvin/deployDataCenter.py
+++ b/tools/marvin/marvin/deployDataCenter.py
@@ -174,7 +174,7 @@ specify a valid config file" % cfgFile)
         if cacheStorages is None:
             return
         for cache in cacheStorages:
-            cachecmd = createCacheStore.createCacheStoreCmd()
+            cachecmd = createSecondaryStagingStore.createSecondaryStagingStoreCmd()
             cachecmd.url = cache.url
             cachecmd.provider = cache.provider
             cachecmd.zoneid = zoneId
@@ -186,7 +186,7 @@ specify a valid config file" % cfgFile)
                                             'key': key,
                                             'value': value
                                             })
-            self.apiClient.createCacheStore(cachecmd)
+            self.apiClient.createSecondaryStagingStore(cachecmd)
 
     def createnetworks(self, networks, zoneId):
         if networks is None:


Mime
View raw message