Changed saving host to include scheme for collect

This commit is contained in:
David Allen 2024-08-13 16:48:11 -06:00
parent 7285492815
commit dc07b5396b
No known key found for this signature in database
GPG key ID: 717C593FF60A2ACC
2 changed files with 2 additions and 2 deletions

View file

@ -58,7 +58,7 @@ func CollectInventory(assets *[]RemoteAsset, params *CollectParams) error {
done = make(chan struct{}, params.Concurrency+1)
chanAssets = make(chan RemoteAsset, params.Concurrency+1)
outputPath = path.Clean(params.OutputPath)
smdClient = client.NewClient[client.SmdClient](
smdClient = client.NewClient(
client.WithSecureTLS[client.SmdClient](params.CaCertPath),
)
)

View file

@ -83,7 +83,7 @@ func ScanForAssets(params *ScanParams) []RemoteAsset {
if !params.DisableProbing {
assetsToAdd := []RemoteAsset{}
for _, foundAsset := range foundAssets {
url := fmt.Sprintf("%s://%s:%d/redfish/v1/", params.Scheme, foundAsset.Host, foundAsset.Port)
url := fmt.Sprintf("%s:%d/redfish/v1/", foundAsset.Host, foundAsset.Port)
res, _, err := client.MakeRequest(nil, url, http.MethodGet, nil, nil)
if err != nil || res == nil {
if params.Verbose {