Skip to content

Commit e59ee6e

Browse files
committed
docs: updated examples in cmd
1 parent fe25cfc commit e59ee6e

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

cmd/collect.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,14 @@ var CollectCmd = &cobra.Command{
3939
// run a collect using secrets from the secrets manager
4040
export MASTER_KEY=$(magellan secrets generatekey)
4141
magellan secrets store $node_creds_json -f nodes.json
42-
magellan collect -o nodes.yaml`,
42+
magellan collect -o nodes.yaml
43+
44+
// Take the output of 'scan' and input directly into 'collect'
45+
magellan scan --subnet 172.18.0.0/24 --port 5000 -l info -i -F json | ./magellan collect -f json --show-output -i
46+
47+
// Complete flow combined as a single line
48+
magellan scan --subnet 172.18.0.0/24 --port 5000 -l info -i -F json | ./magellan collect -f json --show-output -i | magellan send https://smd.example.com
49+
`,
4350
Short: "Collect system information by interrogating BMC node",
4451
Long: "Send request(s) to a collection of hosts running Redfish services found stored from the 'scan' in cache.\nSee the 'scan' command on how to perform a scan.",
4552
Run: func(cmd *cobra.Command, args []string) {

cmd/scan.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ var ScanCmd = &cobra.Command{
5151
// assumes subnet using HTTPS and port 443 with specified CIDR
5252
magellan scan --subnet 10.0.0.0/16 -i
5353
54+
// same as above example but output is in JSON without caching
55+
magellan scan --subnet 10.0.0.0/16 -i -f json --disable-cache
56+
5457
// assumes subnet using HTTP and port 5000 similar to 192.168.0.0/16
5558
magellan scan --subnet 192.168.0.0 --protocol tcp --scheme https --port 5000 --subnet-mask 255.255.0.0
5659

0 commit comments

Comments
 (0)