Skip to content

Commit 56e3724

Browse files
author
Likitha Shetty
committed
CLOUDSTACK-7114. [EC2 QueryAPI] Inconsistency in mapping the "Allocated" state of a Volume to "Available".
1 parent 5ccd904 commit 56e3724

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

awsapi/src/com/cloud/bridge/service/core/ec2/EC2Engine.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1231,7 +1231,9 @@ public EC2Volume createVolume(EC2CreateVolume request) {
12311231
resp.setInstanceId(vol.getVirtualMachineId());
12321232
resp.setSize(vol.getSize());
12331233
resp.setSnapshotId(vol.getSnapshotId());
1234-
resp.setState(vol.getState());
1234+
if (vol.getState() != null) {
1235+
resp.setState(mapToAmazonVolState(vol.getState()));
1236+
}
12351237
resp.setType(vol.getVolumeType());
12361238
resp.setVMState(vol.getVirtualMachineState());
12371239
resp.setAttachmentState("detached");

0 commit comments

Comments
 (0)