コード例 #1
0
        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;
        }
コード例 #2
0
ファイル: Ec2Factory.cs プロジェクト: themenucha/ChaosMonkey
        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));
        }
コード例 #3
0
        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));
        }
コード例 #4
0
 public ParentMonkey(Settings settings, ChaosLogger logger)
 {
     _logger = logger;
     _settings = settings;
 }
コード例 #5
0
 public MonkeyKeeper(Settings setting,ChaosLogger logger, MonkeyListBuilder listBuilder)
 {
     _settings = setting;
     _logger = logger;
     _builder = listBuilder;
 }
コード例 #6
0
 public override IList<ParentMonkey> GetMonkeys(Settings settings, ChaosLogger logger)
 {
     logger.Log("Hard coded MonkyeListProvider returning EC2Monkey");
         return new List<ParentMonkey>() { new EC2Monkey(settings, logger) };
 }
コード例 #7
0
 public IISServerMonkey(Settings settings,ChaosLogger logger)
     : base(settings,logger)
 {
 }
コード例 #8
0
ファイル: EC2Monkey.cs プロジェクト: Rahul-Sindhu/ChaosMonkey
 public EC2Monkey(Settings settings, ChaosLogger logger)
     : base(settings, logger)
 {
 }
コード例 #9
0
 /// <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);