Dependencies on external, environmental (powershell) configuration is not consistently defined.
Expected Behavior
AS A user of the project
I WANT to have consistent method to identify module dependencies
SO THAT I can easily and quickly ensure my environment is configured correctly to use this module.
Current Behavior
Example from New-VesterConfig, lines 157 to 163:
# Secondary modules...PowerCLI doesn't do implicit module loading as of PCLI 6.5
# This is all the effort I'm willing to put into working around that right now
Try {
$Network = $Datacenter | Get-VDSwitch -Name $config.scope.vds -ErrorAction Stop
} Catch {
Write-Warning 'Get-VDSwitch failed. Have you manually imported module "VMware.VimAutomation.Vds"?'
}
Possible Solution
In no particular order:
- Update manifest file to include VMware.VimAutomation.Vds
- Add in to root module a version check, if 6.5.1 or later is install, do nothing, otherwise Import-Module VMware.VimAutomation.Vds
After one or both of the above is implemented, remove try/catch fro New-VesterConfig.
Context
As a user, this has had no negative impact to me.
As a contributor this has added complexity when reading through the code.
Your Environment
- Vester module version used: 1.2.0
- PowerCLI version: 6.5.3
- Pester version: 3.4.3
- Operating System and PowerShell version: Win10, 5.1
Dependencies on external, environmental (powershell) configuration is not consistently defined.
Expected Behavior
AS A user of the project
I WANT to have consistent method to identify module dependencies
SO THAT I can easily and quickly ensure my environment is configured correctly to use this module.
Current Behavior
Example from New-VesterConfig, lines 157 to 163:
Possible Solution
In no particular order:
After one or both of the above is implemented, remove try/catch fro New-VesterConfig.
Context
As a user, this has had no negative impact to me.
As a contributor this has added complexity when reading through the code.
Your Environment