Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 fix ipmi cli #2010

Merged
merged 1 commit into from
Oct 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading