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/common/other.py b/cfg_checker/common/other.py
index a385b90..5a4c552 100644
--- a/cfg_checker/common/other.py
+++ b/cfg_checker/common/other.py
@@ -126,20 +126,20 @@
else:
raise ConfigException(_message)
- def get_nodes_list(self, env, nodes_list):
+ def get_nodes_list(self, nodes_list, env_sting=None):
_list = []
- if env is None:
+ if env_sting is None:
# nothing supplied, use the one in repo
try:
if not nodes_list:
return []
- with open(os.path.join(pkg_dir, nodes_list)) as _f:
+ with open(nodes_list) as _f:
_list.extend(_f.read().splitlines())
except IOError as e:
raise ConfigException("# Error while loading file, '{}': "
"{}".format(e.filename, e.strerror))
else:
- _list.extend(self.node_string_to_list(env))
+ _list.extend(self.node_string_to_list(env_sting))
# validate names
_invalid = []
@@ -151,7 +151,7 @@
else:
_valid.append(_name)
- return _valid
+ return _valid, _invalid
utils = Utils()