Skip to content

Commit 2f2efb0

Browse files
author
Prachi Damle
committed
CS-19828: EC2 API tool errors while parsing response for detachVolume, describeAddress and revokeSecurityGroupIngress
Changes: - Set the mandatory response properties in case of DetachVolume and DescribeAddress API responses - Use the correct CS API responsename for revokesecuritygroupingress Conflicts: awsapi/src/com/cloud/bridge/service/core/ec2/EC2Engine.java
1 parent 5b37c65 commit 2f2efb0

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,12 @@
3030
import java.util.Map;
3131
import java.util.Properties;
3232
import java.util.UUID;
33-
3433
import javax.inject.Inject;
3534
import javax.naming.ConfigurationException;
3635
import javax.xml.parsers.ParserConfigurationException;
37-
3836
import org.apache.log4j.Logger;
3937
import org.springframework.stereotype.Component;
4038
import org.xml.sax.SAXException;
41-
4239
import com.cloud.bridge.model.CloudStackServiceOfferingVO;
4340
import com.cloud.bridge.persist.dao.CloudStackAccountDao;
4441
import com.cloud.bridge.persist.dao.CloudStackSvcOfferingDao;
@@ -75,6 +72,7 @@
7572
import com.cloud.stack.models.CloudStackZone;
7673
import com.cloud.utils.component.ManagerBase;
7774

75+
7876
/**
7977
* EC2Engine processes the ec2 commands and calls their cloudstack analogs
8078
*
@@ -1175,6 +1173,7 @@ public EC2Volume detachVolume(EC2Volume request) {
11751173
resp.setState(vol.getState());
11761174
resp.setType(vol.getVolumeType());
11771175
resp.setVMState(vol.getVirtualMachineState());
1176+
resp.setAttachmentState("detached");
11781177
resp.setZoneName(vol.getZoneName());
11791178
}
11801179
} catch (Exception e) {

awsapi/src/com/cloud/stack/models/ApiConstants.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ public class ApiConstants {
394394
public static final String RESTART_NETWORK = "restartNetwork";
395395
public static final String RESTART_NETWORK_RESPONSE = "restartnetworkresponse";
396396
public static final String REVOKE_SECURITY_GROUP_INGRESS = "revokeSecurityGroupIngress";
397-
public static final String REVOKE_SECURITY_GROUP_INGRESS_RESPONSE = "revokesecuritygroupingress";
397+
public static final String REVOKE_SECURITY_GROUP_INGRESS_RESPONSE = "revokesecuritygroupingressresponse";
398398
public static final String ROOT_DEVICE_ID = "rootdeviceid";
399399
public static final String ROOT_DEVICE_TYPE = "rootdevicetype";
400400
public static final String RULE_ID = "ruleid";

0 commit comments

Comments
 (0)