mirror of
https://github.com/davidallendj/magellan.git
synced 2025-12-20 03:27:03 -07:00
Added more documentation and changed param names
This commit is contained in:
parent
c537e496da
commit
eba9dfa1e7
5 changed files with 46 additions and 59 deletions
|
|
@ -11,13 +11,16 @@ import (
|
|||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
// The `crawl` command walks a collection of Redfish endpoints to collect
|
||||
// specfic inventory detail. This command only expects host names and does
|
||||
// not require a scan to be performed beforehand.
|
||||
var crawlCmd = &cobra.Command{
|
||||
Use: "crawl [uri]",
|
||||
Use: "crawl [uri]",
|
||||
Short: "Crawl a single BMC for inventory information",
|
||||
Long: "Crawl a single BMC for inventory information\n" +
|
||||
"\n" +
|
||||
"Example:\n" +
|
||||
" magellan crawl https://bmc.example.com",
|
||||
Short: "Crawl a single BMC for inventory information",
|
||||
Args: func(cmd *cobra.Command, args []string) error {
|
||||
// Validate that the only argument is a valid URI
|
||||
if err := cobra.ExactArgs(1)(cmd, args); err != nil {
|
||||
|
|
|
|||
|
|
@ -34,6 +34,12 @@ var (
|
|||
var scanCmd = &cobra.Command{
|
||||
Use: "scan",
|
||||
Short: "Scan for BMC nodes on a network",
|
||||
Long: "Perform a net scan by attempting to connect to each host and port specified and getting a response. " +
|
||||
"If the '--disable-probe` flag is used, the tool will not send another request to probe for available " +
|
||||
"Redfish services.\n\n" +
|
||||
"Example:\n" +
|
||||
" magellan scan --subnet 172.16.0.0/24 --add-host 10.0.0.101\n" +
|
||||
" magellan scan --subnet 172.16.0.0 --subnet-mask 255.255.255.0 --cache ./assets.db",
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
var (
|
||||
hostsToScan []string
|
||||
|
|
|
|||
|
|
@ -33,8 +33,8 @@ var updateCmd = &cobra.Command{
|
|||
Preferred: "redfish",
|
||||
Protocol: protocol,
|
||||
Host: host,
|
||||
User: username,
|
||||
Pass: password,
|
||||
Username: username,
|
||||
Password: password,
|
||||
Timeout: timeout,
|
||||
Port: port,
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue