Sha256: b29101c6d1c88e0ca799538c853d612440a9bbfaf39e5e536fb7cbc09ab21b3b

Contents?: true

Size: 511 Bytes

Versions: 23

Compression:

Stored size: 511 Bytes

Contents

module Fog
  module Compute
    class Google
      class Zones < Fog::Collection
        model Fog::Compute::Google::Zone

        def all
          data = service.list_zones.to_h[:items] || []
          load(data)
        end

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

Version data entries

23 entries across 23 versions & 2 rubygems

Version Path
fog-google-1.22.0 lib/fog/compute/google/models/zones.rb
fog-google-1.21.1 lib/fog/compute/google/models/zones.rb
fog-google-1.21.0 lib/fog/compute/google/models/zones.rb
fog-google-1.20.0 lib/fog/compute/google/models/zones.rb
fog-google-1.19.0 lib/fog/compute/google/models/zones.rb
fog-google-1.18.0 lib/fog/compute/google/models/zones.rb
fog-google-1.17.0 lib/fog/compute/google/models/zones.rb
fog-google-1.16.1 lib/fog/compute/google/models/zones.rb
fog-google-1.16.0 lib/fog/compute/google/models/zones.rb
fog-google-1.15.0 lib/fog/compute/google/models/zones.rb
fog-google-1.14.0 lib/fog/compute/google/models/zones.rb
gitlab-fog-google-1.14.0 lib/fog/compute/google/models/zones.rb
fog-google-1.13.0 lib/fog/compute/google/models/zones.rb
gitlab-fog-google-1.13.0 lib/fog/compute/google/models/zones.rb
fog-google-1.12.1 lib/fog/compute/google/models/zones.rb
fog-google-1.12.0 lib/fog/compute/google/models/zones.rb
fog-google-1.11.0 lib/fog/compute/google/models/zones.rb
fog-google-1.10.0 lib/fog/compute/google/models/zones.rb
fog-google-1.9.1 lib/fog/compute/google/models/zones.rb
fog-google-1.9.0 lib/fog/compute/google/models/zones.rb