Sha256: c9ddb5cb0904516681b11ae88cfcdabaaa8aefda475b4199e65ae3b83740fd8f

Contents?: true

Size: 569 Bytes

Versions: 7

Compression:

Stored size: 569 Bytes

Contents

require 'fog/compute/models/ecloud/task'

module Fog
  module Compute
    class Ecloud

      class Tasks < Fog::Ecloud::Collection

        model Fog::Compute::Ecloud::Task

        attribute :href, :aliases => :Href

        def all
          check_href!
          if data = connection.get_task_list(href).body[:Task]
            load(data)
          end
        end

        def get(uri)
          if data = connection.get_task(uri)
            new(data.body)
          end
        rescue Fog::Errors::NotFound
          nil
        end

      end
    end
  end
end

Version data entries

7 entries across 7 versions & 3 rubygems

Version Path
brightbox-cli-0.13.1 lib/brightbox-cli/vendor/fog/lib/fog/compute/models/ecloud/tasks.rb
brightbox-cli-0.13.0 lib/brightbox-cli/vendor/fog/lib/fog/compute/models/ecloud/tasks.rb
fog-0.11.0 lib/fog/compute/models/ecloud/tasks.rb
fog-0.10.0 lib/fog/compute/models/ecloud/tasks.rb
fog4encbs-0.9.0.1 lib/fog/compute/models/ecloud/tasks.rb
fog4encbs-0.9.0 lib/fog/compute/models/ecloud/tasks.rb
fog-0.9.0 lib/fog/compute/models/ecloud/tasks.rb