'Return an ORM compatible order_by using the given string'

def parse_order_by(self, order_by_string, default=None):

    if (order_by_string in ('create_time', 'create_time-dsc')):
        return desc(self.model_class.create_time)
    if (order_by_string == 'create_time-asc'):
        return asc(self.model_class.create_time)
    if (order_by_string in ('update_time', 'update_time-dsc')):
        return desc(self.model_class.update_time)
    if (order_by_string == 'update_time-asc'):
        return asc(self.model_class.update_time)
    if (order_by_string in ('name', 'name-asc')):
        return asc(self.model_class.name)
    if (order_by_string == 'name-dsc'):
        return desc(self.model_class.name)
    if (order_by_string in ('size', 'size-dsc')):
        return desc(self.model_class.disk_size)
    if (order_by_string == 'size-asc'):
        return asc(self.model_class.disk_size)
    if default:
        return self.parse_order_by(default)
    raise glx_exceptions.RequestParameterInvalidException('Unkown    order_by', order_by=order_by_string, available=['create_time', 'update_time', 'name', 'size'])
