Parsing Ping return codes and saving iteration details
- ping command detects error types and saves events
- exit on no packets to send
- ping now uses runtime map (as reclass can have DHCP set)
Change-Id: Iad66bd90d0c5a43e04fd785f02f8e1c2769dda62
Related-PROD: PROD-28199
diff --git a/cfg_checker/modules/packages/repos.py b/cfg_checker/modules/packages/repos.py
index 334cbb5..025703e 100644
--- a/cfg_checker/modules/packages/repos.py
+++ b/cfg_checker/modules/packages/repos.py
@@ -821,29 +821,19 @@
# <10symbols> \t <md5> \t sorted headers with no tag
# ...
# section
- _ss = _p.keys()
- _ss.sort()
- for _s in _ss:
- _apps = _p[_s].keys()
- _apps.sort()
+ for _s in sorted(_p):
# app
- for _a in _apps:
+ for _a in sorted(_p[_s]):
_o = ""
_mm = []
# get and sort tags
- _vs = _p[_s][_a].keys()
- _vs.sort()
- for _v in _vs:
+ for _v in sorted(_p[_s][_a]):
_o += "\n" + " "*8 + _v + ':\n'
# get and sort tags
- _mds = _p[_s][_a][_v].keys()
- _mds.sort()
- for _md5 in _mds:
+ for _md5 in sorted(_p[_s][_a][_v]):
_o += " "*16 + _md5 + "\n"
# get and sort repo headers
- _rr = _p[_s][_a][_v][_md5].keys()
- _rr.sort()
- for _r in _rr:
+ for _r in sorted(_p[_s][_a][_v][_md5]):
_o += " "*24 + _r.replace('_', ' ') + '\n'
_m = _p[_s][_a][_v][_md5][_r]["maintainer"]
if _m not in _mm: