cs-codex-dist-tests/ProjectPlugins/CodexPlugin/CodexDeployment.cs

84 lines
3.1 KiB
C#
Raw Normal View History

2023-10-20 07:49:23 +00:00
using CodexContractsPlugin;
using GethPlugin;
using KubernetesWorkflow.Types;
namespace CodexPlugin
{
public class CodexDeployment
{
public CodexDeployment(CodexInstance[] codexInstances, GethDeployment gethDeployment,
CodexContractsDeployment codexContractsDeployment, RunningContainers? prometheusContainer,
RunningContainers? discordBotContainer, DeploymentMetadata metadata,
String id)
{
Id = id;
CodexInstances = codexInstances;
2023-09-20 10:02:32 +00:00
GethDeployment = gethDeployment;
2023-10-20 07:49:23 +00:00
CodexContractsDeployment = codexContractsDeployment;
PrometheusContainer = prometheusContainer;
2023-10-24 08:29:07 +00:00
DiscordBotContainer = discordBotContainer;
2023-06-23 07:08:18 +00:00
Metadata = metadata;
}
public String Id { get; }
public CodexInstance[] CodexInstances { get; }
2023-09-20 10:02:32 +00:00
public GethDeployment GethDeployment { get; }
2023-10-20 07:49:23 +00:00
public CodexContractsDeployment CodexContractsDeployment { get; }
public RunningContainers? PrometheusContainer { get; }
public RunningContainers? DiscordBotContainer { get; }
2023-06-23 07:08:18 +00:00
public DeploymentMetadata Metadata { get; }
}
public class CodexInstance
{
2024-03-26 07:58:16 +00:00
public CodexInstance(RunningContainers containers, DebugInfo info)
{
Containers = containers;
Info = info;
}
public RunningContainers Containers { get; }
2024-03-26 07:58:16 +00:00
public DebugInfo Info { get; }
}
2023-06-23 07:08:18 +00:00
public class DeploymentMetadata
{
public DeploymentMetadata(string name, DateTime startUtc, DateTime finishedUtc, string kubeNamespace,
int numberOfCodexNodes, int numberOfValidators, int storageQuotaMB, CodexLogLevel codexLogLevel,
int initialTestTokens, int minPrice, int maxCollateral, int maxDuration, int blockTTL, int blockMI,
int blockMN)
2023-06-23 07:08:18 +00:00
{
2023-10-23 08:19:52 +00:00
Name = name;
StartUtc = startUtc;
FinishedUtc = finishedUtc;
2023-06-23 07:08:18 +00:00
KubeNamespace = kubeNamespace;
NumberOfCodexNodes = numberOfCodexNodes;
NumberOfValidators = numberOfValidators;
StorageQuotaMB = storageQuotaMB;
CodexLogLevel = codexLogLevel;
InitialTestTokens = initialTestTokens;
MinPrice = minPrice;
MaxCollateral = maxCollateral;
MaxDuration = maxDuration;
BlockTTL = blockTTL;
BlockMI = blockMI;
BlockMN = blockMN;
2023-06-23 07:08:18 +00:00
}
2023-10-23 08:19:52 +00:00
public string Name { get; }
public DateTime StartUtc { get; }
public DateTime FinishedUtc { get; }
2023-06-23 07:08:18 +00:00
public string KubeNamespace { get; }
public int NumberOfCodexNodes { get; }
public int NumberOfValidators { get; }
public int StorageQuotaMB { get; }
public CodexLogLevel CodexLogLevel { get; }
public int InitialTestTokens { get; }
public int MinPrice { get; }
public int MaxCollateral { get; }
public int MaxDuration { get; }
public int BlockTTL { get; }
public int BlockMI { get; }
public int BlockMN { get; }
}
}