Refactor working with Networks and Pinger class
- Mapper moved to separate module
- Other modules can use Mapper to get desired networks
- salt_master is now a separate single instance
- Updated file handling on salt
- ping.py, an scripted flexible interface to ping command
multithreaded ping execution, 15 at once
- New commands in network: 'ping' and 'list'
- New error when runtime has no network listed in reclass
Fixes:
- Master node code handling
- Unknown node codes detection
- Proper node code search and handling
- File upload procedures updated
- Packages report fix
Change-Id: I5959210aed53b20b04b05ea880218e93239bb661
Related-PROD: PROD-28199
diff --git a/cfg_checker/common/salt_utils.py b/cfg_checker/common/salt_utils.py
index 2927e28..4dcbd30 100644
--- a/cfg_checker/common/salt_utils.py
+++ b/cfg_checker/common/salt_utils.py
@@ -189,6 +189,8 @@
class SaltRemote(SaltRest):
+ master_node = ""
+
def __init__(self):
super(SaltRemote, self).__init__()
@@ -362,7 +364,7 @@
"makedirs": makedirs
}
salt_output = self.cmd(
- "cfg01*",
+ self.master_node,
"file.touch",
param=path,
kwarg=_kwarg
@@ -376,7 +378,7 @@
_args = [path]
_args.extend(strings_list)
salt_output = self.cmd(
- "cfg01*",
+ self.master_node,
"file.write",
param=_args,
kwarg=_kwarg
@@ -428,7 +430,7 @@
"makedirs": makedirs
}
salt_output = self.cmd(
- "cfg01*",
+ self.master_node,
"file.manage_file",
param=_arg,
kwarg=_kwarg