def completed_step(self, id, phase, stdout, stderr, exitcode): try: method = get_dlp_method(phase) except KeyError: logging.getLogger().warn("Method %s not declared" % phase) return False else: return xmlrpcCleanup(MscDispatcher().run_proxymethod( "dlp", id, method, (exitcode, stdout, stderr), True))
def ping_client(self, uuid, fqdn, shortname, ips, macs, netmasks): client = chooseClientIP({ 'uuid': uuid, 'fqdn': fqdn, 'shortname': shortname, 'ips': ips, 'macs': macs, 'netmasks': netmasks }) if client: return MscDispatcher().launchers_provider.ping_client(client) else: return self._nok()
def extend_command(self, id, start_date, end_date): return MscDispatcher().extend_command(id, start_date, end_date)
def stop_command(self, id): return MscDispatcher().stop_commands([id])
def stop_commands(self, ids): return MscDispatcher().stop_commands(ids)
def start_command(self, id): return MscDispatcher().start_commands_on_host([id])
def start_commands(self, ids): return MscDispatcher().start_commands_on_host(ids)
def start_these_commands(self, ids): return MscDispatcher().start_commands(ids)
def start_all_commands(self): return MscDispatcher().start_commands()
def tcp_sproxy(self, uuid, fqdn, shortname, ips, macs, netmasks, requestor_ip, requested_port): return MscDispatcher().launchers_provider.establish_proxy( uuid, fqdn, shortname, ips, macs, netmasks, requestor_ip, requested_port)
def download_file(self, uuid, fqdn, shortname, ips, macs, netmasks, path, bwlimit): return MscDispatcher().launchers_provider.download_file( uuid, fqdn, shortname, ips, macs, netmasks, path, bwlimit)
def extend_command(self, id, start_date, end_date): return MscDispatcher().extend_command(id, start_date, end_date) ### XMLRPC functions used from a launcher ### def tell_i_am_alive(self, launcher): logging.getLogger().info("Launcher %s tells us it is alive" % launcher) return True def completed_quick_action(self, launcher, (exitcode, stdout, stderr), id, from_dlp=False): return MscDispatcher().run_proxymethod(launcher, id, "completed_quick_action", (exitcode, stdout, stderr), from_dlp) def completed_push(self, launcher, (exitcode, stdout, stderr), id, from_dlp=False): return MscDispatcher().run_proxymethod(launcher, id, "completed_push", (exitcode, stdout, stderr), from_dlp) def completed_pull(self, launcher, (exitcode, stdout, stderr), id,