Package com.netflix.simianarmy.client.aws

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


    private static AWSClient makeMockAWSClient() {
        AmazonSimpleDB sdbMock = mock(AmazonSimpleDB.class);
        AWSClient awsClient = mock(AWSClient.class);
        when(awsClient.sdbClient()).thenReturn(sdbMock);
        when(awsClient.region()).thenReturn("region");
        return awsClient;
    }

    public TestSimpleDBRecorder() {
        super(makeMockAWSClient(), "DOMAIN");
View Full Code Here


    }

    private AWSClient createMockAWSClient(List<AutoScalingGroup> asgList, String... asgNames) {
        AWSClient awsMock = mock(AWSClient.class);
        when(awsMock.describeAutoScalingGroups(asgNames)).thenReturn(asgList);
        when(awsMock.region()).thenReturn("us-east-1");
        return awsMock;
    }

    private List<AutoScalingGroup> createASGList() {
        List<AutoScalingGroup> asgList = new LinkedList<AutoScalingGroup>();
View Full Code Here

    private AWSClient createMockAWSClient(List<AutoScalingGroup> asgList,
                                          List<LaunchConfiguration> lcList, String... lcNames) {
        AWSClient awsMock = mock(AWSClient.class);
        when(awsMock.describeAutoScalingGroups()).thenReturn(asgList);
        when(awsMock.describeLaunchConfigurations(lcNames)).thenReturn(lcList);
        when(awsMock.region()).thenReturn("us-east-1");
        return awsMock;
    }

    private List<LaunchConfiguration> createLaunchConfigList(int n) {
        List<LaunchConfiguration> lcList = Lists.newArrayList();
View Full Code Here

    }

    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) {
        List<Volume> volumeList = new LinkedList<Volume>();
View Full Code Here

    }

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

    private List<Snapshot> createSnapshotList(Date startTime) {
        List<Snapshot> snapshotList = new LinkedList<Snapshot>();
View Full Code Here

    private AWSClient createMockAWSClient(List<AutoScalingInstanceDetails> instanceDetailsList,
            List<Instance> instanceList, String... ids) {
        AWSClient awsMock = mock(AWSClient.class);
        when(awsMock.describeAutoScalingInstances(ids)).thenReturn(instanceDetailsList);
        when(awsMock.describeInstances(ids)).thenReturn(instanceList);
        when(awsMock.region()).thenReturn("us-east-1");
        return awsMock;
    }

    private List<AutoScalingInstanceDetails> createInstanceDetailsList() {
        List<AutoScalingInstanceDetails> instanceList = new LinkedList<AutoScalingInstanceDetails>();
View Full Code Here

        }

        List<Resource> resources = new LinkedList<Resource>();
        for (AutoScalingGroup asg : awsClient.describeAutoScalingGroups(asgNames)) {
            Resource asgResource = new AWSResource().withId(asg.getAutoScalingGroupName())
                    .withResourceType(AWSResourceType.ASG).withRegion(awsClient.region())
                    .withLaunchTime(asg.getCreatedTime());
            for (TagDescription tag : asg.getTags()) {
                asgResource.setTag(tag.getKey(), tag.getValue());
            }
            asgResource.setDescription(String.format("%d instances", asg.getInstances().size()));
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.