Beispiel #1
0
 def _reinstall_os(self, vps_id, _vps=None, os_id=None, vps_image=None):
     try:
         vpsops = VPSOps(self.logger)
         xv = None
         if _vps:
             xv = XenVPS(_vps.id)
             self.setup_vps(xv, _vps)
         vpsops.reinstall_os(vps_id, xv, os_id, vps_image)
         if _vps:
             self.done_task(Cmd.OS, vps_id, True)
         return True
     except Exception, e:
         self.logger_err.exception("for %s: %s" % (str(vps_id), str(e)))
         if _vps:
             self.done_task(Cmd.OS, vps_id, False, "error," + str(e))
         return False
Beispiel #2
0
 def _reinstall_os (self, vps_id, _vps=None, os_id=None, vps_image=None):
     try:
         vpsops = VPSOps (self.logger)
         xv = None
         if _vps:
             xv = XenVPS (_vps.id)
             self.setup_vps (xv, _vps)
         vpsops.reinstall_os (vps_id, xv, os_id, vps_image)
         if _vps:
             self.done_task (Cmd.OS, vps_id, True)
         return True
     except Exception, e:
         self.logger_err.exception ("for %s: %s" % (str(vps_id), str(e)))
         if _vps:
             self.done_task (Cmd.OS, vps_id, False, "error," +str(e))
         return False