Skip to content

Commit

Permalink
Refactored glances.plugins.ip.PluginModel.update
Browse files Browse the repository at this point in the history
* part of #2801
* formatted into a dict; if input method is SNMP, returns default stats
* if input method is local, calls `get_stats_for_local_input`
* it has three steps:  `get_private_ipv4`, `get_first_ipv4`, `get_public_ipv4`.

Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
  • Loading branch information
Ariel Otilibili committed Nov 1, 2024
1 parent f12de66 commit 479d433
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions glances/plugins/ip/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ def update(self):
# Init new stats
stats = self.get_init_value()

# Revert

if self.input_method == 'local' and not import_error_tag:
# Private IP address
# Get the default gateway thanks to the netifaces lib
Expand Down

0 comments on commit 479d433

Please sign in to comment.