These tests are run using jclouds.
All tests are written keeping regions in mind. Null value have been passed for region. To get the endpoint it was making call to describeRegions, which is not supported by Cloudstack so code changes have been made for that.
A new project cloudsatck-query-ec2 have been created in jclouds. These changes are on repo in cloudstack-ec2-queryapi branch and in cloudstack-query-ec2 project.
In summary 13 API calls in tests scenarios are passing. Some failing/skipped ones are dependent on failed tests which are expected to pass once the failed test is ok. The APIs which are passing are as follows
- describeImages
- describeInstances
- describeAddresses
- createVolume
- describeVolumes
- describeSnapshots
- describeAvailabilityZones
- createKeyPair
- describeKeyPairs
- deleteKeyPair
- createSecurityGroup
- deleteSecurityGroup
- describeSecurityGroups
These tests are failing or skipped(dependent on failed tests) on jclouds as some API call is broken in jclouds
- authorizeSecurityGroupIngress
- revokeSecurityGroupIngress
- createSnapshot
- createVolumeFromSnapshot
- deleteVolume
- attachVolume
- detachVolume
- runInstances
- terminateInstances
- deleteSnapshot
These tests are not implemented in jclouds
- StopInstances
- StartInstances
- RebootInstances
- DescribeInstanceAttribute
- CreateImage
- DeregisterImage
- DescribeImageAttribute
- ModifyImageAttribute
- ResetImageAttribute
- RegisterImage
- ImportKeyPair
- AllocateAddress
- AssociateAddress
- DisassociateAddress
- ReleaseAddress
- GetPassword
- createTags
- describeTags
- deleteTags
Below things are in following format
Class containing below scenarios
- test scenario
- EC2 API Calls made in this scenario (parameters passed)
Tests which are passing
CloudStackQueryEC2AMIClientLiveTest
- testDescribeImages It expects two images(normal one and ebs one) so its expectation has been changed to one image.
- describeImagesInRegion Here describeImages API call is made without any parameters. This test checks whether images in response are not null and correct in number.
- describeImagesInRegion (imageid) This call is made with parameter imageid. Test checks whether response contains only one image with the image id as imageid.
CloudStackQueryEC2InstanceClientLiveTest
- testDescribeInstancesNo change
- describeInstancesInRegion Here describeInstances API call is made without any parameters. This test checks whether instnaces in response are not null and are greater than or equal to 0.
CloudStackQueryEC2ElasticIPAddressClientLiveTest
- testDescribeAddresses No Change
- describeAddressesInRegion Here describeAddresses API call is made without any parameters. This test checks whether public IP pairs in response are not null .
- describeAddressesInRegion(publicIp) If above call return result greater than 0 then make describeAddresses API call with parameter publicIp. It checks whether response contains the single pair with with public IP piblicIp.
CloudStackQueryEC2ElasticBlockStoreClientLiveTest
- *testCreateVolumeInAvailabilityZone *have to change result size to 2( as some test not cleaned up the created volume, work in progress)
- createVolumeInAvailabilityZone(zone, size) Here createVolume API call is made with parameters zone and size. It checks whether response is not null and zone of volume is zone
- describeVolumesInRegion(volumeid) Here describeVolumes API call is made with parameters volumeid. It checks whether result in response is not null and volume id is volumeid
- *testDescribeSnapshots *no change
- describeSnapshotsInRegion Here describeSnapshots API call is made without any parameters. This test checks whether snapshots in response are not null.
- describeSnapshotsInRegion(snapshotid) This call is made with parameter snapshotid. Test checks whether response contains only one snapshot with the snapshot id as snapshotid.
- testDescribeVolumes command is working fine
- describeVolumesInRegion Here describeImages API call is made without any parameters. This test checks whether response is parsed correctly.
CloudStackQueryEC2AvailabilityZoneAndRegionClientLiveTest
- testDescribeAvailabilityZones no change
- describeAvailabilityZonesInRegion Here describeAvailabilityZones API call is made without any parameters. This test checks whether Availability Zones in response are not null and correct in number.
- describeAvailabilityZonesInRegion(zoneid) This call is made with parameter zoneid. Test checks whether response contains only one zone with the zone id as zoneid.
CloudStackQueryEC2KeyPairClientLiveTest
- testCreateKeyPair *have to remove one delete keypair call as this was deleting non-existent keypair.
- createKeyPairInRegion(keyName) Here createKeyPair API call is made with parameter keyName. This test checks whether result in response is not null. It also checks whether various parameters of key Pair are not null. Parameters checked are keyMaterial, SHA1 of private Key and keyName.
- describeKeyPairsInRegion(keyName) Here describeKeyPairs API call is called with parameter keyName. It checks whether response contains the single pair with with key pair name as keyname.
- deleteKeyPairInRegion(keyName) Here deleteKeyPair API call is made with parameter keyName. It checks whether response is parsed correctly by jclouds
- testDescribeKeyPairschanges related to region
- describeKeyPairsInRegion Here describeKeyPairs API call is made without any parameters. This test checks whether Key Paiirs in response are not null .
- describeKeyPairsInRegion(keyName) If above call return result greater than 0 then make describeKeyPairs API call with parameter keyName. It checks whether response contains the single pair with with key pair name as keyname.
CloudStackQueryEC2SecurityGroupClientLiveTest
- testCreateSecurityGroup *have to remove one delete security group call as this was deleting non-existent security group.
- createSecurityGroupInRegion(groupName, groupDescription) Here createSecurityGroup API call is made with parameters groupName and groupDescription. It checks whether response is not null and and group is created with parameters passed correctly.
- deleteSecurityGroupInRegion(groupName) Here deleteSecurityGroup API call is made with parameter groupName. It checks whether response is parsed correctly by jclouds
- testDescribe *changes related to region
- describeSecurityGroupsInRegion Here describeSecurityGroups API call is made without any parameters. This test checks whether security groups in response are not null.
- describeSecurityGroupsInRegion(groupName) If above call return result greater than 0 then make describeSecurityGroups API call with parameter groupName. It checks whether response contains the single security group with with name groupName.
Tests which are failing
CloudStackQueryEC2AMIClientLiveTest
- testDescribeImageBadId This is negative test, work in progress .
- testDescribeImageNotExists This is negative test, work in progress.
CloudStackQueryEC2SecurityGroupClientLiveTest
- testAuthorizeSecurityGroupIngressCidr For Ingress tests generated API call is not in correct format i.e. parameters missing Ippermissions.n prefix.
- createSecurityGroupInRegion(groupName)
- authorizeSecurityGroupIngressInRegion(groupName, IpProtocol, Ippermissions)
- revokeSecurityGroupIngressInRegion(groupName, IpProtocol, Ippermissions)
- deleteSecurityGroupInRegion(groupName)
- testAuthorizeSecurityGroupIngressSourceGroup
- createSecurityGroupInRegion(groupName)
- authorizeSecurityGroupIngressInRegion(groupName, IpProtocol, Ippermissions)
- revokeSecurityGroupIngressInRegion(groupName, IpProtocol, Ippermissions)
- deleteSecurityGroupInRegion(groupName)
- testAuthorizeSecurityGroupIngressSourcePort
- createSecurityGroupInRegion(groupName)
- authorizeSecurityGroupIngressInRegion(groupName, IpProtocol, Ippermissions)
- revokeSecurityGroupIngressInRegion(groupName, IpProtocol, Ippermissions)
- deleteSecurityGroupInRegion(groupName)
CloudStackQueryEC2ElasticBlockStoreClientLiveTest
- testCreateSnapshotInRegionSpecified VolumeId is not in Ready state, but in state Allocated. Cannot take snapshot. It requires created instance but did not contain any instance creation call. It depends on attach test which is not written. For cloudstack it needs instance to attach volume.
- createSnapshotInRegion(volumeId)
- describeSnapshotsInRegion(snapshotId)
Skipped test which are dependent on failed tests
CloudStackQueryEC2ElasticBlockStoreClientLiveTest
- testCreateVolumeFromSnapshotInAvailabilityZone
- createVolumeFromSnapshotInAvailabilityZone(snapshotId)
- deleteVolumeInRegion(volumeId)
- describeVolumesInRegion(volumeId)
- testCreateVolumeFromSnapshotInAvailabilityZoneWithSize
- createVolumeFromSnapshotInAvailabilityZone(snapshotId)
- deleteVolumeInRegion(volumeId)
- describeVolumesInRegion(volumeId)
- testDeleteVolumeInRegion
- deleteVolumeInRegion(volumeId)
- describeVolumesInRegion(volumeId)
- testGetCreateVolumePermissionForSnapshot
- getCreateVolumePermissionForSnapshotInRegion(snapshotId)
- testDeleteSnapshotInRegion
- deleteSnapshotInRegion(snapshotId)
- describeSnapshotsInRegion(snapshotId)
Tests which are not implemented in jclouds but test available as TODO.
- testAttachVolumeInRegion requires instance creation
- testDetachVolumeInRegion
API Calls which are not called in any tests
- StopInstances
- StartInstances
- RebootInstances
- DescribeInstanceAttribute
- CreateImage
- DeregisterImage
- DescribeImageAttribute
- ModifyImageAttribute
- ResetImageAttribute
- RegisterImage
- ImportKeyPair
- AllocateAddress
- AssociateAddress
- DisassociateAddress
- ReleaseAddress
- GetPassword
Things which are not in jclouds or not working
- Tags functionality is not present in jclouds in ec2 project
- Ingress related calls are generated without Ippermissions.n prefix in parameters
- No importKeyPair API Call