CLOUDSTACK-3935:Inconsistent json object name for image store api

This commit is contained in:
Isaac Chiang 2013-07-30 18:59:35 +08:00
parent dafc59e78b
commit 452176c0b4
3 changed files with 8 additions and 8 deletions

View File

@ -141,7 +141,7 @@ public class AddImageStoreCmd extends BaseCmd {
if (result != null ) {
storeResponse = _responseGenerator.createImageStoreResponse(result);
storeResponse.setResponseName(getCommandName());
storeResponse.setObjectName("secondarystorage");
storeResponse.setObjectName("imagestore");
this.setResponseObject(storeResponse);
} else {
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to add secondary storage");

View File

@ -29,7 +29,7 @@ import org.apache.log4j.Logger;
public class ListImageStoresCmd extends BaseListCmd {
public static final Logger s_logger = Logger.getLogger(ListImageStoresCmd.class.getName());
private static final String s_name = "listimagestoreresponse";
private static final String s_name = "listimagestoresresponse";
/////////////////////////////////////////////////////
//////////////// API parameters /////////////////////

View File

@ -291,7 +291,7 @@
data: data2,
success: function(json) {
dataFns.systemVmCount($.extend(data, {
secondaryStorageCount: json.listimagestoreresponse.imagestore ? json.listimagestoreresponse.count : 0
secondaryStorageCount: json.listimagestoresresponse.imagestore ? json.listimagestoresresponse.count : 0
}));
}
});
@ -7336,7 +7336,7 @@
data: data,
success: function(json) {
args.response.success({
data: json.listimagestoreresponse.imagestore
data: json.listimagestoresresponse.imagestore
});
},
error: function(json) {
@ -14794,7 +14794,7 @@
url: createURL('addImageStore'),
data: data,
success: function(json) {
var item = json.addimagestoreresponse.secondarystorage;
var item = json.addimagestoreresponse.imagestore;
args.response.success({
data: item
});
@ -14844,7 +14844,7 @@
data: data,
success: function(json) {
havingS3 = true;
var item = json.addimagestoreresponse.secondarystorage;
var item = json.addimagestoreresponse.imagestore;
args.response.success({
data: item
});
@ -14904,7 +14904,7 @@
data: data,
success: function(json) {
havingSwift = true;
var item = json.addimagestoreresponse.secondarystorage;
var item = json.addimagestoreresponse.imagestore;
args.response.success({
data: item
});
@ -15014,7 +15014,7 @@
dataType: "json",
async: true,
success: function(json) {
var item = json.listimagestoreresponse.imagestore[0];
var item = json.listimagestoresresponse.imagestore[0];
args.response.success({
actionFilter: secondarystorageActionfilter,
data: item