-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathconfig.go
More file actions
74 lines (70 loc) · 1.85 KB
/
config.go
File metadata and controls
74 lines (70 loc) · 1.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
// Copyright Mondoo, Inc. 2024, 2026
// SPDX-License-Identifier: BUSL-1.1
package config
import (
"go.mondoo.com/mql/v13/providers-sdk/v1/inventory"
"go.mondoo.com/mql/v13/providers-sdk/v1/plugin"
"go.mondoo.com/mql/v13/providers/vsphere/provider"
"go.mondoo.com/mql/v13/providers/vsphere/resources"
)
var Config = plugin.Provider{
Name: "vsphere",
ID: "go.mondoo.com/cnquery/v9/providers/vsphere",
Version: "13.0.4",
ConnectionTypes: []string{provider.ConnectionType},
Connectors: []plugin.Connector{
{
Name: "vsphere",
Use: "vsphere user@host",
Short: "a VMware vSphere installation",
Long: `Use the vsphere provider to query VMware vSphere installations.
Examples:
cnspec scan vsphere <USER>@<HOST> --askpass
cnspec shell vsphere <USER>@<HOST> --password <YOUR-PASSWORD>
`,
Discovery: []string{
resources.DiscoveryApi,
resources.DiscoveryInstances,
resources.DiscoveryHostMachines,
},
MinArgs: 1,
MaxArgs: 1,
Flags: []plugin.Flag{
{
Long: "ask-pass",
Type: plugin.FlagType_Bool,
Default: "false",
Desc: "Prompt for connection password",
ConfigEntry: "-",
},
{
Long: "password",
Short: "p",
Type: plugin.FlagType_String,
Default: "",
Desc: "Set the connection password",
Option: plugin.FlagOption_Password,
ConfigEntry: "-",
},
},
},
},
AssetUrlTrees: []*inventory.AssetUrlBranch{
{
PathSegments: []string{"technology=vmware"},
Key: "platform",
Title: "Platform",
Values: map[string]*inventory.AssetUrlBranch{
// redhat, arch, ...
"*": {
Key: "version",
Title: "Version",
Values: map[string]*inventory.AssetUrlBranch{
// any valid version for the OS
"*": nil,
},
},
},
},
},
}