public static bool ValidateSettings(Settings settings, ChaosLogger logger) { var settingsValid = true; if (string.IsNullOrEmpty(settings.ServiceUrl) && !string.IsNullOrEmpty(settings.Ec2Endpoint)) { settings.ServiceUrl = ServiceUrlFromEndPointName(settings.Ec2Endpoint); if (string.IsNullOrEmpty(settings.ServiceUrl)) { logger.Log("ERROR: Cannot find service url for endpoint '" + settings.Ec2Endpoint + "'"); settingsValid = false; } } if (string.IsNullOrEmpty(settings.ServiceUrl)) { logger.Log("ERROR: No service URL found"); settingsValid = false; } if (string.IsNullOrEmpty(settings.Tagkey)) { logger.Log("ERROR: Tag key needed"); settingsValid = false; } if (string.IsNullOrEmpty(settings.TagValue)) { logger.Log("ERROR: Tag value needed"); settingsValid = false; } return settingsValid; }
public Ec2Factory(string AWSAccessKey, string AWSSecretKey, string serviceUrl, ChaosLogger logger) { this.logger = logger; if (!serviceUrl.Contains("http://")) { serviceUrl = "http://" + serviceUrl; } amazonEc2 = AWSClientFactory.CreateAmazonEC2Client( AWSAccessKey, AWSSecretKey, new AmazonEC2Config().WithServiceURL(serviceUrl)); }
public ParentMonkey(Settings settings, ChaosLogger logger) { _logger = logger; _settings = settings; }
public MonkeyKeeper(Settings setting,ChaosLogger logger, MonkeyListBuilder listBuilder) { _settings = setting; _logger = logger; _builder = listBuilder; }
public override IList<ParentMonkey> GetMonkeys(Settings settings, ChaosLogger logger) { logger.Log("Hard coded MonkyeListProvider returning EC2Monkey"); return new List<ParentMonkey>() { new EC2Monkey(settings, logger) }; }
public IISServerMonkey(Settings settings,ChaosLogger logger) : base(settings,logger) { }
public EC2Monkey(Settings settings, ChaosLogger logger) : base(settings, logger) { }
/// <summary> /// Gives the list of Monkeys /// </summary> /// <param name="settings"></param> /// <param name="logger"></param> /// <returns></returns> public abstract IList<ParentMonkey> GetMonkeys(Settings settings,ChaosLogger logger);