Package com.netflix.simianarmy.client.aws

Examples of com.netflix.simianarmy.client.aws.AWSClient.describeVolumes()


        Assert.assertEquals(volume.getLaunchTime(), createTime);
    }

    private AWSClient createMockAWSClient(List<Volume> volumeList, String... ids) {
        AWSClient awsMock = mock(AWSClient.class);
        when(awsMock.describeVolumes(ids)).thenReturn(volumeList);
        when(awsMock.region()).thenReturn("us-east-1");
        return awsMock;
    }

    private List<Volume> createVolumeList(Date createTime) {
View Full Code Here


    private List<Resource> getVolumeResources(String... volumeIds) {
        List<Resource> resources = new LinkedList<Resource>();

        AWSClient awsClient = getAWSClient();

        for (Volume volume : awsClient.describeVolumes(volumeIds)) {
            Resource volumeResource = new AWSResource().withId(volume.getVolumeId())
                    .withRegion(getAWSClient().region()).withResourceType(AWSResourceType.EBS_VOLUME)
                    .withLaunchTime(volume.getCreateTime());
            for (Tag tag : volume.getTags()) {
                LOGGER.info(String.format("Adding tag %s = %s to resource %s",
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.