-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Are there any plans or is anyone working on xFile? #260
Comments
@alx9r The built-in File resource in PSDesiredStateConfiguration cannot be open-sourced because it is built into DSC/Windows. There is no code/file I can provide to actually edit/see the resource. I've actually asked the team why we don't implement a more visible/testable version of File, and the answer they gave me for the moment was performance. The File resource needs to be able to perform super-fast so it is built-in the DSC/Windows code. If we could show that a not-built-in File resource still performs as well or better than the built-in one, they would consider replacing the built-in one by providing a new File in PSDscResources. But actually replacing the File resource would require extensive testing, review, and a very very strict schema Just provided here and not in PSDscResources won't really work either. The goal for this module is to move almost all the resources to a high quality resource module (PSDscResources) and then deprecate this module. I got the "ok" though that we could add a more flexible, testable, open-source "File" resource here as long as it has a different name (ex: xAdvancedFile, xAlternativeFile, xSuperFile...). Then we would consider later either moving it to a separate module or moving it to PSDscResources. (Or maybe eventually I could convince them that replacing the built-in File with it is an option if it was amazing and fit the exact schema they want...) |
@kwirkykat There might be another way to address my testability concerns: I'm having success testing the behavior of the other "PowerShell" |
@alx9r The implementation of File is actually a registered CIM class called MSFT_FileDirectoryConfiguration in the root/microsoft/windows/DesiredStateConfiguration namespace. The class then has the three static methods Get-TargetResource, Test-TargetResource, and Set-TargetResource which you can see under the class's See the "Calling a static method" section in this blog post for more info on how to class these static methods. |
@kwirkykat This means it's possible to test the File resource's behavior as a unit separate from the LCM. It seems like the Thanks very much for your help, Alex |
@alx9r I'm pretty sure you cannot access the CIM registry without privileged access. Sorry 😕 |
I relabeling this as resource proposal and help wanted if someone want to work on a "SuperFile" resource according to @kwirkykat's #260 (comment). |
PSDesiredStateConfiguration\File
is rather opaque to my usual Pester-based testing techniques, so I'm looking for a more testable implementation of a file resource. It seems that xFile would fit that bill but it is conspicuously missing from xPSDesiredStateConfiguration. The only mention of xFile I have found is in #202. It seems from that thread thatPSDesiredStateConfiguration\File
won't be open-sourced.I could implement a basic
xFile
but, while it would be more testable, I expect its capabilities would be much less thanPSDesiredStateConfiguration\File
. (Although that's hard for me to establish because it's closed.) I'd really rather contribute to an existingxFile
if one exists.Is anyone already working on
xFile
? If so, how can I get involved in that effort?If I implemented a basic xFile, is there a chance it would get accepted into
xPSDesiredStateConfiguration
?Thanks for your help,
Alex
The text was updated successfully, but these errors were encountered: