def __get_object_class_from_uge_version(cls, uge_version, class_name, base_module_name=None):
     if not uge_version:
         raise InvalidRequest('Cannot generate %s object: UGE version must be specified.' % class_name)
     if uge_version not in UGE_RELEASE_OBJECT_MAP:
         raise AdvanceReservationException('Unsupported UGE version: %s.' % uge_version)
     release_map = UGE_RELEASE_OBJECT_MAP.get(uge_version)
     object_version = release_map.get(class_name)
     return cls.__get_object_class_from_object_version(object_version, class_name, base_module_name)
Example #2
0
 def wrapped_call(func, *args, **kwargs):
     try:
         result = func(*args, **kwargs)
         return result
     except AdvanceReservationException as ex:
         raise
     except Exception as ex:
         raise AdvanceReservationException(exception=ex)
Example #3
0
 def get_uge_version(self):
     if not self.uge_version:
         p = self.execute_qrdel('-help')
         lines = p.get_stdout().split('\n')
         if not len(lines):
             raise AdvanceReservationException('Cannot determine UGE version from output: %s' % p.get_stdout())
         self.uge_version = lines[0].split()[-1]
     return self.uge_version
Example #4
0
 def internal_call(func):
     @wraps(func)
     def wrapped_call(func, *args, **kwargs):
         try:
             result = func(*args, **kwargs)
             return result
         except AdvanceReservationException, ex:
             raise
         except Exception, ex:
             raise AdvanceReservationException(exception=ex)