-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
Description
Figure out the best way to handle global config, as well as plugin config.
Mind Map of Module Layout this is how the module is currently laid out.
Guidelines
- Simplicity - Make it as easy as possible to both run the report and develop a plugin
- Don't use numbers as a file prefix Like, never, for plugin/function names (it doesn't scale and it makes people guess on where they should start numbering for a new plugin)
- Scope - Keep plugin configuration limited to the scope of the plugin/plugin functions
- Configuration Flow - Make it easier to understand (and consume) configurations (variables) that are globally available for use/consumption by plugins
- Configuration Locality - Don't read/parsing strings at the top of files for config detail (too much can go wrong and it's kind of confusing) - come up with a standard plugin config file that can be imported to necessary plugin functions
- Connectivity - Plugins should inherit connectivity; try to keep any connection specific details out of plugins, aside from checking for connectivity (there may be some exceptions; if so, come up with a standard on how to handle in the plugin 'config file'
- Filtering - Offer the ability to filter based on common elements, such as:
- Datacenter
- Cluster
- VMHost
- VM name containing a certain string value
- Support for multiple endpoints - I know this is a heavy request, but as I work through hacking things apart and tracing dependencies, I'm thinking if we can stick to some of the points, above, we might be able to specify multiple endpoints (vCenter Servers, NSX Managers, etc.) in the global config file and when you would execute
Start-vCheckwe might could drop right into aforeachloop, or even execute in different .NET runspaces to maximize parallel execution. (my brain is thinking some like a.JSONfile that might look like the example, below (it's purely a spitball example):
Example Config File
[
{
"endpoint": [
{
"name": "vcenter01.example1.com",
"ipv4address": "192.168.1.10",
"type:": "vcenter",
"connection": {
"credentialPath": "",
"region": "nyc.payload1",
"tenant": "Example 1",
"description": "NYC payload-1 vcenter server"
},
"inventory": {
"datacenter": "",
"cluster": "",
"vmhost": "",
"vm": ""
}
},
{
"name": "vcenter02.example2.com",
"ipv4address": "192.168.1.11",
"type:": "vcenter",
"config": {
"credentialPath": "",
"region": "nyc.payload2",
"tenant": "Example 2",
"description": "NYC payload-2 vcenter server",
"inventory": {
"datacenter": "",
"cluster": "",
"vmhost": "",
"vm": ""
}
}
},
{
"name": "vnsxmgr01.example.com",
"ipv4address": "192.168.1.12",
"type:": "nsx",
"config": {
"credentialPath": "",
"region": "nyc.payload1",
"tenant": "Example",
"description": "NYC payload-1 nsx manager"
}
}
]
}
]Reactions are currently unavailable