Configure CertificateCheckUrl per container for curl-like TLS checks, classify Sonic permission errors, and extend setup wizard for container management. Co-authored-by: Cursor <cursoragent@cursor.com>
79 lines
2.0 KiB
C#
79 lines
2.0 KiB
C#
namespace ZA.CoreService.ESBCertificateManager.Models;
|
|
|
|
public sealed class CompanyOption
|
|
{
|
|
public int CompanyId { get; init; }
|
|
|
|
public required string CompanyCode { get; init; }
|
|
|
|
public required string CompanyName { get; init; }
|
|
|
|
public override string ToString()
|
|
{
|
|
return $"{CompanyCode} — {CompanyName}";
|
|
}
|
|
}
|
|
|
|
public sealed class ContainerOption
|
|
{
|
|
public int SonicContainerId { get; init; }
|
|
|
|
public int SonicConnectionId { get; init; }
|
|
|
|
public int CompanyId { get; init; }
|
|
|
|
public required string ContainerName { get; init; }
|
|
|
|
public string? ContainerDisplayName { get; init; }
|
|
|
|
/// <summary>
|
|
/// Endpoint für TLS-Zertifikatsprüfung, z. B. https://host:8443 oder host:8443.
|
|
/// </summary>
|
|
public string? CertificateCheckUrl { get; init; }
|
|
|
|
public required string CompanyCode { get; init; }
|
|
|
|
public required string ConnectionName { get; init; }
|
|
|
|
public int RestartTimeoutSeconds { get; init; }
|
|
|
|
public override string ToString()
|
|
{
|
|
string display =
|
|
string.IsNullOrWhiteSpace(ContainerDisplayName)
|
|
? ContainerName
|
|
: ContainerDisplayName;
|
|
|
|
return $"{CompanyCode} / {display} ({ConnectionName})";
|
|
}
|
|
}
|
|
|
|
public sealed class CertificateTargetOption
|
|
{
|
|
public int CertificateTargetId { get; init; }
|
|
|
|
public int SonicContainerId { get; init; }
|
|
|
|
public required string TargetDirectory { get; init; }
|
|
|
|
public required string TargetFileName { get; init; }
|
|
|
|
public bool BackupEnabled { get; init; }
|
|
|
|
public required string BackupDirectoryName { get; init; }
|
|
|
|
public required string ContainerName { get; init; }
|
|
|
|
public required string ConnectionName { get; init; }
|
|
|
|
public required string CompanyCode { get; init; }
|
|
|
|
public string FullTargetPath =>
|
|
Path.Combine(TargetDirectory, TargetFileName);
|
|
|
|
public override string ToString()
|
|
{
|
|
return $"{CompanyCode} / {ContainerName}: {FullTargetPath}";
|
|
}
|
|
}
|