Commit graph

166 commits

Author SHA1 Message Date
e71f33878e
feat: updated cache implementation and fixed bugs 2025-06-20 14:14:38 -06:00
17dbfa2b3b
chore: added example to cmd/root.go 2025-06-20 14:13:55 -06:00
5d4095a0b6
Update cache cmd implementation 2025-06-17 22:05:47 -06:00
64cca78d24
refactor: updated cache editor implementation 2025-06-16 16:19:43 -06:00
95f0cd41e6
chore: made changes to build and fix issues 2025-06-01 14:41:06 -06:00
adec553c1b
chore: updated list cmd 2025-06-01 09:44:21 -06:00
5049399d17
chore: miscellaneous updates 2025-06-01 09:42:16 -06:00
4efb1eef9b
chore: removed login cmd 2025-06-01 09:40:39 -06:00
58eeef54dc
feat: added sessions cmd 2025-06-01 09:40:38 -06:00
b2111ddcb2
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-01 09:40:21 -06:00
d236649b05
chore: update references and imports 2025-06-01 09:38:16 -06:00
6063f28882
refactor: exported more cmd variables 2025-06-01 09:37:44 -06:00
94361eb774
feat: add default secret to local store 2025-06-01 09:35:58 -06:00
Alex Lovell-Troy
11f0cde59a
feat(secrets): implement SecretStore interface and StaticStore/LocalStore for credential management 2025-06-01 09:26:52 -06:00
4db28116af
refactor: moved internal functions to pkg and updated refs 2025-06-01 09:15:49 -06:00
c9086264d1
refactor: exported more cmd variables 2025-06-01 09:10:43 -06:00
d190f66705
cmd: exported scan and collect commands for external use 2025-05-30 21:58:50 -06:00
11b93f6b62
updated references in cmd/cache.go 2025-05-30 21:56:57 -06:00
85b4789b3f
updated all references 2025-05-30 21:56:54 -06:00
eb46dec118
Fixed removing from cache with --with-* flags 2025-05-30 11:03:17 -06:00
dc8addf062
Minor changes 2025-05-30 11:03:17 -06:00
f1a8a067d4
Added cache command and ability to delete cached assets 2025-05-30 11:03:16 -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
233be46bee
fix: changed persistent flags in collect to fix binding 2025-04-21 12:17:28 -06:00
Devon Bautista
a6bf6cc1b6
fix: clarify that override is temporary 2025-04-17 09:47:29 -06:00
Devon Bautista
9b887e4bdc
fix: only do it once 2025-04-17 09:43:03 -06:00
Devon Bautista
f6864bd3f5
fix: log override for local store too 2025-04-17 09:39:52 -06:00
Devon Bautista
db6d958934
fix: move BMC credentials getter that logs to util func 2025-04-16 22:42:19 -06:00
Devon Bautista
722345cf93
fix(collect): properly set secret when overriding with flags 2025-04-16 21:43:59 -06:00
Devon Bautista
9c8ea2575a
fix(collect): don;t require both creds flags 2025-04-16 17:31:20 -06:00
Devon Bautista
0deeb233f8
fix(collect): make sure secret store is set 2025-04-16 17:31:04 -06:00
Devon Bautista
1847a5ed41
fix: adjust secret store precedence in collect command 2025-04-16 16:33:07 -06:00
Devon Bautista
7cfca8c875
feat: add secret store support to update command 2025-04-16 16:33:07 -06: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
Devon Bautista
63dc2c07a6
chore: run gofmt 2025-04-14 16:37:20 -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
a47a71b039
cmd: allow short opts for username/password 2025-03-25 16:34:04 -06:00
667fd39213
lint: apply changes from golint 2025-03-25 14:54:09 -06:00
3a1fc3fe38
fix: added username/password to collect params 2025-03-25 14:15:39 -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
8f96a2f686
refactor: changed short opts for secret store 2025-03-24 14:29:16 -06:00
daa7a32b14
refactor: added basic input format and cleanup 2025-03-24 13:36:02 -06:00
34af75c1d2
refactor: change error message to warning 2025-03-24 11:35:37 -06:00
01a88beb97
fix: secrets remove not updating local store and return error when not found 2025-03-20 10:17:33 -06:00
17350ab99b
fix: changed number of minimum args for secrets list 2025-03-20 09:27:39 -06:00