Commit graph

32 commits

Author SHA1 Message Date
a6c445b86f
Add support for storage command and crawler output
Partially addresses issue #3 by adding a simple `magellan list devices` command to list storage devices. To close the issue, this PR still requires including storage device information in the `crawler`'s output.

Reviewed-on: towk/magellan-ng#5
2025-06-29 16:36:44 -06:00
1405b42f97
updated all references 2025-06-28 08:38:08 -06:00
David Allen
04e1fb26c9
Split the collect Command For Customization (#93)
* feat: initial implementation of command split

* feat: update collect and new send cmd

* chore: cleanup unused code

* chore: refactored getting username

* chore: more refactoring and cleanup

* feat: update send cmd implementation

* chore: changed/updated example config

* chore: made cmd more consistent and added formatting

* refactor: removed --host flag from scan

* chore: cleaned up and fixed issue with client

* chore: cleaned up CLI flags in collect cmd

* feat: updated crawl to include managers and output YAML optionally

* refactor: updated and improved send implementation

* refactor: minor improvements

* refactor: added util func to check for empty slices

* fix: issue with reading from stdin

* refactor: added scheme trimming function for URIs

* refactor: changed host arg back to positional

* refactor: removed unused vars and added --output-dir flag

* fix: make -f for secrets persistent

* refactor: removed --host flag and request in collect

* refactor: changed --output flag to --output-file

* fix: updated flags for collect

* fix: typo in crawler error

* fix: dir being created when outputDir not set

* fix: reading stdin and data args

* fix: made output using -v and -o consistent

* readme: added info about command split

* updated changelog adding missing version entries

* chore: updated example to use host as positional arg

* fix: issue with reading --data arg

* fix: remove unused import from collect pkg

Signed-off-by: Devon Bautista <devonb@lanl.gov>

---------

Signed-off-by: David Allen <16520934+davidallendj@users.noreply.github.com>
Signed-off-by: Devon Bautista <devonb@lanl.gov>
Co-authored-by: Devon Bautista <devonb@lanl.gov>
2025-05-29 15:15:46 -04:00
Devon Bautista
ad0708d2ad
refactor: split BMC data structures into pkg/bmc package 2025-04-16 16:33:06 -06:00
Devon Bautista
88bd791718
feat(crawl): improved logs; add partial credential overriding
The order of precedence is:

1. --username/--password
2. URI-specific credentials in store
3. Default credentials in store

The "partial" overriding means that specifying only one of --username or
--password will cause the crawl command to fetch the specific node
credentials for the BMC (falling back to the default) but override the
result with the value of the passed flag.

For instance,

magellan crawl <uri> --username foo

will fetch the username and password for <uri> in the secret store, but
override the username being sent to 'foo'. This does not change the
username stored in the secret store.
2025-04-14 16:37:34 -06:00
b9213c5fae
chore: updated error/warn messages to be more informative 2025-04-14 14:11:00 -06:00
82e1c45036
feat: add default secret to local store 2025-03-31 15:35:15 -06:00
c950532e88
refactor: improvements to CLI and update pkg 2025-03-28 13:12:38 -06:00
c88a29be00
refactor: added check for secretID in secrets store 2025-03-24 15:32:47 -06:00
67e2d40606
refactor: changed logging to use consistent JSON format 2025-03-24 14:43:34 -06:00
10b3f55b53
refactor: use vars for cred flags 2025-03-24 14:29:47 -06:00
7990ec097d
refactor: added flag to set secrets file for crawl 2025-03-20 09:11:21 -06:00
41346aebbb
refactor: changed to use local store with static store fallback 2025-03-20 08:59:48 -06:00
f18d279468
refactor: updated description/example and added 'secrets-file' flag to cmd 2025-03-17 10:37:04 -06:00
Alex Lovell-Troy
1f2e72dab6
feat(secrets): implement SecretStore interface and StaticStore/LocalStore for credential management 2025-03-07 17:10:31 -05:00
David Allen
fd54f367b8
cmd: exported commands for external use 2025-02-04 13:51:57 -07:00
e31e91ec15
refactor: changed crawler function name 2024-10-15 13:52:23 -06:00
David Allen
4597f63d12
Fixed issue with host string and added internal url package 2024-08-14 10:57:30 -06:00
David Allen
42dbfeb4f9
Fixed lint errors 2024-08-13 17:45:08 -06:00
David Allen
7285492815
Fixed root persistent flags not binding correctly 2024-08-13 14:44:11 -06:00
David Allen
81ec43a923
Minor changes to fix lint errors 2024-08-13 10:41:06 -06:00
David Allen
5a2356d7c2
Fixed crawl command help string 2024-08-12 16:35:58 -06:00
David Allen
3287d76588
Separated auth from util and fixed help strings 2024-08-12 13:05:28 -06:00
David Allen
2c841906b2
Updated 'cmd' package 2024-08-07 10:58:03 -06:00
David Allen
b27e6b6a73
Renamed vars and switched to use zerolog 2024-07-30 14:02:12 -06:00
David Allen
eba9dfa1e7
Added more documentation and changed param names 2024-07-22 14:22:02 -06:00
Alex Lovell-Troy
09eb48a241
Update crawl command to improve URI handling and provide clearer instructions 2024-07-02 16:55:17 -04:00
Alex Lovell-Troy
afe84f6129
chore: Clean up URI handling in crawl command 2024-07-02 16:37:39 -04:00
Alex Lovell-Troy
eccd9adb41
Improve crawl instruction and log Redfish Version 2024-07-02 16:25:28 -04:00
Alex Lovell-Troy
fdc574f5f2
Improved Error handling without panics 2024-07-01 13:53:32 -04:00
Alex Lovell-Troy
3386690f17
Add uri positional argument and remove uri flag 2024-07-01 10:59:42 -04:00
Alex Lovell-Troy
a7d5b0ebbb
Add standalone command for querying a single BMC and outputting inventory json 2024-06-27 08:56:45 +02:00