diff --git a/src/ZB.MOM.WW.ScadaBridge.DeploymentManager/DeploymentService.cs b/src/ZB.MOM.WW.ScadaBridge.DeploymentManager/DeploymentService.cs index 12141524..936f620f 100644 --- a/src/ZB.MOM.WW.ScadaBridge.DeploymentManager/DeploymentService.cs +++ b/src/ZB.MOM.WW.ScadaBridge.DeploymentManager/DeploymentService.cs @@ -1113,6 +1113,39 @@ public class DeploymentService return Result.Success(summary); } + /// + /// Bulk-deploys every instance in an area subtree — the area itself plus all + /// of its descendant areas — with exactly the rules of + /// (Disabled always skipped, up-to-date skipped + /// unless , not all-or-nothing). Gitea #40. + /// + /// The database ID of the subtree's root area. + /// The username initiating the deployment. + /// Deploy up-to-date instances too; never re-enables Disabled ones. + /// Cancellation token for the operation. + /// The same per-instance result matrix as a site deploy, or a failure when the area cannot be resolved. + public Task> DeployAreaAsync( + int areaId, + string user, + bool force = false, + CancellationToken cancellationToken = default) + => throw new NotImplementedException(); + + /// + /// Cheap pre-confirm counts for a site or area subtree deploy (Gitea #40): how + /// many instances the subtree holds and how many of those are Disabled. A DB + /// read only — no staleness probe. + /// + /// The site the subtree belongs to. + /// The subtree's root area, or null for the whole site. + /// Cancellation token for the operation. + /// The counts, or a failure when the site or area cannot be resolved. + public Task> PreviewSubtreeDeployAsync( + int siteId, + int? areaId, + CancellationToken cancellationToken = default) + => throw new NotImplementedException(); + /// /// True when a bulk site deploy should leave this instance alone because the /// site is already running the config it would be sent. @@ -2535,3 +2568,10 @@ public record SiteDeploymentSummary( int SuccessCount, int FailureCount, IReadOnlyList? SkippedInstances = null); + +/// +/// Pre-confirm counts for a site or area subtree bulk deploy (Gitea #40). +/// +/// Instances in the subtree. +/// Of those, the Disabled ones a bulk deploy always skips. +public record SubtreeDeployPreview(int Total, int Disabled);