Sha256: f53e81e2fe725e7695268411189de61df11e274ea1fe824818550292e453a127

Contents?: true

Size: 497 Bytes

Versions: 2

Compression:

Stored size: 497 Bytes

Contents

require_relative 'firewall'

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

        def all
          response = service.list_firewalls
          load(response.body)
        end

        def get(id)
          response = service.get_firewall(id)
          new(response.body)
        rescue Excon::Errors::NotFound
          nil
        end

      end # Firewalls
    end # OneAndOne
  end # Compute
end # Fog

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fog-oneandone-1.2 lib/oneandone/models/compute/firewalls.rb
fog-oneandone-1.0 lib/oneandone/models/compute/firewalls.rb