mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
CLOUDSTACK-3818: NFS Cache Improperly Named.
This commit is contained in:
parent
f5e5b39c9b
commit
c8cafb91a7
@ -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.AddImageStoreCmd;
|
||||||
import org.apache.cloudstack.api.command.admin.storage.CancelPrimaryStorageMaintenanceCmd;
|
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.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.DeleteImageStoreCmd;
|
||||||
import org.apache.cloudstack.api.command.admin.storage.DeletePoolCmd;
|
import org.apache.cloudstack.api.command.admin.storage.DeletePoolCmd;
|
||||||
import org.apache.cloudstack.api.command.admin.storage.UpdateStoragePoolCmd;
|
import org.apache.cloudstack.api.command.admin.storage.UpdateStoragePoolCmd;
|
||||||
@ -50,7 +50,7 @@ public interface StorageService{
|
|||||||
StoragePool createPool(CreateStoragePoolCmd cmd) throws ResourceInUseException, IllegalArgumentException,
|
StoragePool createPool(CreateStoragePoolCmd cmd) throws ResourceInUseException, IllegalArgumentException,
|
||||||
UnknownHostException, ResourceUnavailableException;
|
UnknownHostException, ResourceUnavailableException;
|
||||||
|
|
||||||
ImageStore createCacheStore(CreateCacheStoreCmd cmd);
|
ImageStore createSecondaryStagingStore(CreateSecondaryStagingStoreCmd cmd);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete the storage pool
|
* Delete the storage pool
|
||||||
@ -93,7 +93,7 @@ public interface StorageService{
|
|||||||
|
|
||||||
boolean deleteImageStore(DeleteImageStoreCmd cmd);
|
boolean deleteImageStore(DeleteImageStoreCmd cmd);
|
||||||
|
|
||||||
boolean deleteCacheStore(DeleteCacheStoreCmd cmd);
|
boolean deleteSecondaryStagingStore(DeleteSecondaryStagingStoreCmd cmd);
|
||||||
|
|
||||||
ImageStore discoverImageStore(AddImageStoreCmd cmd) throws IllegalArgumentException, DiscoveryException, InvalidParameterValueException;
|
ImageStore discoverImageStore(AddImageStoreCmd cmd) throws IllegalArgumentException, DiscoveryException, InvalidParameterValueException;
|
||||||
|
|
||||||
|
|||||||
@ -35,32 +35,32 @@ import java.util.HashMap;
|
|||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@APICommand(name = "createCacheStore", description="create cache store.", responseObject=ImageStoreResponse.class)
|
@APICommand(name = "createSecondaryStagingStore", description = "create secondary staging store.", responseObject = ImageStoreResponse.class)
|
||||||
public class CreateCacheStoreCmd extends BaseCmd {
|
public class CreateSecondaryStagingStoreCmd extends BaseCmd {
|
||||||
public static final Logger s_logger = Logger.getLogger(AddImageStoreCmd.class.getName());
|
public static final Logger s_logger = Logger.getLogger(AddImageStoreCmd.class.getName());
|
||||||
private static final String s_name = "createcachestoreresponse";
|
private static final String s_name = "createsecondarystagingstoreresponse";
|
||||||
|
|
||||||
/////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////
|
||||||
//////////////// API parameters /////////////////////
|
//////////////// API parameters /////////////////////
|
||||||
/////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////
|
||||||
|
|
||||||
@Parameter(name=ApiConstants.URL, type=CommandType.STRING, required=true, description="the URL for the cache store")
|
@Parameter(name = ApiConstants.URL, type = CommandType.STRING, required = true, description = "the URL for the staging store")
|
||||||
private String url;
|
private String url;
|
||||||
|
|
||||||
@Parameter(name=ApiConstants.ZONE_ID, type=CommandType.UUID, entityType=ZoneResponse.class,
|
@Parameter(name=ApiConstants.ZONE_ID, type=CommandType.UUID, entityType=ZoneResponse.class,
|
||||||
description="the Zone ID for the image store")
|
description = "the Zone ID for the staging store")
|
||||||
private Long zoneId;
|
private Long zoneId;
|
||||||
|
|
||||||
|
|
||||||
@Parameter(name=ApiConstants.DETAILS, type=CommandType.MAP, description="the details for the image store")
|
@Parameter(name = ApiConstants.DETAILS, type = CommandType.MAP, description = "the details for the staging store")
|
||||||
private Map<String, String> details;
|
private Map<String, String> details;
|
||||||
|
|
||||||
@Parameter(name=ApiConstants.SCOPE, type=CommandType.STRING,
|
@Parameter(name=ApiConstants.SCOPE, type=CommandType.STRING,
|
||||||
required=false, description="the scope of the image store: zone only for now")
|
required = false, description = "the scope of the staging store: zone only for now")
|
||||||
private String scope;
|
private String scope;
|
||||||
|
|
||||||
@Parameter(name=ApiConstants.PROVIDER, type=CommandType.STRING,
|
@Parameter(name=ApiConstants.PROVIDER, type=CommandType.STRING,
|
||||||
required=false, description="the cache store provider name")
|
required = false, description = "the staging store provider name")
|
||||||
private String providerName;
|
private String providerName;
|
||||||
|
|
||||||
/////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////
|
||||||
@ -75,25 +75,25 @@ public class CreateCacheStoreCmd extends BaseCmd {
|
|||||||
return zoneId;
|
return zoneId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Map<String, String> getDetails() {
|
public Map<String, String> getDetails() {
|
||||||
Map<String, String> detailsMap = null;
|
Map<String, String> detailsMap = null;
|
||||||
if (details != null && !details.isEmpty()) {
|
if (details != null && !details.isEmpty()) {
|
||||||
detailsMap = new HashMap<String, String>();
|
detailsMap = new HashMap<String, String>();
|
||||||
Collection<?> props = details.values();
|
Collection<?> props = details.values();
|
||||||
Iterator<?> iter = props.iterator();
|
Iterator<?> iter = props.iterator();
|
||||||
while (iter.hasNext()) {
|
while (iter.hasNext()) {
|
||||||
HashMap<String, String> detail = (HashMap<String, String>) iter.next();
|
HashMap<String, String> detail = (HashMap<String, String>) iter.next();
|
||||||
String key = detail.get("key");
|
String key = detail.get("key");
|
||||||
String value = detail.get("value");
|
String value = detail.get("value");
|
||||||
detailsMap.put(key, value);
|
detailsMap.put(key, value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return detailsMap;
|
return detailsMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getScope() {
|
public String getScope() {
|
||||||
return this.scope;
|
return this.scope;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getProviderName() {
|
public String getProviderName() {
|
||||||
return this.providerName;
|
return this.providerName;
|
||||||
@ -117,13 +117,13 @@ public class CreateCacheStoreCmd extends BaseCmd {
|
|||||||
@Override
|
@Override
|
||||||
public void execute(){
|
public void execute(){
|
||||||
try{
|
try{
|
||||||
ImageStore result = _storageService.createCacheStore(this);
|
ImageStore result = _storageService.createSecondaryStagingStore(this);
|
||||||
ImageStoreResponse storeResponse = null;
|
ImageStoreResponse storeResponse = null;
|
||||||
if (result != null ) {
|
if (result != null ) {
|
||||||
storeResponse = _responseGenerator.createImageStoreResponse(result);
|
storeResponse = _responseGenerator.createImageStoreResponse(result);
|
||||||
storeResponse.setResponseName(getCommandName());
|
storeResponse.setResponseName(getCommandName());
|
||||||
storeResponse.setObjectName("secondarystorage");
|
storeResponse.setObjectName("secondarystorage");
|
||||||
this.setResponseObject(storeResponse);
|
this.setResponseObject(storeResponse);
|
||||||
} else {
|
} else {
|
||||||
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to add secondary storage");
|
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to add secondary storage");
|
||||||
}
|
}
|
||||||
@ -28,18 +28,18 @@ import org.apache.log4j.Logger;
|
|||||||
|
|
||||||
import com.cloud.user.Account;
|
import com.cloud.user.Account;
|
||||||
|
|
||||||
@APICommand(name = "deleteCacheStore", description = "Deletes a cache store .", responseObject = SuccessResponse.class, since = "4.2.0")
|
@APICommand(name = "deleteSecondaryStagingStore", description = "Deletes a secondary staging store .", responseObject = SuccessResponse.class, since = "4.2.0")
|
||||||
public class DeleteCacheStoreCmd extends BaseCmd {
|
public class DeleteSecondaryStagingStoreCmd extends BaseCmd {
|
||||||
public static final Logger s_logger = Logger.getLogger(DeleteCacheStoreCmd.class.getName());
|
public static final Logger s_logger = Logger.getLogger(DeleteSecondaryStagingStoreCmd.class.getName());
|
||||||
|
|
||||||
private static final String s_name = "deletecachestoreresponse";
|
private static final String s_name = "deletesecondarystagingstoreresponse";
|
||||||
|
|
||||||
// ///////////////////////////////////////////////////
|
// ///////////////////////////////////////////////////
|
||||||
// ////////////// API parameters /////////////////////
|
// ////////////// API parameters /////////////////////
|
||||||
// ///////////////////////////////////////////////////
|
// ///////////////////////////////////////////////////
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = ImageStoreResponse.class,
|
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = ImageStoreResponse.class,
|
||||||
required = true, description = "the cache store ID")
|
required = true, description = "the staging store ID")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
|
|
||||||
@ -68,12 +68,12 @@ public class DeleteCacheStoreCmd extends BaseCmd {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute() {
|
public void execute() {
|
||||||
boolean result = _storageService.deleteCacheStore(this);
|
boolean result = _storageService.deleteSecondaryStagingStore(this);
|
||||||
if (result) {
|
if (result) {
|
||||||
SuccessResponse response = new SuccessResponse(getCommandName());
|
SuccessResponse response = new SuccessResponse(getCommandName());
|
||||||
this.setResponseObject(response);
|
this.setResponseObject(response);
|
||||||
} else {
|
} else {
|
||||||
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete image store");
|
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete secondary staging store");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -25,31 +25,31 @@ import org.apache.cloudstack.api.response.ListResponse;
|
|||||||
import org.apache.cloudstack.api.response.ZoneResponse;
|
import org.apache.cloudstack.api.response.ZoneResponse;
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
|
|
||||||
@APICommand(name = "listCacheStores", description="Lists cache stores.", responseObject=ImageStoreResponse.class, since = "4.2.0")
|
@APICommand(name = "listSecondaryStagingStores", description = "Lists secondary staging stores.", responseObject = ImageStoreResponse.class, since = "4.2.0")
|
||||||
public class ListCacheStoresCmd extends BaseListCmd {
|
public class ListSecondaryStagingStoresCmd extends BaseListCmd {
|
||||||
public static final Logger s_logger = Logger.getLogger(ListCacheStoresCmd.class.getName());
|
public static final Logger s_logger = Logger.getLogger(ListSecondaryStagingStoresCmd.class.getName());
|
||||||
|
|
||||||
private static final String s_name = "listcachestoreresponse";
|
private static final String s_name = "listsecondarystagingstoreresponse";
|
||||||
|
|
||||||
/////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////
|
||||||
//////////////// API parameters /////////////////////
|
//////////////// API parameters /////////////////////
|
||||||
/////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////
|
||||||
|
|
||||||
@Parameter(name=ApiConstants.NAME, type=CommandType.STRING, description="the name of the cache store")
|
@Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "the name of the staging store")
|
||||||
private String storeName;
|
private String storeName;
|
||||||
|
|
||||||
@Parameter(name=ApiConstants.PROTOCOL, type=CommandType.STRING, description="the cache store protocol")
|
@Parameter(name = ApiConstants.PROTOCOL, type = CommandType.STRING, description = "the staging store protocol")
|
||||||
private String protocol;
|
private String protocol;
|
||||||
|
|
||||||
@Parameter(name=ApiConstants.PROVIDER, type=CommandType.STRING, description="the cache store provider")
|
@Parameter(name = ApiConstants.PROVIDER, type = CommandType.STRING, description = "the staging store provider")
|
||||||
private String provider;
|
private String provider;
|
||||||
|
|
||||||
@Parameter(name=ApiConstants.ZONE_ID, type=CommandType.UUID, entityType = ZoneResponse.class,
|
@Parameter(name=ApiConstants.ZONE_ID, type=CommandType.UUID, entityType = ZoneResponse.class,
|
||||||
description="the Zone ID for the cache store")
|
description = "the Zone ID for the staging store")
|
||||||
private Long zoneId;
|
private Long zoneId;
|
||||||
|
|
||||||
@Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType = ImageStoreResponse.class,
|
@Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType = ImageStoreResponse.class,
|
||||||
description="the ID of the cache store")
|
description = "the ID of the staging store")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////
|
||||||
@ -97,7 +97,7 @@ public class ListCacheStoresCmd extends BaseListCmd {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute(){
|
public void execute(){
|
||||||
ListResponse<ImageStoreResponse> response = _queryService.searchForCacheStores(this);
|
ListResponse<ImageStoreResponse> response = _queryService.searchForSecondaryStagingStores(this);
|
||||||
response.setResponseName(getCommandName());
|
response.setResponseName(getCommandName());
|
||||||
this.setResponseObject(response);
|
this.setResponseObject(response);
|
||||||
}
|
}
|
||||||
@ -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.host.ListHostsCmd;
|
||||||
import org.apache.cloudstack.api.command.admin.internallb.ListInternalLBVMsCmd;
|
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.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.ListImageStoresCmd;
|
||||||
import org.apache.cloudstack.api.command.admin.storage.ListStoragePoolsCmd;
|
import org.apache.cloudstack.api.command.admin.storage.ListStoragePoolsCmd;
|
||||||
import org.apache.cloudstack.api.command.admin.user.ListUsersCmd;
|
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> searchForImageStores(ListImageStoresCmd cmd);
|
||||||
|
|
||||||
public ListResponse<ImageStoreResponse> searchForCacheStores(ListCacheStoresCmd cmd);
|
public ListResponse<ImageStoreResponse> searchForSecondaryStagingStores(ListSecondaryStagingStoresCmd cmd);
|
||||||
|
|
||||||
public ListResponse<AccountResponse> searchForAccounts(ListAccountsCmd cmd);
|
public ListResponse<AccountResponse> searchForAccounts(ListAccountsCmd cmd);
|
||||||
|
|
||||||
|
|||||||
@ -250,9 +250,9 @@ listS3s=1
|
|||||||
addImageStore=1
|
addImageStore=1
|
||||||
listImageStores=1
|
listImageStores=1
|
||||||
deleteImageStore=1
|
deleteImageStore=1
|
||||||
createCacheStore=1
|
createSecondaryStagingStore=1
|
||||||
listCacheStores=1
|
listSecondaryStagingStores=1
|
||||||
#deleteCacheStore=1
|
deleteSecondaryStagingStore=1
|
||||||
|
|
||||||
#### host commands
|
#### host commands
|
||||||
addHost=3
|
addHost=3
|
||||||
|
|||||||
@ -46,7 +46,7 @@ public class StorageCacheRandomAllocator implements StorageCacheAllocator {
|
|||||||
|
|
||||||
List<DataStore> cacheStores = dataStoreMgr.getImageCacheStores(scope);
|
List<DataStore> cacheStores = dataStoreMgr.getImageCacheStores(scope);
|
||||||
if (cacheStores.size() <= 0) {
|
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;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -472,12 +472,12 @@ public class VmwareManagerImpl extends ManagerBase implements VmwareManager, Vmw
|
|||||||
|
|
||||||
if (secUrl == null) {
|
if (secUrl == null) {
|
||||||
// we are using non-NFS image store, then use cache storage instead
|
// 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);
|
DataStore cacheStore = _dataStoreMgr.getImageCacheStore(dcId);
|
||||||
if (cacheStore != null) {
|
if (cacheStore != null) {
|
||||||
secUrl = cacheStore.getUri();
|
secUrl = cacheStore.getUri();
|
||||||
} else {
|
} 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");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -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.host.ListHostsCmd;
|
||||||
import org.apache.cloudstack.api.command.admin.internallb.ListInternalLBVMsCmd;
|
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.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.ListImageStoresCmd;
|
||||||
import org.apache.cloudstack.api.command.admin.storage.ListStoragePoolsCmd;
|
import org.apache.cloudstack.api.command.admin.storage.ListStoragePoolsCmd;
|
||||||
import org.apache.cloudstack.api.command.admin.user.ListUsersCmd;
|
import org.apache.cloudstack.api.command.admin.user.ListUsersCmd;
|
||||||
@ -2107,7 +2107,7 @@ public class QueryManagerImpl extends ManagerBase implements QueryService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ListResponse<ImageStoreResponse> searchForCacheStores(ListCacheStoresCmd cmd) {
|
public ListResponse<ImageStoreResponse> searchForSecondaryStagingStores(ListSecondaryStagingStoresCmd cmd) {
|
||||||
Pair<List<ImageStoreJoinVO>, Integer> result = searchForCacheStoresInternal(cmd);
|
Pair<List<ImageStoreJoinVO>, Integer> result = searchForCacheStoresInternal(cmd);
|
||||||
ListResponse<ImageStoreResponse> response = new ListResponse<ImageStoreResponse>();
|
ListResponse<ImageStoreResponse> response = new ListResponse<ImageStoreResponse>();
|
||||||
|
|
||||||
@ -2117,7 +2117,7 @@ public class QueryManagerImpl extends ManagerBase implements QueryService {
|
|||||||
return response;
|
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());
|
Long zoneId = _accountMgr.checkAccessAndSpecifyAuthority(CallContext.current().getCallingAccount(), cmd.getZoneId());
|
||||||
Object id = cmd.getId();
|
Object id = cmd.getId();
|
||||||
|
|||||||
@ -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.AddImageStoreCmd;
|
||||||
import org.apache.cloudstack.api.command.admin.storage.AddS3Cmd;
|
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.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.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.DeleteImageStoreCmd;
|
||||||
import org.apache.cloudstack.api.command.admin.storage.DeletePoolCmd;
|
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.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.ListImageStoresCmd;
|
||||||
import org.apache.cloudstack.api.command.admin.storage.ListS3sCmd;
|
import org.apache.cloudstack.api.command.admin.storage.ListS3sCmd;
|
||||||
import org.apache.cloudstack.api.command.admin.storage.ListStoragePoolsCmd;
|
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(AddImageStoreCmd.class);
|
||||||
cmdList.add(ListImageStoresCmd.class);
|
cmdList.add(ListImageStoresCmd.class);
|
||||||
cmdList.add(DeleteImageStoreCmd.class);
|
cmdList.add(DeleteImageStoreCmd.class);
|
||||||
cmdList.add(CreateCacheStoreCmd.class);
|
cmdList.add(CreateSecondaryStagingStoreCmd.class);
|
||||||
cmdList.add(ListCacheStoresCmd.class);
|
cmdList.add(ListSecondaryStagingStoresCmd.class);
|
||||||
cmdList.add(DeleteCacheStoreCmd.class);
|
cmdList.add(DeleteSecondaryStagingStoreCmd.class);
|
||||||
cmdList.add(CreateApplicationLoadBalancerCmd.class);
|
cmdList.add(CreateApplicationLoadBalancerCmd.class);
|
||||||
cmdList.add(ListApplicationLoadBalancersCmd.class);
|
cmdList.add(ListApplicationLoadBalancersCmd.class);
|
||||||
cmdList.add(DeleteApplicationLoadBalancerCmd.class);
|
cmdList.add(DeleteApplicationLoadBalancerCmd.class);
|
||||||
|
|||||||
@ -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.AddImageStoreCmd;
|
||||||
import org.apache.cloudstack.api.command.admin.storage.CancelPrimaryStorageMaintenanceCmd;
|
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.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.DeleteImageStoreCmd;
|
||||||
import org.apache.cloudstack.api.command.admin.storage.DeletePoolCmd;
|
import org.apache.cloudstack.api.command.admin.storage.DeletePoolCmd;
|
||||||
import org.apache.cloudstack.api.command.admin.storage.UpdateStoragePoolCmd;
|
import org.apache.cloudstack.api.command.admin.storage.UpdateStoragePoolCmd;
|
||||||
@ -1797,7 +1797,7 @@ public class StorageManagerImpl extends ManagerBase implements StorageManager, C
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ImageStore createCacheStore(CreateCacheStoreCmd cmd) {
|
public ImageStore createSecondaryStagingStore(CreateSecondaryStagingStoreCmd cmd) {
|
||||||
String providerName = cmd.getProviderName();
|
String providerName = cmd.getProviderName();
|
||||||
DataStoreProvider storeProvider = _dataStoreProviderMgr.getDataStoreProvider(providerName);
|
DataStoreProvider storeProvider = _dataStoreProviderMgr.getDataStoreProvider(providerName);
|
||||||
|
|
||||||
@ -1865,7 +1865,7 @@ public class StorageManagerImpl extends ManagerBase implements StorageManager, C
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean deleteCacheStore(DeleteCacheStoreCmd cmd) {
|
public boolean deleteSecondaryStagingStore(DeleteSecondaryStagingStoreCmd cmd) {
|
||||||
long storeId = cmd.getId();
|
long storeId = cmd.getId();
|
||||||
User caller = _accountMgr.getActiveUser(CallContext.current().getCallingUserId());
|
User caller = _accountMgr.getActiveUser(CallContext.current().getCallingUserId());
|
||||||
// Verify that cache store exists
|
// Verify that cache store exists
|
||||||
|
|||||||
@ -145,9 +145,9 @@ known_categories = {
|
|||||||
'addImageStore': 'Image Store',
|
'addImageStore': 'Image Store',
|
||||||
'listImageStore': 'Image Store',
|
'listImageStore': 'Image Store',
|
||||||
'deleteImageStore': 'Image Store',
|
'deleteImageStore': 'Image Store',
|
||||||
'createCacheStore': 'Image Store',
|
'createSecondaryStagingStore': 'Image Store',
|
||||||
'deleteCacheStore': 'Image Store',
|
'deleteSecondaryStagingStore': 'Image Store',
|
||||||
'listCacheStores': 'Image Store',
|
'listSecondaryStagingStores': 'Image Store',
|
||||||
'InternalLoadBalancer': 'Internal LB',
|
'InternalLoadBalancer': 'Internal LB',
|
||||||
'DeploymentPlanners': 'Configuration',
|
'DeploymentPlanners': 'Configuration',
|
||||||
'PortableIp': 'Portable IP',
|
'PortableIp': 'Portable IP',
|
||||||
|
|||||||
@ -174,7 +174,7 @@ specify a valid config file" % cfgFile)
|
|||||||
if cacheStorages is None:
|
if cacheStorages is None:
|
||||||
return
|
return
|
||||||
for cache in cacheStorages:
|
for cache in cacheStorages:
|
||||||
cachecmd = createCacheStore.createCacheStoreCmd()
|
cachecmd = createSecondaryStagingStore.createSecondaryStagingStoreCmd()
|
||||||
cachecmd.url = cache.url
|
cachecmd.url = cache.url
|
||||||
cachecmd.provider = cache.provider
|
cachecmd.provider = cache.provider
|
||||||
cachecmd.zoneid = zoneId
|
cachecmd.zoneid = zoneId
|
||||||
@ -186,7 +186,7 @@ specify a valid config file" % cfgFile)
|
|||||||
'key': key,
|
'key': key,
|
||||||
'value': value
|
'value': value
|
||||||
})
|
})
|
||||||
self.apiClient.createCacheStore(cachecmd)
|
self.apiClient.createSecondaryStagingStore(cachecmd)
|
||||||
|
|
||||||
def createnetworks(self, networks, zoneId):
|
def createnetworks(self, networks, zoneId):
|
||||||
if networks is None:
|
if networks is None:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user