Sha256: 71ddd0e8c96544372b2080cfa8c7bf444c97154133736780e4a5fe6b709a5a3f

Contents?: true

Size: 574 Bytes

Versions: 15

Compression:

Stored size: 574 Bytes

Contents

module Fog
  module Compute
    class Google
      class BackendServices < Fog::Collection
        model Fog::Compute::Google::BackendService

        def all(_filters = {})
          data = service.list_backend_services.items || []
          load(data.map(&:to_h))
        end

        def get(identity)
          if backend_service = service.get_backend_service(identity)
            new(backend_service.to_h)
          end
        rescue ::Google::Apis::ClientError => e
          raise e unless e.status_code == 404
          nil
        end
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
fog-google-1.7.1 lib/fog/compute/google/models/backend_services.rb
fog-google-1.7.0 lib/fog/compute/google/models/backend_services.rb
fog-google-1.6.0 lib/fog/compute/google/models/backend_services.rb
fog-google-1.5.0 lib/fog/compute/google/models/backend_services.rb
fog-google-1.4.0 lib/fog/compute/google/models/backend_services.rb
fog-google-1.3.3 lib/fog/compute/google/models/backend_services.rb
fog-google-1.3.2 lib/fog/compute/google/models/backend_services.rb
fog-google-1.3.1 lib/fog/compute/google/models/backend_services.rb
fog-google-1.3.0 lib/fog/compute/google/models/backend_services.rb
fog-google-1.2.2 lib/fog/compute/google/models/backend_services.rb
fog-google-1.2.1 lib/fog/compute/google/models/backend_services.rb
fog-google-1.2.0 lib/fog/compute/google/models/backend_services.rb
fog-google-1.1.0 lib/fog/compute/google/models/backend_services.rb
fog-google-1.0.1 lib/fog/compute/google/models/backend_services.rb
fog-google-1.0.0 lib/fog/compute/google/models/backend_services.rb