bug 6779: returning the deviceId wherever possible, in the xxxVolume() calls

status 6779: resolved fixed
This commit is contained in:
root 2010-11-01 11:09:30 -07:00
parent ff91abbb86
commit bee976b5f5
3 changed files with 7 additions and 2 deletions

View File

@ -120,7 +120,8 @@ public class AttachVolumeCmd extends BaseAsyncCmd {
response.setName(volume.getName());
response.setVolumeType(volume.getVolumeType().toString());
response.setResponseName(getName());
if(volume.getDeviceId() != null)
response.setDeviceId(volume.getDeviceId());
return response;
}
}

View File

@ -169,7 +169,9 @@ public class CreateVolumeCmd extends BaseAsyncCreateCmd {
response.setSnapshotId(getSnapshotId());
response.setZoneId(volume.getDataCenterId());
response.setZoneName(ApiDBUtils.findZoneById(volume.getDataCenterId()).getName());
if(volume.getDeviceId() != null){
response.setDeviceId(volume.getDeviceId());
}
response.setResponseName(getName());
return response;
}

View File

@ -118,6 +118,8 @@ public class DetachVolumeCmd extends BaseAsyncCmd {
@Override @SuppressWarnings("unchecked")
public VolumeResponse getResponse() {
VolumeResponse response = (VolumeResponse)getResponseObject();
if(deviceId!=null)
response.setDeviceId(deviceId);
return response;
}
}