DSC icon indicating copy to clipboard operation
DSC copied to clipboard

Python adapter

Open SteveL-MSFT opened this issue 1 year ago • 2 comments

Summary of the new feature / enhancement

To make DSC successful on Linux, we probably need a Python adapter. The key part is to keep it idiomatic Python.

Proposed technical implementation details (optional)

We could use Python classes with the same type of model as PowerShell classes with individual get(), set(), test(), export() methods and the class defines the schema that the adapter would validate against.

SteveL-MSFT avatar Oct 25 '24 21:10 SteveL-MSFT

It's probably a good idea to implement this as a python script that uses a module for defining and interacting with resources, so resource authors can leverage some shared code to define resources.

For example, we could define DscResource as an abstract class that authors could use - ensuring a common implementation surface that is documented and reusable. We could also provide the helpers for converting to/from JSON, emitting messages for DSC, retrieving manifest information, etc.

michaeltlombardi avatar Oct 29 '24 18:10 michaeltlombardi

Before finding this issue, I created the quick and dirty resource found in PR #1262. It's nowhere near production ready, but may be of some use.

EmperorArthur avatar Nov 14 '25 22:11 EmperorArthur