use of com.cloud.api.response.ImageStoreDetailResponse in project cosmic by MissionCriticalCloud.
the class ImageStoreJoinDaoImpl method setImageStoreResponse.
@Override
public ImageStoreResponse setImageStoreResponse(final ImageStoreResponse response, final ImageStoreJoinVO ids) {
final String detailName = ids.getDetailName();
if (detailName != null && detailName.length() > 0 && !detailName.equals(ApiConstants.PASSWORD)) {
String detailValue = ids.getDetailValue();
if (detailName.equals(ApiConstants.KEY)) {
// ALWAYS return an empty value for the S3 secret key since that key is managed by Amazon and not CloudStack
detailValue = "";
}
final ImageStoreDetailResponse osdResponse = new ImageStoreDetailResponse(detailName, detailValue);
response.addDetail(osdResponse);
}
return response;
}
use of com.cloud.api.response.ImageStoreDetailResponse in project cosmic by MissionCriticalCloud.
the class ImageStoreJoinDaoImpl method newImageStoreResponse.
@Override
public ImageStoreResponse newImageStoreResponse(final ImageStoreJoinVO ids) {
final ImageStoreResponse osResponse = new ImageStoreResponse();
osResponse.setId(ids.getUuid());
osResponse.setName(ids.getName());
osResponse.setProviderName(ids.getProviderName());
osResponse.setProtocol(ids.getProtocol());
String url = ids.getUrl();
// if store is type cifs, remove the password
if (ids.getProtocol().equals("cifs".toString())) {
url = StringUtils.cleanString(url);
}
osResponse.setUrl(url);
osResponse.setScope(ids.getScope());
osResponse.setZoneId(ids.getZoneUuid());
osResponse.setZoneName(ids.getZoneName());
final String detailName = ids.getDetailName();
if (detailName != null && detailName.length() > 0 && !detailName.equals(ApiConstants.PASSWORD)) {
String detailValue = ids.getDetailValue();
if (detailName.equals(ApiConstants.KEY)) {
// ALWAYS return an empty value for the S3 secret key since that key is managed by Amazon and not CloudStack
detailValue = "";
}
final ImageStoreDetailResponse osdResponse = new ImageStoreDetailResponse(detailName, detailValue);
osResponse.addDetail(osdResponse);
}
osResponse.setObjectName("imagestore");
return osResponse;
}
Aggregations