Fix CS-15834

Added storage type in list disk offerings response
Reviewed-by: Abhi, Nitin
This commit is contained in:
Koushik Das 2012-08-06 15:24:01 +05:30
parent 1c9c604f3a
commit 32c577ef7d
3 changed files with 13 additions and 1 deletions

View File

@ -47,6 +47,9 @@ public class DiskOfferingResponse extends BaseResponse {
@SerializedName(ApiConstants.TAGS) @Param(description="the tags for the disk offering")
private String tags;
@SerializedName("storagetype") @Param(description="the storage type for this disk offering")
private String storageType;
public Long getId() {
return id.getValue();
}
@ -119,4 +122,11 @@ public class DiskOfferingResponse extends BaseResponse {
this.customized = customized;
}
public String getStorageType() {
return storageType;
}
public void setStorageType(String storageType) {
this.storageType = storageType;
}
}

View File

@ -469,6 +469,7 @@ public class ApiResponseHelper implements ResponseGenerator {
}
diskOfferingResponse.setTags(offering.getTags());
diskOfferingResponse.setCustomized(offering.isCustomized());
diskOfferingResponse.setStorageType(offering.getUseLocalStorage() ? ServiceOffering.StorageType.local.toString() : ServiceOffering.StorageType.shared.toString());
diskOfferingResponse.setObjectName("diskoffering");
return diskOfferingResponse;
}

View File

@ -945,7 +945,8 @@
}
},
tags: { label: 'label.storage.tags' },
domain: { label: 'label.domain' }
domain: { label: 'label.domain' },
storagetype: { label: 'label.storage.type' }
}
],