Sha256: 28689392d686381de5e01812c9658c67d552a9244e8301957f67a569c47890a9

Contents?: true

Size: 805 Bytes

Versions: 10

Compression:

Stored size: 805 Bytes

Contents

require 'fog/core/collection'
require 'fog/compute/models/go_grid/password'

module Fog
  module GoGrid
    class Compute

      class Passwords < Fog::Collection

        model Fog::GoGrid::Compute::Password

        def all
          data = connection.support_password_list.body['list']
          load(data)
        end

        def bootstrap(new_attributes = {})
          password = create(new_attributes)
          password.wait_for { ready? }
          password
        end

        def get(id)
          #if server_id && server = connection.grid_server_get(server_id).body['list']
          if id && server = connection.support_password_get(id).body['list']
            new(server)
          end
        rescue Fog::GoGrid::Compute::NotFound
          nil
        end

      end

    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
fog-0.8.2 lib/fog/compute/models/go_grid/passwords.rb
fog-0.8.1 lib/fog/compute/models/go_grid/passwords.rb
fog-0.8.0 lib/fog/compute/models/go_grid/passwords.rb
fog-0.7.2 lib/fog/compute/models/go_grid/passwords.rb
fog-0.7.1 lib/fog/compute/models/go_grid/passwords.rb
fog-0.7.0 lib/fog/compute/models/go_grid/passwords.rb
fog-0.6.0 lib/fog/compute/models/go_grid/passwords.rb
fog-0.5.3 lib/fog/compute/models/go_grid/passwords.rb
fog-0.5.2 lib/fog/compute/models/go_grid/passwords.rb
fog-0.5.1 lib/fog/compute/models/go_grid/passwords.rb