Sha256: 649a00c9cd97d6b422bc57206664ba8ed34dab38d286cbe5598a17559e1b54a0

Contents?: true

Size: 458 Bytes

Versions: 14

Compression:

Stored size: 458 Bytes

Contents

module Fog
  module Compute
    class Google
      class Firewalls < Fog::Collection
        model Fog::Compute::Google::Firewall

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

        def get(identity)
          if firewall = service.get_firewall(identity).body
            new(firewall)
          end
        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/firewalls.rb
fog-google-0.5.5 lib/fog/compute/google/models/firewalls.rb
fog-google-0.5.4 lib/fog/compute/google/models/firewalls.rb
fog-google-0.5.3 lib/fog/compute/google/models/firewalls.rb
fog-google-0.5.2 lib/fog/compute/google/models/firewalls.rb
fog-google-0.5.1 lib/fog/compute/google/models/firewalls.rb
fog-google-0.5.0 lib/fog/compute/google/models/firewalls.rb
fog-google-0.4.2 lib/fog/compute/google/models/firewalls.rb
fog-google-0.4.1 lib/fog/compute/google/models/firewalls.rb
fog-google-0.4.0 lib/fog/compute/google/models/firewalls.rb
fog-google-0.3.2 lib/fog/compute/google/models/firewalls.rb
fog-google-0.3.1 lib/fog/compute/google/models/firewalls.rb
fog-google-0.3.0 lib/fog/compute/google/models/firewalls.rb
fog-google-0.2.0 lib/fog/compute/google/models/firewalls.rb