Sha256: b476612000b5313d6ee7d6a2974e5e3d72023585d6564642b32c77a07b23c48d

Contents?: true

Size: 415 Bytes

Versions: 14

Compression:

Stored size: 415 Bytes

Contents

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 Fog::Errors::NotFound
          nil
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
fog-google-0.6.0 lib/fog/compute/google/models/zones.rb
fog-google-0.5.5 lib/fog/compute/google/models/zones.rb
fog-google-0.5.4 lib/fog/compute/google/models/zones.rb
fog-google-0.5.3 lib/fog/compute/google/models/zones.rb
fog-google-0.5.2 lib/fog/compute/google/models/zones.rb
fog-google-0.5.1 lib/fog/compute/google/models/zones.rb
fog-google-0.5.0 lib/fog/compute/google/models/zones.rb
fog-google-0.4.2 lib/fog/compute/google/models/zones.rb
fog-google-0.4.1 lib/fog/compute/google/models/zones.rb
fog-google-0.4.0 lib/fog/compute/google/models/zones.rb
fog-google-0.3.2 lib/fog/compute/google/models/zones.rb
fog-google-0.3.1 lib/fog/compute/google/models/zones.rb
fog-google-0.3.0 lib/fog/compute/google/models/zones.rb
fog-google-0.2.0 lib/fog/compute/google/models/zones.rb