Package com.netflix.simianarmy.aws

Examples of com.netflix.simianarmy.aws.AWSResource


    public boolean isValid(Resource resource) {
        Validate.notNull(resource);
        if (!"LAUNCH_CONFIG".equals(resource.getResourceType().name())) {
            return true;
        }
        AWSResource lcResource = (AWSResource) resource;
        String usedByASG = lcResource.getAdditionalField(LaunchConfigJanitorCrawler.LAUNCH_CONFIG_FIELD_USED_BY_ASG);
        if (StringUtils.isNotEmpty(usedByASG) && !Boolean.parseBoolean(usedByASG)) {
            if (resource.getLaunchTime() == null) {
                LOGGER.error(String.format("The launch config %s has no creation time.", resource.getId()));
                return true;
            } else {
View Full Code Here


        }
        String awsStatus = ((AWSResource) resource).getAWSResourceState();
        if (!"running".equals(awsStatus) || "pending".equals(awsStatus)) {
            return true;
        }
        AWSResource instanceResource = (AWSResource) resource;
        String asgName = instanceResource.getAdditionalField(InstanceJanitorCrawler.INSTANCE_FIELD_ASG_NAME);
        if (StringUtils.isEmpty(asgName)) {
            if (resource.getLaunchTime() == null) {
                LOGGER.error(String.format("The instance %s has no launch time.", resource.getId()));
                return true;
            } else {
View Full Code Here

TOP

Related Classes of com.netflix.simianarmy.aws.AWSResource

Copyright © 2018 www.massapicom. 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.