Esempio n. 1
0
 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))
Esempio n. 2
0
 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()
Esempio n. 3
0
 def extend_command(self, id, start_date, end_date):
     return MscDispatcher().extend_command(id, start_date, end_date)
Esempio n. 4
0
 def stop_command(self, id):
     return MscDispatcher().stop_commands([id])
Esempio n. 5
0
 def stop_commands(self, ids):
     return MscDispatcher().stop_commands(ids)
Esempio n. 6
0
 def start_command(self, id):
     return MscDispatcher().start_commands_on_host([id])
Esempio n. 7
0
 def start_commands(self, ids):
     return MscDispatcher().start_commands_on_host(ids)
Esempio n. 8
0
 def start_these_commands(self, ids):
     return MscDispatcher().start_commands(ids)
Esempio n. 9
0
 def start_all_commands(self):
     return MscDispatcher().start_commands()
Esempio n. 10
0
 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)
Esempio n. 11
0
 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)
Esempio n. 12
0
    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,