def _device_is_rebooting(self): command = dict(command="tmsh run /util bash -c 'runlevel'") result = run_commands(self.module, command) import q q.q(result) if any(x for x in result if '6' in x): return True return False
def _is_mprov_running_on_device(self): command = dict( command="tmsh run /util bash -c 'ps aux | grep \'[m]prov\''") result = run_commands(self.module, command) import q q.q(result) if any(x for x in result if len(x) > 1): return True return False
def execute_on_device(self, commands): result = run_commands(self.module, commands) return result