Sha256: 2200586d65378494e449908d6f03367a31b2eddd04ec9b284fdac3919228194d

Contents?: true

Size: 805 Bytes

Versions: 7

Compression:

Stored size: 805 Bytes

Contents

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

module Fog
  module Compute
    class GoGrid

      class Passwords < Fog::Collection

        model Fog::Compute::GoGrid::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::Compute::GoGrid::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/go_grid/passwords.rb
brightbox-cli-0.13.0 lib/brightbox-cli/vendor/fog/lib/fog/compute/models/go_grid/passwords.rb
fog-0.11.0 lib/fog/compute/models/go_grid/passwords.rb
fog-0.10.0 lib/fog/compute/models/go_grid/passwords.rb
fog4encbs-0.9.0.1 lib/fog/compute/models/go_grid/passwords.rb
fog4encbs-0.9.0 lib/fog/compute/models/go_grid/passwords.rb
fog-0.9.0 lib/fog/compute/models/go_grid/passwords.rb