Sha256: ad5668ceccafb75c95bf5e19d0f5c51a8d3d0e0f22f8ddda3157366718d9673f

Contents?: true

Size: 545 Bytes

Versions: 23

Compression:

Stored size: 545 Bytes

Contents

require "fog/brightbox/models/compute/server_group"

module Fog
  module Brightbox
    class Compute
      class ServerGroups < Fog::Collection
        model Fog::Brightbox::Compute::ServerGroup

        def all
          data = service.list_server_groups
          load(data)
        end

        def get(identifier)
          return nil if identifier.nil? || identifier == ""
          data = service.get_server_group(identifier)
          new(data)
        rescue Excon::Errors::NotFound
          nil
        end
      end
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
fog-brightbox-1.12.0 lib/fog/brightbox/models/compute/server_groups.rb
fog-brightbox-1.11.0 lib/fog/brightbox/models/compute/server_groups.rb
fog-brightbox-1.10.0 lib/fog/brightbox/models/compute/server_groups.rb
fog-brightbox-1.9.1 lib/fog/brightbox/models/compute/server_groups.rb
fog-brightbox-1.9.0 lib/fog/brightbox/models/compute/server_groups.rb
fog-brightbox-1.8.2 lib/fog/brightbox/models/compute/server_groups.rb
fog-brightbox-1.8.1 lib/fog/brightbox/models/compute/server_groups.rb
fog-brightbox-1.8.0 lib/fog/brightbox/models/compute/server_groups.rb
fog-brightbox-1.7.3 lib/fog/brightbox/models/compute/server_groups.rb
fog-brightbox-1.7.2 lib/fog/brightbox/models/compute/server_groups.rb
fog-brightbox-1.7.1 lib/fog/brightbox/models/compute/server_groups.rb
fog-brightbox-1.7.0 lib/fog/brightbox/models/compute/server_groups.rb
fog-brightbox-1.6.0 lib/fog/brightbox/models/compute/server_groups.rb
fog-brightbox-1.5.0 lib/fog/brightbox/models/compute/server_groups.rb
fog-brightbox-1.5.0.rc1 lib/fog/brightbox/models/compute/server_groups.rb
fog-brightbox-1.4.2 lib/fog/brightbox/models/compute/server_groups.rb
fog-brightbox-1.4.1 lib/fog/brightbox/models/compute/server_groups.rb
fog-brightbox-1.4.0 lib/fog/brightbox/models/compute/server_groups.rb
fog-brightbox-1.3.0 lib/fog/brightbox/models/compute/server_groups.rb
fog-brightbox-1.2.0 lib/fog/brightbox/models/compute/server_groups.rb