Package com.netflix.simianarmy.conformity

Examples of com.netflix.simianarmy.conformity.Conformity


    public void testCheckSoloInstances() throws Exception {
        Set<String> list = Sets.newHashSet();
        list.add(VPC_INSTANCE_ID);
        list.add(INSTANCE_ID);
        Cluster cluster = new Cluster("SoloInstances", REGION, list);
        Conformity result = instanceInVPC.check(cluster);
        Assert.assertNotNull(result);
        Assert.assertEquals(result.getRuleId(), instanceInVPC.getName());
        Assert.assertEquals(result.getFailedComponents().size(), 1);
        Assert.assertEquals(result.getFailedComponents().iterator().next(), INSTANCE_ID);
    }
View Full Code Here


    @Test
    public void testAsgInstances() throws Exception {
        AutoScalingGroup autoScalingGroup = new AutoScalingGroup("Conforming", VPC_INSTANCE_ID);
        Cluster conformingCluster = new Cluster("Conforming", REGION, autoScalingGroup);
        Conformity result = instanceInVPC.check(conformingCluster);
        Assert.assertNotNull(result);
        Assert.assertEquals(result.getRuleId(), instanceInVPC.getName());
        Assert.assertEquals(result.getFailedComponents().size(), 0);

        autoScalingGroup = new AutoScalingGroup("NonConforming", INSTANCE_ID);
        Cluster nonConformingCluster = new Cluster("NonConforming", REGION, autoScalingGroup);
        result = instanceInVPC.check(nonConformingCluster);
        Assert.assertNotNull(result);
        Assert.assertEquals(result.getRuleId(), instanceInVPC.getName());
        Assert.assertEquals(result.getFailedComponents().size(), 1);
        Assert.assertEquals(result.getFailedComponents().iterator().next(), INSTANCE_ID);
    }
View Full Code Here

                    LOGGER.info(String.format("Instance %s is not healthy in Eureka.", instance));
                    failedComponents.add(instance);
                }
            }
        }
        return new Conformity(getName(), failedComponents);
    }
View Full Code Here

                            lbName, cluster.getRegion()));
                    failedComponents.add(lbName);
                }
            }
        }
        return new Conformity(getName(), failedComponents);
    }
View Full Code Here

                LOGGER.info(String.format("Instance %s was created more than %d days ago",
                        instanceId, instanceAgeThreshold));
                failedComponents.add(instanceId);
            }
        }
        return new Conformity(getName(), failedComponents);
    }
View Full Code Here

                            instance));
                    failedComponents.add(instance);
                }
            }
        }
        return new Conformity(getName(), failedComponents);
    }
View Full Code Here

                            instance));
                    failedComponents.add(instance);
                }
            }
        }
        return new Conformity(getName(), failedComponents);
    }
View Full Code Here

                continue;
            }
            Set<String> asgFailedInstances = checkInstancesInVPC(cluster.getRegion(), asg.getInstances());
            failedComponents.addAll(asgFailedInstances);
        }
        return new Conformity(getName(), failedComponents);
    }
View Full Code Here

                            asgZones, lbZones));
                    failedComponents.add(lbName);
                }
            }
        }
        return new Conformity(getName(), failedComponents);
    }
View Full Code Here

                    LOGGER.info(String.format("Instance %s does not have all required security groups", instanceId));
                    failedComponents.add(instanceId);
                }
            }
        }
        return new Conformity(getName(), failedComponents);
    }
View Full Code Here

TOP

Related Classes of com.netflix.simianarmy.conformity.Conformity

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.