mirror of
https://github.com/davidallendj/magellan.git
synced 2025-12-20 11:37:01 -07:00
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
This commit is contained in:
parent
f02c29917a
commit
a6c445b86f
20 changed files with 449 additions and 18 deletions
|
|
@ -14,6 +14,9 @@ type BMCCredentials struct {
|
|||
|
||||
func GetBMCCredentialsDefault(store secrets.SecretStore) (BMCCredentials, error) {
|
||||
var creds BMCCredentials
|
||||
if store == nil {
|
||||
return creds, fmt.Errorf("invalid secrets store")
|
||||
}
|
||||
if strCreds, err := store.GetSecretByID(secrets.DEFAULT_KEY); err != nil {
|
||||
return creds, fmt.Errorf("get default BMC credentials from secret store: %w", err)
|
||||
} else {
|
||||
|
|
@ -27,6 +30,9 @@ func GetBMCCredentialsDefault(store secrets.SecretStore) (BMCCredentials, error)
|
|||
|
||||
func GetBMCCredentials(store secrets.SecretStore, id string) (BMCCredentials, error) {
|
||||
var creds BMCCredentials
|
||||
if store == nil {
|
||||
return creds, fmt.Errorf("invalid secrets store")
|
||||
}
|
||||
if strCreds, err := store.GetSecretByID(id); err != nil {
|
||||
return creds, fmt.Errorf("get BMC credentials from secret store: %w", err)
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue