def clean(self): logging.debug("Killall ovsdb-server") utils.signal_program("ovsdb-server") if (utils.program_is_alive("ovsdb-server")): utils.signal_program("ovsdb-server", signal.SIGKILL) logging.debug("Killall ovs-vswitchd") utils.signal_program("ovs-vswitchd") if (utils.program_is_alive("ovs-vswitchd")): utils.signal_program("ovs-vswitchd", signal.SIGKILL)
def check_switch_daemon(self): """ Check if OVS daemon is started correctly. """ working = utils.program_is_alive("ovs-vswitchd", self.pid_files_path) if not working: logging.error("OpenVSwitch switch daemon with PID in file %s" " not working.", self.ovs_pidfile) return working