Search in sources :

Example 1 with ImageStoreImpl

use of org.apache.cloudstack.storage.image.store.ImageStoreImpl in project cloudstack by apache.

the class SimulatorImageStoreDriverImpl method getStoreTO.

@Override
public DataStoreTO getStoreTO(DataStore store) {
    ImageStoreImpl nfsStore = (ImageStoreImpl) store;
    NfsTO nfsTO = new NfsTO();
    nfsTO.setRole(store.getRole());
    nfsTO.setUrl(nfsStore.getUri());
    nfsTO.setNfsVersion(getNfsVersion(nfsStore.getId()));
    return nfsTO;
}
Also used : ImageStoreImpl(org.apache.cloudstack.storage.image.store.ImageStoreImpl) NfsTO(com.cloud.agent.api.to.NfsTO)

Example 2 with ImageStoreImpl

use of org.apache.cloudstack.storage.image.store.ImageStoreImpl in project cloudstack by apache.

the class CloudStackImageStoreDriverImpl method getStoreTO.

@Override
public DataStoreTO getStoreTO(DataStore store) {
    ImageStoreImpl nfsStore = (ImageStoreImpl) store;
    NfsTO nfsTO = new NfsTO();
    nfsTO.setRole(store.getRole());
    nfsTO.setUrl(nfsStore.getUri());
    nfsTO.setNfsVersion(getNfsVersion(nfsStore.getId()));
    return nfsTO;
}
Also used : ImageStoreImpl(org.apache.cloudstack.storage.image.store.ImageStoreImpl) NfsTO(com.cloud.agent.api.to.NfsTO)

Example 3 with ImageStoreImpl

use of org.apache.cloudstack.storage.image.store.ImageStoreImpl in project cloudstack by apache.

the class S3ImageStoreDriverImpl method getStoreTO.

@Override
public DataStoreTO getStoreTO(DataStore store) {
    ImageStoreImpl imgStore = (ImageStoreImpl) store;
    Map<String, String> details = _imageStoreDetailsDao.getDetails(imgStore.getId());
    return new S3TO(imgStore.getId(), imgStore.getUuid(), details.get(ApiConstants.S3_ACCESS_KEY), details.get(ApiConstants.S3_SECRET_KEY), details.get(ApiConstants.S3_END_POINT), details.get(ApiConstants.S3_BUCKET_NAME), details.get(ApiConstants.S3_SIGNER), details.get(ApiConstants.S3_HTTPS_FLAG) == null ? false : Boolean.parseBoolean(details.get(ApiConstants.S3_HTTPS_FLAG)), details.get(ApiConstants.S3_CONNECTION_TIMEOUT) == null ? null : Integer.valueOf(details.get(ApiConstants.S3_CONNECTION_TIMEOUT)), details.get(ApiConstants.S3_MAX_ERROR_RETRY) == null ? null : Integer.valueOf(details.get(ApiConstants.S3_MAX_ERROR_RETRY)), details.get(ApiConstants.S3_SOCKET_TIMEOUT) == null ? null : Integer.valueOf(details.get(ApiConstants.S3_SOCKET_TIMEOUT)), imgStore.getCreated(), _configDao.getValue(Config.S3EnableRRS.toString()) == null ? false : Boolean.parseBoolean(_configDao.getValue(Config.S3EnableRRS.toString())), getMaxSingleUploadSizeInBytes(), details.get(ApiConstants.S3_CONNECTION_TTL) == null ? null : Integer.valueOf(details.get(ApiConstants.S3_CONNECTION_TTL)), details.get(ApiConstants.S3_USE_TCP_KEEPALIVE) == null ? null : Boolean.parseBoolean(details.get(ApiConstants.S3_USE_TCP_KEEPALIVE)));
}
Also used : ImageStoreImpl(org.apache.cloudstack.storage.image.store.ImageStoreImpl) S3TO(com.cloud.agent.api.to.S3TO)

Example 4 with ImageStoreImpl

use of org.apache.cloudstack.storage.image.store.ImageStoreImpl in project cloudstack by apache.

the class SwiftImageStoreDriverImpl method getStoreTO.

@Override
public DataStoreTO getStoreTO(DataStore store) {
    ImageStoreImpl imgStore = (ImageStoreImpl) store;
    Map<String, String> details = _imageStoreDetailsDao.getDetails(imgStore.getId());
    return new SwiftTO(imgStore.getId(), imgStore.getUri(), details.get(ApiConstants.ACCOUNT), details.get(ApiConstants.USERNAME), details.get(ApiConstants.KEY));
}
Also used : SwiftTO(com.cloud.agent.api.to.SwiftTO) ImageStoreImpl(org.apache.cloudstack.storage.image.store.ImageStoreImpl)

Aggregations

ImageStoreImpl (org.apache.cloudstack.storage.image.store.ImageStoreImpl)4 NfsTO (com.cloud.agent.api.to.NfsTO)2 S3TO (com.cloud.agent.api.to.S3TO)1 SwiftTO (com.cloud.agent.api.to.SwiftTO)1