/
GeneralChaosSetting.cs
56 lines (35 loc) · 1.47 KB
/
GeneralChaosSetting.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
using System;
using System.Collections.Generic;
using System.Linq;
namespace Duber.Infrastructure.Chaos
{
[Serializable]
public class GeneralChaosSetting
{
public bool Sentinel { get; set; }
public Guid Id { get; set; }
public bool AutomaticChaosInjectionEnabled { get; set; }
public bool ClusterChaosEnabled { get; set; }
public double ClusterChaosInjectionRate { get; set; }
public TimeSpan Frequency { get; set; }
public TimeSpan MaxDuration { get; set; }
public string SubscriptionId { get; set; }
public string TenantId { get; set; }
public string ClientId { get; set; }
public string ClientKey { get; set; }
public int PercentageNodesToRestart { get; set; }
public int PercentageNodesToStop { get; set; }
public string ResourceGroupName { get; set; }
public string VMScaleSetName { get; set; }
public ExecutionInformation ExecutionInformation { get; set; }
public List<OperationChaosSetting> OperationChaosSettings { get; set; }
public OperationChaosSetting GetSettingsFor(string operationKey) => OperationChaosSettings?.SingleOrDefault(i => i.OperationKey == operationKey);
}
[Serializable]
public class ExecutionInformation
{
public DateTimeOffset LastTimeExecuted { get; set; }
public DateTimeOffset ChaosStoppedAt { get; set; }
public bool MonkeysReleased { get; set; }
}
}