public HasPlanResourceChange.Result <DscResResource> PlanChange( HasPlanResourceChange.Input <DscResResource> input) { var result = new HasPlanResourceChange.Result <DscResResource>(); result.PlannedState = input.ProposedNewState; result.PlannedPrivate = input.PriorPrivate; if (input.ChangeType == TFResourceChangeType.Delete) { _log.LogWarning("DELETE REQUESTED -- DSC Delete is still an unknown quantity -- WHAT DOES IT MEAN?"); } else if (input.ChangeType == TFResourceChangeType.Update) { if (!DscResTestConfig(result, input.Config)) { // These may need to be recomputed result.PlannedState.InDesiredState = null; result.PlannedState.RequiredReboot = null; result.PlannedState.Results = null; } } return(result); }
public HasPlanResourceChange.Result <PutResource> PlanChange( HasPlanResourceChange.Input <PutResource> input) { var result = new HasPlanResourceChange.Result <PutResource>(); LogInput(input); // _log.LogInformation("Got Inputs:"); // _log.LogInformation(" * ChangeType = {@ChangeType}", input.ChangeType); // _log.LogInformation(" * Config = {@Config}", input.Config); // _log.LogInformation(" * PriorState = {@PriorState}", input.PriorState); // _log.LogInformation(" * ProposedNewState = {@ProposedNewState}", input.ProposedNewState); // _log.LogInformation(" * PriorPrivate = {@PriorPrivate}", input.PriorPrivate); result.PlannedState = input.ProposedNewState; result.PlannedPrivate = input.PriorPrivate; LogResult(result); return(result); }