mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 05:10:22 -07:00
win_dsc: improved parameter handling (#31556)
* win_dsc: improved parameter handling * removed uneeded try/catch leftover from testing * removed undeed return values * added custom DSC to fully test out casting * fix up codestyle issues * using new Requires ps version check * fixed up error message check on earlier ps version
This commit is contained in:
parent
55bc8291d6
commit
978a979566
14 changed files with 1127 additions and 313 deletions
|
@ -0,0 +1,44 @@
|
|||
xTestResource Version: 2.0.0
|
||||
|
||||
Ensure:
|
||||
Type: System.String
|
||||
Value: Present
|
||||
|
||||
StringParam:
|
||||
Type: System.String
|
||||
Value: string param
|
||||
|
||||
UInt32Param:
|
||||
Type: System.UInt32
|
||||
Value: 1000
|
||||
|
||||
UInt64Param:
|
||||
Type: System.UInt64
|
||||
Value: 1000000
|
||||
|
||||
StringArrayParam:
|
||||
Type: System.String[]
|
||||
Value: [ "string 1", "string 2" ]
|
||||
|
||||
UInt32ArrayParam:
|
||||
Type: System.UInt32[]
|
||||
Value: [ 1000, 2000 ]
|
||||
|
||||
UInt64ArrayParam:
|
||||
Type: System.UInt64[]
|
||||
Value: [ 1000000, 2000000 ]
|
||||
|
||||
BooleanParam:
|
||||
Type: System.Boolean
|
||||
Value: True
|
||||
|
||||
PSCredentialParam:
|
||||
Type: System.Management.Automation.PSCredential
|
||||
Username: username
|
||||
Password: password
|
||||
|
||||
CimInstanceParam:
|
||||
Type: Microsoft.Management.Infrastructure.CimInstance
|
||||
|
||||
CimInstanceArrayParam:
|
||||
Type: Microsoft.Management.Infrastructure.CimInstance[]
|
|
@ -0,0 +1,44 @@
|
|||
xTestResource Version: 1.0.0
|
||||
|
||||
Ensure:
|
||||
Type: System.String
|
||||
Value: Present
|
||||
|
||||
StringParam:
|
||||
Type: System.String
|
||||
Value: string param
|
||||
|
||||
UInt32Param:
|
||||
Type: System.UInt32
|
||||
Value: 1000
|
||||
|
||||
UInt64Param:
|
||||
Type: System.UInt64
|
||||
Value: 1000000
|
||||
|
||||
StringArrayParam:
|
||||
Type: System.String[]
|
||||
Value: [ "string 1", "string 2" ]
|
||||
|
||||
UInt32ArrayParam:
|
||||
Type: System.UInt32[]
|
||||
Value: [ 1000, 2000 ]
|
||||
|
||||
UInt64ArrayParam:
|
||||
Type: System.UInt64[]
|
||||
Value: [ 1000000, 2000000 ]
|
||||
|
||||
BooleanParam:
|
||||
Type: System.Boolean
|
||||
Value: True
|
||||
|
||||
PSCredentialParam:
|
||||
Type: System.Management.Automation.PSCredential
|
||||
Username: username
|
||||
Password: password
|
||||
|
||||
CimInstanceParam:
|
||||
Type: Microsoft.Management.Infrastructure.CimInstance
|
||||
|
||||
CimInstanceArrayParam:
|
||||
Type: Microsoft.Management.Infrastructure.CimInstance[]
|
Loading…
Add table
Add a link
Reference in a new issue