Skip to content

Commit

Permalink
adding usage of DNF in Arista 4.30 and higher
Browse files Browse the repository at this point in the history
Differential Revision: D59270448

fbshipit-source-id: 4ae81e326262083fded5f97fa888c50d4e0d597b
  • Loading branch information
Peter Papucciu authored and facebook-github-bot committed Jul 2, 2024
1 parent 5ea6f19 commit cdb1dbf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions itchef/cookbooks/fb_helpers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,8 @@ your node.
* `node.aristaeos_4_28_or_newer?`
Is network switch running Arista EOS and OS version is 4.28 or newer

* `node.aristaeos_4_31_or_newer?`
Is network switch running Arista EOS and OS version is 4.31 or newer
* `node.aristaeos_4_30_or_newer?`
Is network switch running Arista EOS and OS version is 4.30 or newer

* `node.embedded?`
Is embedded Linux, implies 'node.aristaeos?'. These devices likely have
Expand Down
6 changes: 3 additions & 3 deletions itchef/cookbooks/fb_helpers/libraries/node_methods.rb
Original file line number Diff line number Diff line change
Expand Up @@ -540,8 +540,8 @@ def aristaeos_4_28_or_newer?
self.aristaeos? && self._self_version >= self._canonical_version('4.28')
end

def aristaeos_4_31_or_newer?
self.aristaeos? && self._self_version >= self._canonical_version('4.31')
def aristaeos_4_30_or_newer?
self.aristaeos? && self._self_version >= self._canonical_version('4.30')
end

def embedded?
Expand Down Expand Up @@ -1038,7 +1038,7 @@ def filesystem_data
# returns the version-release of an rpm installed, or nil if not present
def rpm_version(name)
if (self.centos? && !self.centos7?) || self.fedora? || self.redhat8? || self.oracle8? || self.redhat9? ||
self.oracle9? || self.aristaeos_4_31_or_newer?
self.oracle9? || self.aristaeos_4_30_or_newer?
# returns epoch.version
v = Chef::Provider::Package::Dnf::PythonHelper.instance.
package_query(:whatinstalled, name).version
Expand Down

0 comments on commit cdb1dbf

Please sign in to comment.