Skip to content

Commit

Permalink
🐛 fix aristia platform detection to include version and arch (#1917)
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-rock authored Sep 25, 2023
1 parent 84144b2 commit fd9577f
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions providers/arista/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,21 @@ func (s *Service) detect(asset *inventory.Asset, conn *connection.AristaConnecti
asset.Id = conn.Conf.Type
asset.Name = conn.Conf.Host

version := ""
arch := ""
aristaVersion, err := conn.GetVersion()
if err == nil {
version = aristaVersion.Version
arch = aristaVersion.Architecture
}

asset.Platform = &inventory.Platform{
Name: "arista",
Family: []string{"arista"},
Kind: "api",
Title: "Arista EOS",
Name: "arista-eos",
Version: version,
Arch: arch,
Family: []string{"arista"},
Kind: "api",
Title: "Arista EOS",
}

id, err := conn.Identifier()
Expand Down

0 comments on commit fd9577f

Please sign in to comment.