Skip nodes functionality for Package and Network modules
Added to main entrypoint
- Skip nodes using simple argument with '*' as a trailing wildcard
- Skip nodes using file list
Usability improovement
- Node list preview in status line
- Node stats alignment in net report
Minor fixes:
- Python version detection (3.5+)
- Node counter for each status
- Proper node skip handling
Change-Id: I086ef501bc06f0e739df25349257f1c63a2e2fcf
Related-PROD: PROD-35009
diff --git a/cfg_checker/modules/network/pinger.py b/cfg_checker/modules/network/pinger.py
index 0500284..5b12a94 100644
--- a/cfg_checker/modules/network/pinger.py
+++ b/cfg_checker/modules/network/pinger.py
@@ -10,10 +10,21 @@
# This is independent class with a salt.nodes input
class NetworkPinger(object):
- def __init__(self, mtu=None, detailed=False, errors_class=None):
+ def __init__(
+ self,
+ mtu=None,
+ detailed=False,
+ errors_class=None,
+ skip_list=None,
+ skip_list_file=None
+ ):
logger_cli.info("# Initializing")
# all active nodes in the cloud
- self.target_nodes = salt_master.get_nodes()
+ self.target_nodes = salt_master.get_nodes(
+ skip_list=skip_list,
+ skip_list_file=skip_list_file
+ )
+
# default MTU value
self.target_mtu = mtu if mtu else 64
# only data