[SSHDConfig] Move filepath from metadata to properties#1577
Open
tgauth wants to merge 9 commits into
Open
Conversation
…nfig-filepath-property # Conflicts: # resources/sshdconfig/tests/sshdconfig.set.tests.ps1
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the sshdconfig DSC resource to treat the target sshd_config path as an input property (_filepath) rather than an item under _metadata, aligning configuration shape with how the path affects resource behavior (per #1570).
Changes:
- Replace
_metadata.filepathwith_filepathacross thesshdconfigresource schemas, Rust input parsing, and most Pester tests. - Update canonical-property handling to recognize
_filepathas a first-class canonical property. - Adjust get/set code paths to read/write and echo
_filepathrather than_metadata.
Reviewed changes
Copilot reviewed 14 out of 15 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| resources/sshdconfig/tests/sshdconfigRepeatList.tests.ps1 | Updates test inputs to pass _filepath instead of _metadata.filepath (some _metadata usages remain). |
| resources/sshdconfig/tests/sshdconfigRepeat.tests.ps1 | Updates test inputs to pass _filepath instead of _metadata.filepath (some _metadata usages remain). |
| resources/sshdconfig/tests/sshdconfig.set.tests.ps1 | Updates set-path tests to use _filepath inputs. |
| resources/sshdconfig/tests/sshdconfig.get.tests.ps1 | Updates get-path tests to use _filepath inputs. |
| resources/sshdconfig/sshd-subsystemList.dsc.resource.json | Moves the file path from _metadata.filepath to _filepath in the resource schema. |
| resources/sshdconfig/sshd-subsystem.dsc.resource.json | Moves the file path from _metadata.filepath to _filepath in the resource schema. |
| resources/sshdconfig/sshd_config.dsc.resource.json | Adds _filepath to the main sshd_config resource schema properties. |
| resources/sshdconfig/src/util.rs | Changes command-info construction to extract _filepath and build CommandInfo accordingly. |
| resources/sshdconfig/src/set.rs | Switches set flows to use cmd_info.filepath rather than cmd_info.metadata.filepath. |
| resources/sshdconfig/src/repeat_keyword.rs | Updates repeat-operation input structs to accept _filepath directly. |
| resources/sshdconfig/src/inputs.rs | Removes the Metadata struct and adds filepath: Option<PathBuf> directly to CommandInfo. |
| resources/sshdconfig/src/get.rs | Reads from cmd_info.filepath and emits _filepath in results when set. |
| resources/sshdconfig/src/canonical_properties.rs | Introduces _filepath as a canonical property (and removes _metadata). |
| Cargo.lock | Updates the lockfile (currently includes a version mismatch for dsc-resource-registry). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Summary
PR Context