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.
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
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.
Tags support has been added to 3 EC2Describe* API's(DescribeInstances, DescribeVolumes and DescribeSnapshots). Hence for the same 3 EC2Describe* API's filter support has been modified to included 3 tag related filters: tag-key,
tag-value and tag:key.
Verified the output of,
1. ec2-create-tags for all 4 supported ec2 resources(image, instance, volume and snapshot) with and without tag-value.
2. ec2-delete-tags for all types of created tags.
3. ec2-describe-tags with and without all supported filter.