mirror of
https://github.com/davidallendj/magellan.git
synced 2025-12-20 03:27:03 -07:00
Changed saving host to include scheme for collect
This commit is contained in:
parent
7285492815
commit
dc07b5396b
2 changed files with 2 additions and 2 deletions
|
|
@ -58,7 +58,7 @@ func CollectInventory(assets *[]RemoteAsset, params *CollectParams) error {
|
||||||
done = make(chan struct{}, params.Concurrency+1)
|
done = make(chan struct{}, params.Concurrency+1)
|
||||||
chanAssets = make(chan RemoteAsset, params.Concurrency+1)
|
chanAssets = make(chan RemoteAsset, params.Concurrency+1)
|
||||||
outputPath = path.Clean(params.OutputPath)
|
outputPath = path.Clean(params.OutputPath)
|
||||||
smdClient = client.NewClient[client.SmdClient](
|
smdClient = client.NewClient(
|
||||||
client.WithSecureTLS[client.SmdClient](params.CaCertPath),
|
client.WithSecureTLS[client.SmdClient](params.CaCertPath),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -83,7 +83,7 @@ func ScanForAssets(params *ScanParams) []RemoteAsset {
|
||||||
if !params.DisableProbing {
|
if !params.DisableProbing {
|
||||||
assetsToAdd := []RemoteAsset{}
|
assetsToAdd := []RemoteAsset{}
|
||||||
for _, foundAsset := range foundAssets {
|
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)
|
res, _, err := client.MakeRequest(nil, url, http.MethodGet, nil, nil)
|
||||||
if err != nil || res == nil {
|
if err != nil || res == nil {
|
||||||
if params.Verbose {
|
if params.Verbose {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue