lib/vcloud-rest/vcloud/org.rb
def get_tasks_list(id)
      params = {
        'method' => :get,
        'command' => "/tasksList/#{id}"
      }

      response, headers = send_request(params)

      tasks = []

      response.css('Task').each do |task|
        id = task['href'].gsub(/.*\/task\//, "")
        operation = task['operationName']
        status = task['status']
        error = nil
        error = task.css('Error').first['message'] if task['status'] == 'error'
        start_time = task['startTime']
        end_time = task['endTime']
        user_canceled = task['cancelRequested'] == 'true'

        tasks << {
          :id => id,
          :operation => operation,
          :status => status,
          :error => error,
          :start_time => start_time,
          :end_time => end_time,
          :user_canceled => user_canceled
         }
      end
      tasks
    end
def get_tasks_list(id)
      params = {
        'method' => :get,
        'command' => "/tasksList/#{id}"
      }

      response, headers = send_request(params)

      tasks = []

      response.css('Task').each do |task|
        id = task['href'].gsub(/.*\/task\//, "")
        operation = task['operationName']
        status = task['status']
        error = nil
        error = task.css('Error').first['message'] if task['status'] == 'error'
        start_time = task['startTime']
        end_time = task['endTime']
        user_canceled = task['cancelRequested'] == 'true'

        tasks << {
          :id => id,
          :operation => operation,
          :status => status,
          :error => error,
          :start_time => start_time,
          :end_time => end_time,
          :user_canceled => user_canceled
         }
      end
      tasks
    end
def get_tasks_list ( id ) params = { 'method' => :get , 'command' => "/tasksList/#{id}" } response , headers = send_request ( params ) tasks = [ ] response . css ( 'Task' ) . each do | task | id = task [ 'href' ] . gsub ( / \/ \/ / , "" ) operation = task [ 'operationName' ] status = task [ 'status' ] error = nil error = task . css ( 'Error' ) . first [ 'message' ] if task [ 'status' ] == 'error' start_time = task [ 'startTime' ] end_time = task [ 'endTime' ] user_canceled = task [ 'cancelRequested' ] == 'true' tasks << { :id => id , :operation => operation , :status => status , :error => error , :start_time => start_time , :end_time => end_time , :user_canceled => user_canceled } end tasks end
Fetch tasks from a given task list

 Note: id can be retrieved using get_organization
Fetch tasks from a given task list