Sha256: 5e1fdd9cd1faa8e7ea0a6267ec99689ad0b8f14ab1474ab83a05e73dc4c71fb8

Contents?: true

Size: 706 Bytes

Versions: 15

Compression:

Stored size: 706 Bytes

Contents

require 'fog/core/collection'
require 'fog/joyent/models/compute/server'

module Fog
  module Compute

    class Joyent
      class Servers < Fog::Collection
        model Fog::Compute::Joyent::Server

        def all
          load(self.connection.list_machines().body)
        end

        def create(params = {})
          data = self.connection.create_machine(params).body
          server = new(data)
          server.wait_for { ready? }
          server
        end

        def bootstrap
          # XXX TOXO
        end

        def get(machine_id)
          data = self.connection.get_machine(machine_id).body
          new(data)
        end

      end
    end # Joyent

  end # Compute
end # Fog

Version data entries

15 entries across 15 versions & 7 rubygems

Version Path
fog-parser-fix-1.6.1 lib/fog/joyent/models/compute/servers.rb
fog-test-again-1.6.0 lib/fog/joyent/models/compute/servers.rb
fog-parser-fix-1.6.0 lib/fog/joyent/models/compute/servers.rb
fog-1.6.0 lib/fog/joyent/models/compute/servers.rb
fog-1.5.0 lib/fog/joyent/models/compute/servers.rb
fog-1.4.0 lib/fog/joyent/models/compute/servers.rb
brightbox-cli-0.18.1 lib/brightbox-cli/vendor/fog/lib/fog/joyent/models/compute/servers.rb
michiels-fog-1.3.1 lib/fog/joyent/models/compute/servers.rb
ftl-0.2.0 vendor/bundle/gems/fog-1.3.1/lib/fog/joyent/models/compute/servers.rb
brightbox-cli-0.18.0 lib/brightbox-cli/vendor/fog/lib/fog/joyent/models/compute/servers.rb
fog-1.3.1 lib/fog/joyent/models/compute/servers.rb
fog-1.3.0 lib/fog/joyent/models/compute/servers.rb
brightbox-cli-0.17.5 lib/brightbox-cli/vendor/fog/lib/fog/joyent/models/compute/servers.rb
fog-1.2.0 lib/fog/joyent/models/compute/servers.rb
ktheory-fog-1.1.2 lib/fog/joyent/models/compute/servers.rb