mirror of
https://github.com/davidallendj/magellan.git
synced 2025-12-20 11:37:01 -07:00
refactor: renamed funcs
This commit is contained in:
parent
e79d806341
commit
8fd48f0d13
2 changed files with 2 additions and 2 deletions
|
|
@ -36,7 +36,7 @@ var CollectCmd = &cobra.Command{
|
||||||
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.",
|
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.",
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
// get probe states stored in db from scan
|
// get probe states stored in db from scan
|
||||||
scannedResults, err := sqlite.GetScannedAssets(cachePath)
|
scannedResults, err := sqlite.GetRemoteAssets(cachePath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error().Err(err).Msgf("failed to get scanned results from cache")
|
log.Error().Err(err).Msgf("failed to get scanned results from cache")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -154,7 +154,7 @@ var ScanCmd = &cobra.Command{
|
||||||
// TODO: change this to use an extensible plugin system for storage solutions
|
// TODO: change this to use an extensible plugin system for storage solutions
|
||||||
// (i.e. something like cache.InsertScannedAssets(path, assets) which implements a Cache interface)
|
// (i.e. something like cache.InsertScannedAssets(path, assets) which implements a Cache interface)
|
||||||
if len(foundAssets) > 0 {
|
if len(foundAssets) > 0 {
|
||||||
err = sqlite.InsertScannedAssets(cachePath, foundAssets...)
|
err = sqlite.InsertRemoteAssets(cachePath, foundAssets...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error().Err(err).Msg("failed to write scanned assets to cache")
|
log.Error().Err(err).Msg("failed to write scanned assets to cache")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue