Network check for MCC/MOS
- Network info gathering using DaemonSet with 'hostNetwork=True'
- DaemonSet handling routines
- Mapper and Checker refactoring for Kube
Fixes
- SSH timeouts handling using env vars
MCP_SSH_TIMEOUT when connecting
MCP_SCRIPT_RUN_TIMEOUT when running command
- Progress class supports 0 as an index
Related-PROD: PROD-36575
Change-Id: Ie03a9051007eeb788901acae3696ea2bfdfe33e2
diff --git a/cfg_checker/helpers/console_utils.py b/cfg_checker/helpers/console_utils.py
index 1a2c184..0cfdecf 100644
--- a/cfg_checker/helpers/console_utils.py
+++ b/cfg_checker/helpers/console_utils.py
@@ -16,8 +16,13 @@
new_size = len(note)
if self._note_size > new_size:
_suffix = ' '*(self._note_size - new_size)
- _percent = (100 * index) // self.total
- _index = (self.bar_size * index) // self.total
+ if index:
+ _percent = (100 * index) // self.total
+ _index = (self.bar_size * index) // self.total
+ else:
+ _percent = 0
+ _index = 0
+
# clear the line
sys.stdout.write('\r')
# print new progress