Plan imports from published product inventories
This commit is contained in:
@@ -26,6 +26,8 @@ type RestoreReport struct {
|
||||
Plan RestorePlanSummary `json:"plan"`
|
||||
Execution RestoreExecutionStats `json:"execution"`
|
||||
Actions []RestoreReportAction `json:"actions"`
|
||||
Satisfied []string `json:"projected_satisfied,omitempty"`
|
||||
Remaining []string `json:"projected_remaining,omitempty"`
|
||||
reportPathRel string
|
||||
}
|
||||
|
||||
@@ -43,6 +45,7 @@ type RestoreExecutionStats struct {
|
||||
|
||||
type RestoreReportAction struct {
|
||||
Kind string `json:"kind"`
|
||||
SourceID string `json:"source_id,omitempty"`
|
||||
LocalRelativePath string `json:"local_relative_path"`
|
||||
RemoteKey string `json:"remote_key"`
|
||||
Reason string `json:"reason,omitempty"`
|
||||
@@ -72,11 +75,14 @@ func newRestoreReport(current *RemoteCurrentState, plan *RestorePlan, opts Resto
|
||||
SkipSame: plan.SkipSameCount,
|
||||
Conflicts: plan.ConflictCount,
|
||||
},
|
||||
Actions: make([]RestoreReportAction, 0, len(plan.Actions)),
|
||||
Actions: make([]RestoreReportAction, 0, len(plan.Actions)),
|
||||
Satisfied: append([]string(nil), plan.Satisfied...),
|
||||
Remaining: append([]string(nil), plan.Remaining...),
|
||||
}
|
||||
for _, action := range plan.Actions {
|
||||
r.Actions = append(r.Actions, RestoreReportAction{
|
||||
Kind: string(action.Kind),
|
||||
SourceID: action.SourceID,
|
||||
LocalRelativePath: action.LocalRelativePath,
|
||||
RemoteKey: action.RemoteKey,
|
||||
Reason: action.Reason,
|
||||
|
||||
Reference in New Issue
Block a user