- by adding stubs for the new EC2 APIs (unsupported by CS AWSAPI)
- by setting the new EC2 API response elements
- by adding support for the new EC2 API request elements
[Support for EC2 API version 2012-08-15]
Changes:
For createVolume API with custom size the awsapi component chooses the custom size disk offering present on CloudStack, sice CS createVolume API needs an offering Id.
But if there are multiple custom size disk offerings, and some of the offerings have tags, awsapi should try to choose a non-tagged custom offering first. There is a reason for people to tag a disk offering and using that on every user API call may not be preferable.
If all disk offerings are tagged however, awsapi will choose one of them.
Changes:
awsapi will not pass networkId in case of Advance Zone and let CS identify which network to deploy VM in. The same case applies to allocateAddress API too.
Provide support for the following error codes -
AuthFailure, DependencyViolation, IncorrectState, InvalidAMIID.NotFound, InvalidAttachment.NotFound, InvalidDevice.InUse, InvalidFilter, InvalidGroup.Duplicate, InvalidGroup.InUse, InvalidGroup.NotFound
InvalidInstanceID.NotFound, InvalidKeyPair.Duplicate, InvalidKeyPair.Format, InvalidKeyPair.NotFound, InvalidParameterCombinatio, InvalidParameterValue, InvalidPermission.Duplicate, InvalidPermission.Malformed
InvalidSnapshot.NotFound, InvalidVolume.NotFound, InvalidVolumeID.Duplicate, InvalidZone.NotFound, MissingParameter, UnsupportedOperation, SignatureDoesNotMatch, InternalError, AddressLimitExceeded, InstanceLimitExceeded
VolumeLimitExceeded, Unavailable, ResourceLimitExceeded
CLOUDSTACK-2624. Support ModifyInstanceAttribute API in AWSAPI.
2 AWS instance attributes will be supported, 'InstanceType' and 'UserData'
As per AWS EC2, to modify both the attributes, the instance must be stopped. If not throw 'IncorrectInstanceState' error
PHP SDK calls the CFSimpleXML parser class to parse the response body into CFSimpleXML Object format.
In AWSAPI added an XML declaration during serialization of Axis beans to XML output
Summary: EC2 REST API: AWS APIs are not getting translated on the CloudStack Management Server and AWS API Installation Problems.
Fixing the class not found exception, key not found and other issues as mentioned in the above two defects.
Signed-off-by: Pradeep <pradeep.soundararajan@citrix.com>
Some concepts included:
* the replace.properties location used by maven is parameterized to allow
for a build that does not modify the currently git tracked files
* package naming is updated along the lines of what was discussed on the
-dev mailing list and between committers at the Build a Cloud Day in Belgi
* package version pattern is updated (since we redo all package names,
we might as well drop the epoch)
[EC2 Query API] RunInstances allows negative values for paramters 'MinCount' and 'MaxCount'
Add parameter validation to ensure MinCount is greater than 0 and MaxCount is great than or equal to MinCount
Convert space characters in the parameters to %20 while forming a query string after url-encode because java.net.URLEncoder performs application/x-www-form-urlencoded-type encoding and not percent-encoding. According to RFC 3986 as required by Amazon, we need to percent-encode.
1. If volume is attached to a VM set attachment state based on the state of the VM it is attached to.
Running, Starting, Stopped -> Attached
Starting -> Attaching
Destroyed, Error -> Detached
2. If volume is not attached to a VM set attachment state as 'detached'
Add message in the response element of EC2DesrcibeAvailibilityZones. Add support for filter 'message'.
The value of 'message' should be set to the allocation_state of the zone
Code cleanup
This is observed in the awsapi.log for all Describe* EC2 commands when the response object returned by CS has no elements. But with EC2DescribeImages command it is always observed. This is because every time DescribeImage is fired, we call CS listTemplates command multiple times, each time setting a different value for the templateFilter parameter (e.g. featured, executable, community etc.). And for some of these CS calls made we obtain am empty response and hence the message in the logs.