Beispiel #1
0
 def get_backupresult_info(self, sp_id, vm_id, _dc=None):
     result = []
     try:
         self.authenticate()
         restore_manager = RestoreService().getRestoreManager()
         result = restore_manager.get_backupresult_info(sp_id,vm_id)
         
     except Exception,ex:
         print_traceback()
         return dict({'success':False,'msg':to_str(ex).replace("'",'')})
Beispiel #2
0
 def restore_count(self, vm_id):
     self.authenticate()
     result = []
     try:
         restore_manager = RestoreService().getRestoreManager()
         result = restore_manager.restore_count(session['auth'],vm_id)
     except Exception,ex:
         err_desc = to_str(ex).replace("'",'')
         err_desc = err_desc.strip()
         LOGGER.error(err_desc)
         return "{success: false,msg: '" + err_desc + "'}"
Beispiel #3
0
 def get_vm_backups(self, vm_id, _dc=None):
     self.authenticate()
     result = []
     try:
         ent = session['auth'].get_entity(vm_id)
         parentent = ent.parents[0]
         grnd_parent = parentent.parents[0]
         sp_id = grnd_parent.entity_id
         restore_manager = RestoreService().getRestoreManager()
         
         result = restore_manager.get_vm_backups(sp_id,vm_id)
     except Exception,e:
         print_traceback()
         return dict({'success':False,'msg':to_str(e).replace("'",'')})