Skip to content

Commit

Permalink
🐛 fix ipmi cli (#2010)
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-rock authored Oct 1, 2023
1 parent 606cfb4 commit df38b84
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
14 changes: 10 additions & 4 deletions providers/ipmi/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,15 @@ var Config = plugin.Provider{
ConnectionTypes: []string{provider.ConnectionType},
Connectors: []plugin.Connector{
{
Name: "ipmi",
Use: "ipmi",
Short: "Ipmi",
Name: "ipmi",
Use: "ipmi user@host",
Short: "Intelligent Platform Management Interface (IPMI)",
Long: `ipmi is designed for querying resources via the Intelligent Platform Management Interface (IPMI).
IPMI provides management and monitoring capabilities independently of the host system's CPU,
firmware (BIOS or UEFI), and operating system.
`,
MinArgs: 1,
MaxArgs: 1,
Discovery: []string{provider.ConnectionType},
Flags: []plugin.Flag{
{
Expand All @@ -32,7 +38,7 @@ var Config = plugin.Provider{
Short: "p",
Type: plugin.FlagType_String,
Default: "",
Desc: "Set the connection password for SSH.",
Desc: "Set the connection password for IPMI connection.",
Option: plugin.FlagOption_Password,
ConfigEntry: "-",
},
Expand Down
7 changes: 7 additions & 0 deletions providers/ipmi/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ import (
"go.mondoo.com/cnquery/providers/ipmi/provider"
)

// This is the entry point for the IPMI provider.
//
// To test the provider, start the simulator:
// docker run -d -p 623:623/udp vaporio/ipmi-simulator
//
// Once the simulator is running, you can query it:
// cnquery shell ipmi [email protected] --password 'ADMIN'
func main() {
plugin.Start(os.Args, provider.Init())
}
1 change: 0 additions & 1 deletion providers/ipmi/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ func (s *Service) ParseCLI(req *plugin.ParseCLIReq) (*plugin.ParseCLIRes, error)
}

// custom flag parsing

user := ""
port := 623
if len(req.Args) != 0 {
Expand Down

0 comments on commit df38b84

Please sign in to comment.