WahlNetwork / vester

Easily validate and remediate your vSphere configuration
https://wahlnetwork.com
Apache License 2.0
146 stars 45 forks source link

Use AST to pull a test's $Desired value #191

Open brianbunke opened 7 years ago

brianbunke commented 7 years ago

New-VesterConfig needs to ask each Vest what its config value should be named. To do this, I used RegEx. (I like RegEx, but this is true.)

To fix #178, I employed my new best friend, PowerShell's AST. Private function Get-VestConfigValue now handles this work. New-VesterConfig has been updated with the changes, and Set-VesterConfigValue has been updated to no longer expect the $Matches variable.

(.md files will merge in with the other PR)