Sha256: df949bb95a78183cff05f89fbcfed9f44cb6f9afb527743af0c8304e9d3febc9

Contents?: true

Size: 452 Bytes

Versions: 14

Compression:

Stored size: 452 Bytes

Contents

module Fog
  module Compute
    class Google
      class Networks < Fog::Collection
        model Fog::Compute::Google::Network

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

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