Skip to content
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

rename group resources to conform to namespace standard #341

Merged
merged 3 commits into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dsc/assertion.dsc.resource.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/bundled/resource/manifest.json",
"type": "DSC/AssertionGroup",
"type": "Microsoft.DSC/Assertion",
"version": "0.1.0",
"description": "`test` will be invoked for all resources in the supplied configuration.",
"kind": "Group",
Expand Down
4 changes: 2 additions & 2 deletions dsc/examples/assertion.dsc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ resources:
keyPath: HKCU\example
_ensure: Present
dependsOn:
- "[resourceId('DSC/AssertionGroup','my assertions')]"
- "[resourceId('Microsoft.DSC/Assertion','my assertions')]"
- name: my assertions
type: DSC/AssertionGroup
type: Microsoft.DSC/Assertion
properties:
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/config/document.json
resources:
Expand Down
4 changes: 2 additions & 2 deletions dsc/examples/brew.dsc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/config/document.json
resources:
- name: assertions
type: DSC/AssertionGroup
type: Microsoft.DSC/Assertion
properties:
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/config/document.json
resources:
Expand All @@ -16,4 +16,4 @@ resources:
packageName: gitui
_exist: true
dependsOn:
- "[resourceId('DSC/AssertionGroup','assertions')]"
- "[resourceId('Microsoft.DSC/Assertion','assertions')]"
4 changes: 2 additions & 2 deletions dsc/examples/brew_uninstall.dsc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/config/document.json
resources:
- name: assertions
type: DSC/AssertionGroup
type: Microsoft.DSC/Assertion
properties:
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/config/document.json
resources:
Expand All @@ -16,4 +16,4 @@ resources:
packageName: gitui
_exist: false
dependsOn:
- "[resourceId('DSC/AssertionGroup','assertions')]"
- "[resourceId('Microsoft.DSC/Assertion','assertions')]"
8 changes: 4 additions & 4 deletions dsc/examples/groups.dsc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/config/document.json
resources:
- name: Last Group
type: DSC/Group
type: Microsoft.DSC/Group
properties:
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/config/document.json
resources:
Expand All @@ -11,9 +11,9 @@ resources:
properties:
output: Last
dependsOn:
- "[resourceId('DSC/Group','First Group')]"
- "[resourceId('Microsoft.DSC/Group','First Group')]"
- name: First Group
type: DSC/Group
type: Microsoft.DSC/Group
properties:
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/config/document.json
resources:
Expand All @@ -22,7 +22,7 @@ resources:
properties:
output: First
- name: Nested Group
type: DSC/Group
type: Microsoft.DSC/Group
properties:
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/config/document.json
resources:
Expand Down
4 changes: 2 additions & 2 deletions dsc/examples/parallel.dsc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ resources:
keyPath: HKLM\Software\Microsoft\Windows NT\CurrentVersion
valueName: SystemRoot
- name: myGroup
type: DSC/Group # each resource in this group would run in sequence
type: Microsoft.DSC/Group # each resource in this group would run in sequence
properties:
resources:
- name: current user registry
Expand All @@ -35,7 +35,7 @@ resources:
keyPath: HKCU\example2
_ensure: present
- name: mygroup
type: DSC/Group
type: Microsoft.DSC/Group
properties:
resources:
- name: myreg
Expand Down
2 changes: 1 addition & 1 deletion dsc/group.dsc.resource.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/bundled/resource/manifest.json",
"type": "DSC/Group",
"type": "Microsoft.DSC/Group",
"version": "0.1.0",
"description": "All resources in the supplied configuration is treated as a group.",
"kind": "Group",
Expand Down
2 changes: 1 addition & 1 deletion dsc/parallel.dsc.resource.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/bundled/resource/manifest.json",
"type": "DSC/ParallelGroup",
"type": "Microsoft.DSC/Parallel",
"version": "0.1.0",
"description": "All resources in the supplied configuration run concurrently.",
"kind": "Group",
Expand Down
6 changes: 3 additions & 3 deletions dsc/tests/dsc_group.tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ Describe 'Group resource tests' {
$out | Should -BeExactly @'
results:
- name: First Group
type: DSC/Group
type: Microsoft.DSC/Group
result:
- name: First
type: Test/Echo
result:
actualState:
output: First
- name: Nested Group
type: DSC/Group
type: Microsoft.DSC/Group
result:
- name: Nested First
type: Test/Echo
Expand All @@ -29,7 +29,7 @@ results:
actualState:
output: Nested Second
- name: Last Group
type: DSC/Group
type: Microsoft.DSC/Group
result:
- name: Last
type: Test/Echo
Expand Down
8 changes: 4 additions & 4 deletions dsc/tests/dsc_resource_list.tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ Describe 'Tests for listing resources' {
$LASTEXITCODE | Should -Be 0
$resources | Should -Not -BeNullOrEmpty
$resources.Count | Should -BeGreaterThan 0
$resources.type | Should -Contain 'DSC/AssertionGroup'
$resources.type | Should -Contain 'DSC/Group'
$resources.type | Should -Contain 'DSC/ParallelGroup'
$resources.type | Should -Contain 'Microsoft.DSC/Assertion'
$resources.type | Should -Contain 'Microsoft.DSC/Group'
$resources.type | Should -Contain 'Microsoft.DSC/Parallel'
$resources.type | Should -Contain 'Microsoft/OSInfo'
($resources | Where-Object { $_.type -eq 'DSC/Group' }).Kind | Should -BeExactly 'Group'
($resources | Where-Object { $_.type -eq 'Microsoft.DSC/Group' }).Kind | Should -BeExactly 'Group'
($resources | Where-Object { $_.type -eq 'Microsoft/OSInfo' }).Kind | Should -BeExactly 'Resource'
($resources | Where-Object { $_.type -eq 'Microsoft.DSC/PowerShell' }).Kind | Should -BeExactly 'Adapter'
}
Expand Down
Loading