Sha256: 291c8d4de123f67bf00d6702ea9c0b3f3169e0b875208508ae8cb3156cb035b5

Contents?: true

Size: 492 Bytes

Versions: 25

Compression:

Stored size: 492 Bytes

Contents

require 'fog/core/collection'
require 'fog/google/models/compute/zone'

module Fog
  module Compute
    class Google

      class Zones < Fog::Collection

        model Fog::Compute::Google::Zone

        def all
          data = service.list_zones.body["items"] || []
          load(data)
        end

        def get(identity)
          data = service.get_zone(identity).body
          new(data)
        rescue Excon::Errors::NotFound
          nil
        end

      end
    end
  end
end

Version data entries

25 entries across 25 versions & 2 rubygems

Version Path
fog-maestrodev-1.19.0.20140212012611 lib/fog/google/models/compute/zones.rb
fog-maestrodev-1.19.0.20140110004459 lib/fog/google/models/compute/zones.rb
fog-maestrodev-1.19.0.20140110003812 lib/fog/google/models/compute/zones.rb
fog-maestrodev-1.19.0.20140109202555 lib/fog/google/models/compute/zones.rb
fog-maestrodev-1.19.0.20140107192102 lib/fog/google/models/compute/zones.rb
fog-maestrodev-1.19.0.20140107142106 lib/fog/google/models/compute/zones.rb
fog-maestrodev-1.19.0.20131219203941 lib/fog/google/models/compute/zones.rb
fog-maestrodev-1.18.0.20131219193542 lib/fog/google/models/compute/zones.rb
fog-1.19.0 lib/fog/google/models/compute/zones.rb
fog-maestrodev-1.18.0.20131219033443 lib/fog/google/models/compute/zones.rb
fog-maestrodev-1.18.0.20131219032002 lib/fog/google/models/compute/zones.rb
fog-maestrodev-1.18.0.20131219030716 lib/fog/google/models/compute/zones.rb
fog-maestrodev-1.18.0.20131219022322 lib/fog/google/models/compute/zones.rb
fog-maestrodev-1.18.0.20131218202447 lib/fog/google/models/compute/zones.rb
fog-maestrodev-1.18.0.20131209091424 lib/fog/google/models/compute/zones.rb
fog-maestrodev-1.18.0.20131209090811 lib/fog/google/models/compute/zones.rb
fog-maestrodev-1.18.0.20131206115947 lib/fog/google/models/compute/zones.rb
fog-maestrodev-1.18.0.20131205181604 lib/fog/google/models/compute/zones.rb
fog-maestrodev-1.18.0.20131127194823 lib/fog/google/models/compute/zones.rb
fog-maestrodev-1.18.0.20131126183714 lib/fog/google/models/compute/zones.rb