|
| 1 | +namespace sigtran.net.Core.Utilities; |
| 2 | + |
| 3 | +/// <summary> |
| 4 | +/// Describes an OpenSS7/IPSS7 interoperability execution blocker. |
| 5 | +/// </summary> |
| 6 | +public sealed class SigtranOpenSs7InteropBlocker |
| 7 | +{ |
| 8 | + /// <summary>Creates an OpenSS7/IPSS7 interoperability blocker record.</summary> |
| 9 | + /// <param name="environmentName">The lab environment where the blocker was observed.</param> |
| 10 | + /// <param name="logPath">The retained log path.</param> |
| 11 | + /// <param name="observedFailure">The observed failure summary.</param> |
| 12 | + /// <param name="requiredAction">The required action before retesting.</param> |
| 13 | + public SigtranOpenSs7InteropBlocker( |
| 14 | + string environmentName, |
| 15 | + string logPath, |
| 16 | + string observedFailure, |
| 17 | + string requiredAction) |
| 18 | + { |
| 19 | + EnvironmentName = string.IsNullOrWhiteSpace(environmentName) |
| 20 | + ? throw new ArgumentException("Environment name is required.", nameof(environmentName)) |
| 21 | + : environmentName; |
| 22 | + LogPath = string.IsNullOrWhiteSpace(logPath) |
| 23 | + ? throw new ArgumentException("OpenSS7 log path is required.", nameof(logPath)) |
| 24 | + : logPath; |
| 25 | + ObservedFailure = string.IsNullOrWhiteSpace(observedFailure) |
| 26 | + ? throw new ArgumentException("Observed failure is required.", nameof(observedFailure)) |
| 27 | + : observedFailure; |
| 28 | + RequiredAction = string.IsNullOrWhiteSpace(requiredAction) |
| 29 | + ? throw new ArgumentException("Required action is required.", nameof(requiredAction)) |
| 30 | + : requiredAction; |
| 31 | + } |
| 32 | + |
| 33 | + /// <summary>The lab environment where the blocker was observed.</summary> |
| 34 | + public string EnvironmentName { get; } |
| 35 | + |
| 36 | + /// <summary>The retained log path.</summary> |
| 37 | + public string LogPath { get; } |
| 38 | + |
| 39 | + /// <summary>The observed failure summary.</summary> |
| 40 | + public string ObservedFailure { get; } |
| 41 | + |
| 42 | + /// <summary>The required action before retesting.</summary> |
| 43 | + public string RequiredAction { get; } |
| 44 | + |
| 45 | + /// <summary>Whether the blocker prevents OpenSS7/IPSS7 commercial evidence promotion.</summary> |
| 46 | + public bool BlocksInteropPromotion => true; |
| 47 | + |
| 48 | + /// <summary>Formats a compact blocker summary.</summary> |
| 49 | + /// <returns>The blocker summary.</returns> |
| 50 | + public string Describe() |
| 51 | + { |
| 52 | + return $"{EnvironmentName}: {ObservedFailure}; action={RequiredAction}; log={LogPath}"; |
| 53 | + } |
| 54 | +} |
| 55 | + |
| 56 | +/// <summary> |
| 57 | +/// Provides OpenSS7/IPSS7 interoperability blocker evidence helpers. |
| 58 | +/// </summary> |
| 59 | +public static class SigtranOpenSs7InteropBlockerEvidence |
| 60 | +{ |
| 61 | + /// <summary>Creates the current retained OpenSS7/IPSS7 blocker evidence record.</summary> |
| 62 | + /// <returns>The current retained OpenSS7/IPSS7 blocker evidence record.</returns> |
| 63 | + public static SigtranOpenSs7InteropBlocker CreateCurrentBlocker() |
| 64 | + { |
| 65 | + return new( |
| 66 | + "WSL2 Ubuntu 24.04", |
| 67 | + "/home/ammar/sigtran-lab/artifacts/logs/openss7-configure.log", |
| 68 | + "OpenSS7 configure rejects Linux kernel major version 6 before peer runtime can start.", |
| 69 | + "Retest OpenSS7/IPSS7 on a compatible Linux kernel or patch the OpenSS7 kernel-version check with retained build evidence."); |
| 70 | + } |
| 71 | +} |
0 commit comments