Example #1
0
 public Slo(Dictionary <object, object> slo)
 {
     Name        = SloValidator.GetString(this.GetType().Name, slo, "name");
     SourceId    = SloValidator.GetString(this.GetType().Name, slo, "source-id");
     Description = SloValidator.GetString(this.GetType().Name, slo, "description");
     Namespace   = SloValidator.GetString(this.GetType().Name, slo, "namespace", false);
     Signal      = SloValidator.GetString(this.GetType().Name, slo, "signal");
     Window      = SloValidator.GetString(this.GetType().Name, slo, "window");
     Category    = SloValidator.GetString(this.GetType().Name, slo, "category", false);
     Targets     = SloTarget.ParseList(SloValidator.GetList(this.GetType().Name, slo, "targets"));
 }
Example #2
0
        public SloDataSource(Dictionary <object, object> dataSource)
        {
            Id   = SloValidator.GetString(this.GetType().Name, dataSource, "id");
            Type = SloValidator.GetString(this.GetType().Name, dataSource, "type");
            //AccountIds = SloDataSourceAccountId.ParseList(SloValidator.GetList(this.GetType().Name, dataSource, "accountids"));

            try
            {
                AccountIds = SloDataSourceAccountId.ParseList(SloValidator.GetList(this.GetType().Name, dataSource, "accountids"));
            }
            catch (Exception)
            {
                AccountIds = new List <SloDataSourceAccountId>();
            }
        }
Example #3
0
 public SloDataSource(Dictionary <object, object> dataSource)
 {
     Id         = SloValidator.GetString(this.GetType().Name, dataSource, "id");
     Type       = SloValidator.GetString(this.GetType().Name, dataSource, "type");
     AccountIds = SloDataSourceAccountId.ParseList(SloValidator.GetList(this.GetType().Name, dataSource, "accountids"));
 }
Example #4
0
 public SloGroup(Dictionary <object, object> sloGroup)
 {
     Name  = SloValidator.GetString(this.GetType().Name, sloGroup, "name");
     State = SloValidator.GetString(this.GetType().Name, sloGroup, "state");
     Slos  = Slo.ParseList(SloValidator.GetList(this.GetType().Name, sloGroup, "slos"));
 }