Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle modern memory output from Arista EOS 4.27+
Arista EOS 4.27+ (and possibly earlier versions, untested on 4.24-4.26) changes the output from `show processes top once` command, rendering values decimal numbers of MB instead of integer numbers of KB, and also reorders the fields. This commit extends the `get_environment` function with additional logic to handle the output from both older and newer OS versions. The memory expressed in MB is converted into KB for backward compatibility, but because the switch has done some rounding and displays only a limited number of decimal places, the conversion into KB will not be exact. There is nothing that Napalm can do about this. Includes test case for the new `show process top once` style output Fixes #1671
- Loading branch information