PowerShell / PSDesiredStateConfiguration

Source for https://www.powershellgallery.com/packages/PSDesiredStateConfiguration module
MIT License
56 stars 14 forks source link

DSC should ship Reasons class #110

Open ThomasNieto opened 1 year ago

ThomasNieto commented 1 year ago

Prerequisites

Steps to reproduce

PSDSC should ship a Reasons class so each DSC resource module doesn't need to define it. It would also address the issue with Reasons type name conflict issues. Backstory: https://github.com/AnyPackage/AnyPackageDsc/issues/12

Expected behavior

# DSC should ship `Reasons` type.

Actual behavior

# No Reasons type

Error details

No response

Environment data

7.2-preview 2

Version

2.0.6

Visuals

No response

michaeltlombardi commented 1 year ago

The long-term alternative to this (that I think is more idiomatic, because the implementation of Reasons inherently conflates Get and Test) is to add support for reporting how a DSC Resource is out-of-state via the Test method.

In the short-term, I've been updating the documentation^1 to recommend any module implementing Reasons use the module's name as a prefix in the class name.